Fixing differences caused by language elements
In general, you can expect portable COBOL programs to behave the same way on Linux® as they do on z/OS®. However, be aware of the differences in file-status values used in I/O processing.
About this task
If your program responds to file-status data items, be concerned with two issues, depending on whether the program is written to respond to the first or the second file-status data item:
- If your program responds to the first file-status data item (data-name-1), be aware that values returned in the 9n range depend on the platform. If your program relies on the interpretation of a particular 9n value (for example, 97), do not expect the value to have the same meaning on Linux that it has on z/OS. Instead, revise your program so that it responds to any 9n value as a generic I/O failure.
- If your program responds to the second file-status data item (data-name-8), be aware that the values returned depend on both the platform and file system. For example, the STL file system returns values with a different record structure on Linux than the VSAM file system does on z/OS. If your program relies on the interpretation of the second file-status data item, the program is probably not portable.