4.6.1 Data Structures
For example, a function that receives a data structure would be called with a parameter list similar to this:
|
In RPG/400
CALL 'FUNNAME'
PARM DC@IDS
PARM DC@EDS
PARM PR@IDS
PARM PSLMST
In Control Language
CALL PGM(FUNNAME) +
PARM(&DC@IDS &DC@EDS &PR@IDS &PSLMST)
where:
|
Note 1: The 'Passed data structure' parameter is repeated for each of the Passed data structures.
Note 2: The size of the 'Passed data structure' parameter in this scenario could be 60 or 64 bytes. That is, 60 bytes if the PSLMST data structure is a file defined externally to LANSA (OTHER) or 64 bytes if it is a LANSA defined file. The extra 4 bytes in the LANSA file is the @@UPID field used by all files created using LANSA. Each of the fields in the data structure (file) contribute to the aggregate length of the 'Passed data structure'.
Note 3: If this is a "wrapper" RDML function that is itself calling another function using PASS_DS, then it is necessary to refer to all of the fields in the data structure, otherwise their values will not be passed on. A way of doing this would be via the GROUP_BY RDML command.