**free
ctl-opt main(main);
dcl-pr main ExtPgm('TSTPGM');
*n char(10) const options(*trim);
*n char(10) const options(*trim);
end-pr;
dcl-pr ExecCmd Extpgm('QCMDEXC');
Command Char(40);
CmdLen Packed(15:5);
end-pr;
dcl-s str0 Char(100) inz;
dcl-s $RRN Packed(6);
dcl-s Command Char(40);
dcl-s CmdLen Packed(15:5) Inz(%Len(Command));
dcl-proc main;
dcl-pi *n ;
file char(10) const options(*trim);
lib char(10) const options(*trim);
end-pi ;
Command = 'DSPFFD FILE('+lib+'/'+file+') OUTPUT(*OUTFILE) OUTFILE(QTEMP/QADSPFFD)';
Monitor;
ExecCmd (Command: CmdLen);
On-Error;
EndMon;
end-proc main;
here is how the Command looks like
I'm expecting Options(*Trim) to trim the input parameters, file and lib so that I don't have to use %trim before building the Command string :|
Is this option quite unreliable to use or is there a limited setting this could be used in?
OS Details: I'm running 7.5 with TR1