
Joederoche |
One thing that you can do is use to prototypes:
To prompt the command use the follwoing:
d Cmd S 2000A
d ChkCmd PR ExtPgm(’QCMDCHK’)
d CmdString 2000A
d CmdStringLen 15P 5 Const
d CmdOption 3A Const Options(*NoPass)
/free
Cmd = ‘?’ + %Trim(W$OBJCMD);
CallP(E) ChkCmd(Cmd:%Len(Cmd));
/end-free
the W$OBJCMD contains an AS/400 command with parameters, ect.
When the call is done, you can use the following:
d Command S 2000A Inz Varying
d ExecCmd PR ExtPgm(’QCMDEXC’)
d CmdString 3000A Const Options(*VarSize)
d CmdStringLen 15P 5 Const
d CmdOption 3A Const Options(*NoPass)
/free
Command = Cmd
CallP(E) ExecCmd(Command:%Len(Command));
/end-free
This should allow you to place a command the CMD field; use the CHKCMD prototype, and then use that string that is returned to initiate a call to the processor on the 400.
-Joe-