In reviewing the API records, I find that the following records are defined in IDD as modules:
Is there a reason that these are defined as Modules and not records ?
The reason given for these records being in a module definition instead of a record definition is that this type of construct (compatible with COBOL) is not allowed for a record definition within CA IDMS.
Trying to do this as a record fails:
ADD REC WS-RESPONSE-MSG-DATA LANGUAGE IS COBOL.
10 WS-REQUEST-MSG-BYTE PIC X(1)
OCCURS 0 TO 1 TIMES
DEPENDING ON WS-REQ-MSG-BUFF-LEN.
* E DC601123 DEPENDING ON NAME NOT FOUND FOR RECORD ELEMENT
* - DC601123 WS-REQUEST-MSG-BYTE
If the length of the buffer is fixed (WS-RSP-MSG-BUFF-LEN and / or WS-REQ-MSG-BUFF-LEN is fixed ) then it is be okay to define the module as a record without the occurs clause because in both cases they depend on the values in these two elements.