6.44 LceLansaCall

This function is used to initiate the immediate execution of a LANSA process/function or an IBM i program. If the program you call expects user interaction, this function will fail.

When using this function, your application must wait until the called program or function has been completed. Error messages will be routed back to your application.







 char far *




 char far *




 char far *




 char far *

strExchangeList )




The session identifier as returned by LceGetSessionId.


The name of the LANSA process.


The name of the LANSA function.




The name of the IBM i program.


A list of field names to be passed to and from the program. Refer to Notes.


Return Values

TRUE is returned if the session has executed the process/function or program.

FALSE is returned if an error occurs.


Portability Considerations

The format which uses strProgram is only supported if your host system is an IBM i. An error will be returned by the host if you make a call with strProgram to any other platform.

When calling a program on the IBM i, the exchange list may only contain fields of type A, P, and S. If exchanging numeric fields, the maximum length is 30 and the maximum decimals is 9.


Parameters can be passed to the called function or program via the exchange list of field names in strExchangeList. Each field used in this exchange list must have been declared using an LceUseField function. The value for the field is assigned using the LceSetFieldValue/LceSetFieldValueU function. The LANSA process and function to be executed do not have to be declared previously by an Lce function call.

Parameters can be returned from the called function or program via the exchange fields. The returned value for the field is stored and may be accessed using the LceGetFieldValueX/LceGetFieldValueU function.


This function is ideal to

If you don't want to wait until the host process completes, use the LceSubmit function instead.

If you wish to call a 3GL program that either passes or receives parameters, use Lce3GLCall instead.

Related Functions

6.66 LceSubmit

6.14 LceExecute400

6.3 Lce3GLCall