Moving COBOL programs to newer levels of z/OS

IBM has received several reports of COBOL programs behaving differently when moving to z/OS 2.5 or later, for example, failing, wrong results, etc.

When moving COBOL programs from z/OS 2.4 or earlier to z/OS 2.5 or later, it can expose programs that have coding mistakes regarding setting addressability to LINKAGE SECTION data items. If addressability is not set, a reference to a LINKAGE SECTION data item will be a reference to a zero address, often called "low core". For many releases of z/OS the data in low core did not change, but there were changes in z/OS 2.5, resulting in some COBOL programs behaving differently when run in z/OS 2.5 or later compared to when they were run in z/OS 2.4 or earlier.

These invalid references to LINKAGE SECTION items with no addressability can be prevented by using the new LSACHECK compiler option. By using LSACHECK, references to LINKAGE SECTION data items will result in 0C4 ABENDs, instead of other behavior resulting from referring to random data.

IBM recommends that developers of COBOL programs use LSACHECK in development at all times, and maybe using LSACHECK in production as well. It is never a good idea to reference data items that have not had addressability set, and LSACHECK can prevent this from happening.