When passing parameters, what is actually passed is a pointer to the passed parameters. There are a few ways around this. One is to create a CL in QTEMP, which hard-codes the parameters, compiles and calls it. Another is to send a message to the remote user to be retrieved by the called CL. Another (my preference) is to pass the data via a remote data queue. The called program checks the "Hard coded" variables passed. If they are set to a specific value, it reads the data queue (or retrieves the message) and parses the parameters into the variables it had expected the caller to pass.
OrdNo = 00012345
CustNo = 000456789
PartNo = "A123456ADFDSFSD "
QtyShip = 0012345.8955
Concat into "00012345000456789A123456ADFDSFSD 0012345.8955"
Send to data queue defined as remote data queue.
Call Program C on remote system, which calls program B passing hard coded value for OrdNo of -1 and all other variables as zeros or blanks.
Check to see if OrdNo is -1
Read data queue and parse values into passed variables
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
This was first published in March 2002