baije01

Tech Tip: CA IDMS Why are API records are defined in IDD as modules?

Discussion created by baije01 Employee on Oct 18, 2016
Latest reply on Oct 19, 2016 by Gary_Cherlet

Question:

 

In reviewing the API records, I find that the following records are defined in IDD as modules:    WS-RESPONSE-MSG-DATA 

           WS-REQUEST-MSG-DATA 

Is there a reason that these are defined as Modules and not records ? 

 

Answer: 

 

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. 

05 WS-REQUEST-MESSAGE. 

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. 

 

Additional Information:

https://docops.ca.com/ca-idms/19/en/using/using-web-services/using-the-web-services-api

Outcomes