Run PC command from CL program

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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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)
/*————————————————–*/

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SBrennecke
    Use RUNRMTCMD. The PC will need to have the iSeries Access for Windows Remote Command service (CWBRXD.EXE) running.
    0 pointsBadges:
    report
  • Inkpen2
    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 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following