the program you want is QCMD. you can call this from QCMDEXEC inside your program or set it up as a external prototype and call it with your command line as the parameter.
d Command Pr ExtPgm(‘QCMD’)
d CMD 300
CMD = ‘DSPJOB';
i have not tested the above code……..it may need some tweaking.
d qCmdExc pr ExtPgm(‘QCMDEXC’)
d Command 50a Const Options(*VarSize)
d Len 15p 5 Const
d Flag 3a Const Options(*NoPass)
Command = ‘DSPJOB';
Call qCmdExc(Command : %Len(Command);
i have tested this with other commands, but not with QCMD. i dont know why this wont work though.