LANSA Programming Considerations for Called Functions

LANSA Composer

LANSA Programming Considerations for Called Functions

When developing LANSA functions that will be called from a LANSA Composer Processing Sequence using the CALL_FUNCTION activity via the LANSA Composer Request Server, some particular LANSA programming considerations apply:

  • Either RDML functions or fully RDMLX-enabled functions may be called.
  • The partition containing the function to be called must be a multilingual partition.
  • If *DIRECT is specified or assumed for the PROCESS parameter of the CALL_FUNCTION activity, the function must be defined with FUNCTION OPTIONS(*DIRECT)

 

If you intend to exchange variable data with the called function using the EXCHnn parameters of the CALL_FUNCTION activity, these additional considerations apply:

  • For functions that will be called on IBM i servers, position 487 of LANSA data area DC@A01 must be set to 'Y' (in the LANSA system containing the LANSA function to be called) before compiling and executing the function.  If this condition is not met, the called function will not correctly receive or return the EXCHnn variable values.
  • The function must define the fields EXCH01 through to EXCH07 in order to receive values (via the exchange list) that are specified in the corresponding CALL_FUNCTION activity parameters.
  • The function must use the EXCHANGE command with fields EXCH01 through to EXCH07 in order to return values (via the exchange list) for variables that are specified in the corresponding CALL_FUNCTION activity parameters.

 

Refer to LANSA documentation for more information on LANSA features referred to above.