Thursday, April 10, 2008

Invoking a PC Application through CL Program:

From a CL we can invoke and PC applications like Notepad, MS Work, Calc, etc.
STRPCCMD allows you to launch an application on a personal computer that is attached to the host iSeries system. It is the only PC Organizer (PCO) function supported by Host On-Demand for 5250 sessions. STRPCCMD can be invoked directly from the iSeries command line or through the Client Access/400 Organizer menu.
To use STRPCCMD, do the following:
1. Start a 5250 session.
2. Log into the iSeries host system.
3. Start PC Organizer. Enter the following command at the iSeries command line:
STRPCO PCTA(*NO)
Host On-Demand does not support the PC Text Assist (PCTA) function of PC Organizer. You must specify a value of *NO for the PCTA parameter.
4. To run STRPCCMD, do one of the following:
o From the Client Access/400 menu, select option 7 (Start a PC Command).
o Enter the following at the iSeries command line, then press the PF4 key:
o STRPCCMD
5. Specify the full path name of the application (for example, C:\winnt\notepad.exe) at the PC Command prompt.
o STRPCCMD PCCMD(C:\WINNT\NOTEPAD.EXE’)
6. Specify whether the computer should pause after running a command. Enter one of the following:
*YES
The computer pauses after running the PC command, then returns to the iSeries session. If the PAUSE parameter is set to *YES, Host On-Demand waits for the PC process to complete and is blocked until the process exits. Host On-Demand waits for the parent process to complete even though the PC process executes a child process.
*NO
The computer returns directly to the iSeries session.
Please try out this program to open a notepad application from your AS/400 System.
PGM
MONMSG MSGID(CPF0000 IWS4010)
STRPCO PCTA(*YES)
STRPCCMD PCCMD('C:\WINDOWS\NOTEPAD.EXE’) PAUSE(*NO)
ENDPGM

4 comments:

Raider52 said...

Hello All:

Could someone please assist me How to use combination of STRPCO PCTA(*NO) and/or STRPCCMD PCCMD to execute a AS400 ".mac" Macro... I am using PCOMM with VBA the following VBA "calculated" code and I can only get the code to launch the AS400 macro in the noted folder. But I want to macro to post a Journal Entry on the AS400.

PRX = "STRPCO PCTA(*NO)"
PRG = "STRPCCMD PCCMD('V:\Journal_Test\NewTestScripts\JE#356BSB042 1.mac')"

I am not an AS400 expert, and Ihave been trying this for days and cannot get it to work. Let me know if you have any questions. Any help would be greatly apprecaited.

Many Thanks
Al

Raider52 said...

Hello All:

Could someone please assist me How to use combination of STRPCO PCTA(*NO) and/or STRPCCMD PCCMD to execute a AS400 ".mac" Macro... I am using PCOMM with VBA the following VBA "calculated" code and I can only get the code to launch the AS400 macro in the noted folder. But I want to macro to post a Journal Entry on the AS400.

PRX = "STRPCO PCTA(*NO)"
PRG = "STRPCCMD PCCMD('V:\Journal_Test\NewTestScripts\JE#356BSB042 1.mac')"

I am not an AS400 expert, and Ihave been trying this for days and cannot get it to work. Let me know if you have any questions. Any help would be greatly apprecaited.

Many Thanks
Al

Raider52 said...

Hello All:

Could someone please assist me How to use combination of STRPCO PCTA(*NO) and/or STRPCCMD PCCMD to execute a AS400 ".mac" Macro... I am using PCOMM with VBA the following VBA "calculated" code and I can only get the code to launch the AS400 macro in the noted folder. But I want to macro to post a Journal Entry on the AS400.

PRX = "STRPCO PCTA(*NO)"
PRG = "STRPCCMD PCCMD('V:\Journal_Test\NewTestScripts\JE#356BSB042 1.mac')"

I am not an AS400 expert, and Ihave been trying this for days and cannot get it to work. Let me know if you have any questions. Any help would be greatly apprecaited.

Many Thanks
Al

Raider52 said...

Hello All:

Could someone please assist me How to use combination of STRPCO PCTA(*NO) and/or STRPCCMD PCCMD to execute a AS400 ".mac" Macro... I am using PCOMM with VBA the following VBA "calculated" code and I can only get the code to launch the AS400 macro in the noted folder. But I want to macro to post a Journal Entry on the AS400.

PRX = "STRPCO PCTA(*NO)"
PRG = "STRPCCMD PCCMD('V:\Journal_Test\NewTestScripts\JE#356BSB042 1.mac')"

I am not an AS400 expert, and Ihave been trying this for days and cannot get it to work. Let me know if you have any questions. Any help would be greatly apprecaited.

Many Thanks
Al