Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch PC program from iSeries

Status
Not open for further replies.

Pekka

Technical User
Mar 19, 2002
107
0
0
FI
Hi,
does anybody knows is it possible to call a pc program from iSeries? I have a slight idea that data queues might be the interface with As/400 and PC. If so, can it be done with RPG? Does anybody know any references to urls where this kind of issues are handled?

Regards

Pekka
 
If you know the IP address of the remote PC, you can use RUNRMTCMD. That requires a rexexc daemon to be on the remote PC.

Or, you can use FTP in batch, and use the quote site subcommand.


"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
Hi,

If you use a terminal emulation session on a pc, create a cl program like this:

PGM PARM(&WEBSITE)
DCL VAR(&CALL) TYPE(*CHAR) LEN(123) +
VALUE('rundll32 +
url.dll,FileProtocolHandler ')
DCL VAR(&WEBSITE) TYPE(*CHAR) LEN(89)
STRPCO
MONMSG MSGID(CPF0000 IWS0000)
CHGVAR VAR(&CALL) VALUE(&CALL *BCAT &WEBSITE)
STRPCCMD PCCMD(&CALL) PAUSE(*NO)
ENDPGM


Call the program with a website as a parameter, and the IExplorer will display the browser session.
Also, call it with a c:\test.xls file, and exel isstarted and displays the spreadsheet. Same goes for other applications.

If someone can give me a hint on how to directle display a spooled file in the IExplore window right after creating it, this will be helpful!

thanks, hope this is helpful.




 
I displayed a PDF I stored in our IFS with:

DCL VAR(&CALL) TYPE(*CHAR) LEN(123) +
VALUE('rundll32 url.dll,FileProtocolHandler')
DCL VAR(&WEBSITE) TYPE(*CHAR) LEN(89)
DCL VAR(&SYS) TYPE(*CHAR) LEN(8)
RTVNETA SYSNAME(&SYS)
CHGVAR VAR(&WEBSITE) VALUE('\\' *CAT &SYS *CAT +
'\@QTEMP\' *CAT &ATTACH)
MONMSG MSGID(CPF0000 IWS0000)STRPCO
CHGVAR VAR(&CALL) VALUE(&CALL *BCAT &WEBSITE)
STRPCCMD PCCMD(&CALL) PAUSE(*NO)
 
I'm using the RUNRMTCMD myself. It's been a educational expirence. Because of the way the daemon works, it doesn't recognize any of my mapped network drives or that I have email on my pc. Depending on what you want to do, I suggeest reviewing you DOS commands. I have samples of some if anyone is interested.

RedMage1967
IBM Certifed - RPG IV Progammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top