One key sub-system consisting of a large suite of programs (mixture of screens and external functions) pass around a large number of parameters. These parameters are mostly defined on a single-element array (to get around the 9 parameter constraint). This array has had some of its fields defined within their file definitions (as opposed to stand-alone entries on the array definition). Difficulties are experienced when re-generating some of these functions now in that the order of the parameters generated is different for no apparent reason.
For example, if there are two parameters defined within the same file on an array, e.g. Fields A and B.
It would be really good to understand what, if anything, has changed in the code generator (RPG/RPGLE) over the years.
CA 2E 8.7.x
In older versions of 2E, array items could be ordered using the Array Key sequence. But, starting with version 8.1.2, the product changed to no longer consider the Array Key sequence for array items, choosing to use the Array Field sequence instead. In the above-described scenario, the Array Key sequences were filled in but the Array Field sequences were not.
Correcting the Array Field sequence will enable the correct order of the parameters.
The change can be made to the Array Field Sequence on the "EDIT ARRAY KEY ENTRIES" screen to reflect the desired order of the array fields.
The "EDIT ARRAY KEY ENTRIES" screen can be accessed by taking F7 on the "EDIT ARRAY DETAILS" screen.
More information on defining arrays in 2E can be found here: Defining Arrays