0 pts.
 Run PC command from CL program
RPG
Is it possible to run a PC batch file from a CL program, and, if so, how? Thanks.

Software/Hardware used:
ASKED: October 28, 2004  1:09 PM
UPDATED: October 31, 2004  6:31 PM

Answer Wiki:
Here is one I used to execute Excel from a CL, but any PC cmd can be executed. PGM STRPCO MONMSG MSGID(IWS4010) /*IF PC ORGANIZER IS ALREADY STARTED,CONTINUE */ /*EXECUTE EXCEL FROM XP PC */ /*----------------------------------*/ STRPCCMD PCCMD('START EXCEL.EXE') PAUSE(*YES) /*--------------------------------------------------*/
Last Wiki Answer Submitted:  October 28, 2004  1:20 pm  by  Deannakon   0 pts.
All Answer Wiki Contributors:  Deannakon   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Use RUNRMTCMD. The PC will need to have the iSeries Access for Windows Remote Command service (CWBRXD.EXE) running.

 0 pts.

 

you have to start the PC organizer first with the command
STRPCO
then use the command STRPCCMD to run your pc command
here is an example where I needed to build a file and push it to the PC for an application.

PGM
CLRPFM POSP00
CALL PGM(POS00) PARM(&CORP &DIVI &CATA)
STRPCO
MONMSG IWS4010 /*if STRPCO has already been started */
STRPCCMD PCCMD(‘C:POS.BAT’)
ENDPGM

 0 pts.