Today we got an abend in production. It was for a COBOL IMS program. It calls a DB2 sub-program and some date routines also. Abend was S0C1. When we analyzed it came to the point that IMS was giving the status-code 'AD'. We looked for it and below are the details:
https://www.ibm.com/docs/en/ims/13.1.0? ... nations-ad
But it does not make any sense that it can abend with wrong "function parameter". Because it comes from a COBOL 'fix copybook', which is like this. I mean this is a common copybbok for so many programs, so it can not pass a wrong function-parameter as the above explanation says:AD
Explanation
For call-level programs: Either the function parameter on the call is invalid or the function is not supported for the type of PCB specified in the call. Only applies to full-function DEQ calls. Some possible reasons are:
The function parameter is invalid.
A system service call used a PCB that is not the I/O PCB.
A call issued in a DCCTL environment referred to an unsupported PCB or database.
A message GU or GN call used an alternate PCB instead of the I/O PCB.
A database call used a PCB that is not a DB PCB.
A message GU used the I/O PCB without specifying IN=trancode in the BMP JCL.
A SETS or ROLS call included the I/O area but omitted the token.
A CPI Communications driven program issued the SETO call on the I/O PCB.
A call was issued from an IFP region on an I/O PCB.
Invalid subsystem level for spool API processing.
A DL/I call was made against a DEDB or MSDB PCB in a non-Fast Path system.
Code: Select all
|++++| 01 DLI-FUNCTIONS.
|++++|*
|++++| 05 GU PIC X(4) VALUE 'GU '.
|++++| 05 GN PIC X(4) VALUE 'GN '.
|++++| 05 GNP PIC X(4) VALUE 'GNP '.
|++++| 05 GHU PIC X(4) VALUE 'GHU '.
|++++| 05 GHN PIC X(4) VALUE 'GHN '.
|++++| 05 GHNP PIC X(4) VALUE 'GHNP'.
|++++| 05 ISRT PIC X(4) VALUE 'ISRT'.
|++++| 05 DLET PIC X(4) VALUE 'DLET'.
|++++| 05 REPL PIC X(4) VALUE 'REPL'.
|++++| 05 PCB PIC X(4) VALUE 'PCB '.
|++++| 05 TERM PIC X(4) VALUE 'TERM'.
|++++| 05 CHKP PIC X(4) VALUE 'CHKP'.
|++++| 05 XRST PIC X(4) VALUE 'XRST'.
Code: Select all
01 WS-VATID-COUNTRY-CODE-ENTRIES.
05 WS-VATID-COUNTRY-CODE-TABLE OCCURS 10 TIMES.
10 WS-VATID-COUNTRY-CODE PIC X(02).
The input file using which this internal COBOL table was populated had 41 entries but the table was only able to accommodate 10 entries and that made I think data to overflow to "IMS function" and abedn happeend. I have two questions now:
1. Why the program did not abend in the COBOL Table itself?
2. When such 'overflow' of data happens, how do we know it happened? How would we know which another COBOL variable has got the wrong data, is there an easy way than doing like we did with multiple iterations?
Thanks