OS-COMMAND Progress Call w/Params

Kernel

New Member
Hopefully this is being posted in the proper forum; I did a lot of searching but have not found what I'm looking for so am biting the bullet...

We are running a WMS under Progress 9.1D and have the need for psuedo-multithreading when calling a print process. In a nutshell, when certain criteria is met, we call the print program and all processing of the calling program stops until the print program returns. We want to avoid this wait so that processing can continue and other printing can be started at the same time with further calls when criteria is met.

At this time we're toying with the AppServer and ASYNCHRONOUS option of the RUN command, but from searching I saw some mentions of using the OS-COMMAND and a batch session. The problem is that when we try to execute the OS-COMMAND string, the system complains of a mismatched number of parameters so we're stumped as to how to pass the parameters in that the program needs. We need to pass 7 values into the program for it to operate.

Any help would be appreciated.
 
It sounds like you're trying to use OS-COMMAND to start another Progress session and run a particular .p that you would otherwise run with a RUN statement that has parameters?

To do that you will need a wrapper program and you will need to pass the parameters via the -param startup. Something like this:

Code:
OS-COMMAND SILENT VALUE( 'bpro dbname -p wrapper.p -param "p1,p2,p3" ' ).

Code:
/* wrapper.p
 */

RUN print.p ( ENTRY( 1, SESSION:PARAMETER ),  ENTRY( 2, SESSION:PARAMETER ),  ENTRY( 3, SESSION:PARAMETER )).

Note: I'm only passing 3 parameters to keep it short and sweet ;)
 
Back
Top