LANSA/Server usage tips
|Abstract:||Tips about LANSA/Server functions that allow you to "execute" programs on the AS/400.|
There are a number of LANSA/Server functions that allow you to "execute" programs on the AS/400.
Below are a few tips about when to use the various functions :
- LceExecute400: Use this function to execute an AS/400 command.
For example, SNDMSG MSG("What has happened to the printer?") TOUSER(QSYSOPR)...
It is also possible to call or submit programs and even LANSA functions. But, there are easier ways to do it. READ ON...
- LceLansaCall: Use this function to EITHER call a 3GL (RPG, CL, COBOL, etc) program WITHOUT parameters OR a LANSA function (with optional exchange list).
This function will run the called program or function "interactively" and your PC application will wait until it finishes.
- LceSubmit: Use this function to submit EITHER a 3GL (RPG, CL, COBOL, etc) program WITHOUT parameters OR a LANSA function (with optional exchange list).
This function will return control to your PC application immediately. It does not wait for the submitted program or function to complete.
- Lce3GLCall: Use this function when you want to call a 3GL (RPG, CL, COBOL, etc) program WITH parameters.
You cannot use this function to call a LANSA function or a 3GL program that does not expect parameters. You must use LceLansaCall.
You use Lce3GLDefineParameter to define the parameter(s) to be passed to the 3GL program.
You use Lce3GLCall to call the 3GL program passing the define parameters.
You use Lce3GLGetValue to receive a parameter value back from your 3GL program on the AS/400.