Pc command over AS/400

Gomesrp

Active Member
Hi list,

Does anybody knows how to invoke a PC command (as a .bat file), over AS/400? I mean, I need to chain a .bat using a JDEdwards menu. Is it possible?

Thx in advance,

R.P.G.
 
Yes it's possible and very easy to do using the following AS400 PC Organiser
commands:

STRPCO
MONMSG MSGID(CPF0000 CPD0000 CPC0000 IWS0000)
STRPCCMD PCCMD(filename.bat)
MONMSG MSGID(CPF0000 CPD0000 CPC0000 IWS0000)

If you put the commands in a CL program then you can add it to a JDE menu.

You can easily set up a DreamWriter program to allow you to specify the name
of the batch file you wish to execute and files to download to PC etc if you
are going to need to do this for multiple batch files.

Hope this helps.
Tony Payne




Tony Payne - Senior Systems Analyst
Selmer-UMI
Elkhart, Indiana 46516
 
R.P.G.,

I'm not sure if this is what you are looking for but here is a code snippet

* */
* */
* --------- Start PCO --------------------------------------------- */
* */
STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010 CPA0701)

STRPCCMD PCCMD('C:\PROGRA~1\MICROS~1\OFFICE\EXCEL.EXE +
\\KVMETRO\ISS\AS400\DBELCHER\DOUG\XLS\DSR.XLT')
PAUSE(*NO)
GOTO EOJ

Depending on whether or not you have Client Access or Client Access Express
this will start PCO and execute the STRPCCMD.

The menu option would look like a regular menu option

Selection. . . . 11 Description. Execute Excel DSR Template
Job to Execute . J66010 Batch. . . . 0 Highlight. 0 A J K DP F
Menu to Execute. Help Inst Key Sel Lock .
Option Code. . . Option Key . Version. .
Appl Override. . 55 Run Time Msg Cntry/Reg


There are a number of different ways to trigger a .bat file either from the
AS/400 (through the example above if you have Client Access) or through
RUNRMTCMD. Also a number of ways to trigger it on the PC side. It really
depends on your configuration and what you want to do. For all non-JDE
specific information you can probably go to the iSeries Network site
(http://www.iseriesnetwork.com/) and look through their article archive and
forums. You might also check out the Google Advanced Group Search
(http://www.google.com/advanced_group_search?hl=en) to find other examples.


Douglas Belcher
KV Pharmaceutical Inc.
St. Louis MO
Opinions expressed are not necessarily those of my employer
 
I have put the following into a JDE CL program on a menu:

STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010)

/* DOS BAT - RENAME EXECUTABLE, EXPAND FILE, TRANSFER FILE */

STRPCCMD PCCMD('\\ServerName\Common\ISCOMMON\Chase\SEQPROC.bat')
PAUSE(*NO)

Of course each of our workstations are PCs using Client Access. The monitor
message, IWS4010, is in case the program has run previously on the
workstation and STRPCO had been invoked before.



George Smith
World A7.3, Cum10 - V4R5
Walco International, Inc.
 
Try the AS400 command "RUNRMTCMD" . This command will execute any
PC command supported
on the server where it is submitted to. The server will have to
have Client Access loaded
and the RUNRMTCMD service turned on. Good Luck.

Norma Kircher
AS400 Programmer/Analyst
Emerson Process Management
8301 Cameron Road
Austin, Texas 78754-3895
(512) 832-3035
(512) 832-3950 Fax
[email protected]
 
The Start PC Command (STRPCCMD) command allows you to run a
single application, a DOS command, or an OS/2 command on an
attached personal computer.
 
please help me to read pdf data into AS400 file.

sample code.. How can i get the data in file after STRPCCMD

D QCMDEXC PR extpgm('QCMDEXC')
D command 1024a
D cmd_len 15p 5
*
D command s 1024a

D cmd_len s 15p 5
/free
begsr xxxx;
monitor;
command = 'STRPCO';
cmd_len = %len(%trim(command));
QCMDEXC(command:cmd_len);
on-error;
endmon;
command = 'STRPCCMD PCCMD(''start /test/1xxx.pdf'') -
PAUSE(*NO)';
cmd_len = %len(%trim(command));
QCMDEXC(command:cmd_len);
*inlr = *on;


Endsr;
/end-free
 
Back
Top