S0C4 or 4083 abend code in IDMS batch program
search cancel

S0C4 or 4083 abend code in IDMS batch program


Article ID: 139928


Updated On:




An abend can occur in an IDMS batch program when it attempts to pass a sort or index key work field to the CV for use with a FIND/OBTAIN record-name WITHIN set-name USING sort-key DML statement.

The abend will manifest itself as a S0C4 and may appear as a user 4083 abend in an LE program. The IDMS module RHDCTD0D may be referenced in the abend messages.

The problem is described here in COBOL terms but is equally possible in PL/1 and Assembler.


Release : All releases.

Component : CA IDMS


The problem is very specific with respect to how it happens. If any of the following conditions are not true, then the problem is most likely not this situation.

1. The sort-key field must be defined in the COBOL LINKAGE SECTION or in a FILE definition (FD or SD).

2. The sort-key field is less than 256 bytes long.

3. The actual location of the sort-key field's storage is less than 256 bytes from the end of a physical storage boundary and the next physical page is not allocated to the address space or is fetch protected. (Because of this condition, the abend may be intermittent - it may not occur on every execution of the program).

The problem is that the client side of the request does not know the length of the sort-key field and so it always moves 256 bytes. As long as the key field's storage, for a length of 256 bytes, is addressable and not fetch protected, no harm will come of this extra data being pass to the IDMS address space. The IDMS CV will only look at how much is actually needed.



The solution is to define the field to be coded as part of the DML statement in the WORKING-STORAGE SECTION and then move the value passed through the LINKAGE SECTION into the newly defined field before executing the statement.