B7.1 Using STRPCO PCTA(*NO) and STRPCCMD PCCMD

Raider52

Member
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
 

bravo1romeo

Member
Not sure since I use i Access, try "STRPCCMD PCCMD('start ''V:\Journal_Test\NewTestScripts\JE#356BSB042 1.mac''')"
provided .mac has file association with the executable you want it to use.
otherwise try
"STRPCCMD PCCMD('start ''C:\path\to\programtorunvba.exe'' ''V:\Journal_Test\NewTestScripts\JE#356BSB042 1.mac''')"
Note "start" needed as windows command to run program and inner strings delimited by 2 adjacent single quotes, important also since your file path has a space in it which will cause more drama. You may also run into the STRPCCMD PCCMD Parameter Limited to 123 Characters issue
 
Top