7 59 2 INCLUDE Comments Warnings

LANSA Technical

7.59.2 INCLUDE Comments / Warnings

This note applies only to IBM i:

If PROCESS(*DIRECT) is specified and the function name is not unique in the partition, then the RDML code is included from the function of that name in the process name that is highest in the normal collating sequence. For example, if function F is in both process B and process C, then INCLUDE PROCESS(*DIRECT) FUNCTION(F) will cause RDML to be included from function F in process B. If function F is later created in process A, a subsequent compile will cause RDML to be included from function F in process A.

This note applies to Visual LANSA:

If PROCESS(*DIRECT) is specified the function name must be unique within the partition.
If process B and process C both have the same function named function F, the function F process will not compile on both process B and process C. This would cause the following error message to be displayed:
Function name must be unique within the partition to use OPTIONS(*DIRECT).

However, if OPTIONS(*DIRECT) is NOT used, this error message is displayed:
To generate C code you must use FUNCTION OPTIONS(*DIRECT) in this function.

Therefore, it is not possible to use the same function name in the partition.

INCLUDE Comments / Warnings (all LANSA)

  • INCLUDE cannot be embedded in RDML that is already included.
  • Import / export, checkin / checkout and the deployment tool will not automatically cause functions that are included to also be processed.
  • Impact Analysis will not automatically associate included functions with the functions that INCLUDE them via the related object search, or vice versa. A profile search scanning for the function name in RDML code will allow the where used capability.
  • The total number of lines of RDML code in a function in IBM i cannot be greater than 4096 counting the included RDML. This restriction does not apply to a function in Visual LANSA.
  • Included screens (DISPLAY, REQUEST, POP_UP, supporting DEF_LIST & GROUP_BY) & reports (DEF_LINE, DEF_HEAD, DEF_FOOT, DEF_BREAK) cannot be painted.
  • Included screens & reports are not recommended.
  • The full function checker reports any errors in included RDML against the relevant INCLUDE RDML command.
  • The INCLUDE RDML command is not valid in components.
  • Print of functions does not expand included RDML commands.
  • Included RDML cannot be debugged on LANSA for IBM i
  • Run time errors in included RDML will be reported against the relevant INCLUDE RDML command