IDMS: Unexpected abends in dc-cobol programs after r17.0
search cancel

IDMS: Unexpected abends in dc-cobol programs after r17.0


Article ID: 50125


Updated On:


IDMS IDMS - Database


It is possible that a dc-cobol program which appeared to function properly under a release of CA-IDMS/DC prior to r17.0 will abend under r17.0 or later.

The abend will be a D003, S0C4, S0C7 or anything which may indicate that a passed LINKAGE SECTION item was not assigned correctly when referenced.


Release: r17.0 and later.
Component: IDMS


It is, and always has been, a requirement that any data item passed on a TRANSFER CONTROL that specifies NORETURN (or its alias, XCTL) must be in the LINKAGE SECTION of both the called and the calling program. This is documented in the CA-IDMS DML Reference Guide for COBOL in the section on TRANSFER CONTROL.

The reason for this is that once a program has issued a TRANSFER CONTROL ... NORETURN, then that program is no longer active and therefore, all data items defined in its WORKING-STORAGE section are subject to being freed by CA-IDMS/DC. If such a data item defined in the calling program's WORKING-STORAGE section is passed to the called program, it is possible that it will have been freed by the time it is referenced in the called program. The resultant abend could be a D003, S0C4, S0C7 or anything that may result from that piece of storage not being what is expected. In theory, any unexpected behavior is possible, but a program check of some description is most likely.

Please note that on the TRANSFER CONTROL statement, NORETURN (or XCTL) is the default if neither RETURN (LINK) or NORETURN (XCTL) is specified.

The precise point at which the storage would be freed is non-specific and can depend on such things as the releases of CA-IDMS and COBOL, various COBOL options and whether or not optional bit 196 is enabled.

Client experiences have shown that the freeing of this storage is more likely to happen sooner in r17.0 (or later releases) than it did under prior releases. Therefore the experience of the user is that a program which worked successfully under r16.0 (or prior releases) abends when run under r17.0.

The real error is that an attempt was made to pass data from a WORKING STORAGE entry.


The way to correct the problem is to use a LINKAGE SECTION entry.
The LINKAGE SECTION entry may be passed from a higher level program that uses TRANSFER CONTROL ... RETURN (or LINK).
Alternatively, a GET STORAGE may be issued to allocate an 01 level LINKAGE SECTION entry.