Program check or other unexpected abends in dc-cobol programs after r17.0

Document ID : KB000050125
Last Modified Date : 14/02/2018
Show Technical Document Details


It is possible that a dc-cobol program which appeared to function properly under a prior release of CA-IDMS/DC will abend under r17.0. 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.


It is, and always has been, a requirement that any data item passed on a TRANSFER CONTROL ? XCTL (or NORETURN) 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 ... XCTL, 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, XCTL (or NORETURN) is the default if neither XCTL or LINK 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 than 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 LINK. Alternatively, a GET STORAGE may be issued to allocate an 01 level LINKAGE SECTION entry.