SBMJOB in free-format SBMJOB in free-format George221 (MIS) (OP) 10 Dec 07 19:22 Would anybody have an example of sbmitting a job through QCMDEXC in free format? Dealing with the parm list and quote issue? Thanks. RE: SBMJOB in free-format Mercury2 (TechnicalUser) 11 Dec 07 07:11 Paste here the related code. RE: SBMJOB in free-format flapeyre (Programmer) 11 Dec 07 14:17 Here is an RPG IV prototype for the QCMDEXC API:CODE ** Prototype definition for QCMDEXC D Runcmd PR EXTPGM('QCMDEXC') D Cmdstr 3000A CONST OPTIONS(*VARSIZE) D Cmdlen 15P 5 CONST D Cmddbcs 3A CONST OPTIONS(*NOPASS) You should define the command string as Varying, like this:CODE D Command_String S 3000A VaryingTo get around the quote issue, I define a quote as a named constant:CODE D Quote C '''' In free format, you would do something like this:CODE Command_String = 'SBMJOB CMD(CALL PGM(MYPGM) PARM(' + Quote + parm1 + quote + '))'; Runcmd(Command_String : %LEN(%TRIMR (Command_String))); Solum potestis prohibere ignes silvarum. RE: SBMJOB in free-format George221 (MIS) (OP) 12 Dec 07 17:29 Thank you very much. That helped.