You can use Qcmdexc procedure from Sql without the command length parameter

Example :

Exec Sql Call Qsys2.Qcmdexc(‘Addlible Mylib’);

If you are using a variable for the command, you can use it like below:

CmdString = ‘Addlible Mylib’;

Exec Sql Call Qsys2.Qcmdexc(:CmdString);