Modifying Action Diagrams › Understanding Contexts › Function Contexts › Enhanced Array Support › Enhanced Array Support Restrictions
Enhanced Array Support Restrictions
This new functionality has a number of fundamental restrictions:
- Only functions of type Execute External Function (EXCEXTFUN) and Execute User Program (EXCUSRPGM) allow parameters to be passed as array.
- Parameters can only be passed as array when the parameter structure is defined using an array based over the *Arrays file.
- Parameters can only be passed as array when they are being passed as RCD or KEY.
- No fields can be dropped on a parameter being passed as an array.
- Does not allow a multiple-instance array parameter in a function call, in both ARR and PAR context, except when calling an EXCEXTFUN or EXCUSRPGM which has multiple-instance array parameter. Additionally, the call must be from the top-level action diagram of an EXCEXTFUN.
- The Submit job (SBMJOB) feature and Y2CALL command do not support function calls that contain multiple-instance array parameters.
When working with two functions, function A and function B, for example, you can model in the action diagram of function A a call to function B, where B has a parameter interface passed as an array. In this case these additional restrictions apply:
- Function A must be of type EXCEXTFUN, and function B must be of type EXCEXTFUN or EXCUSRPGM.
- The parameter context must be PAR or ARR and the array name must exactly match on the parameter definition of A and B.
- If a parameter is passed as an array on A it must be passed as an array on B.
- The parameter must be passed as RCD on both A and B, or KEY on both A and B.
- Though the usages of the subfields on a parameter passed as an array can be mixed, the usages must be compatible, such that the calling function can call the called function.
- In general, the 2E tool prevents the use of modeling scenarios that cannot be successfully generated.
Note: For more details, see the sections for Edit Function Parameters Panel and Edit Function Parameter Details Panel, or see the chapter "Defining Function Parameters" in the Building Applications guide.