Fixing environment differences that affect portability

Differences in file-names and control codes between Linux® on x86 and IBM® z/OS® platforms can affect the portability of your programs.

About this task

File naming conventions on Linux on x86 are very different from those on IBM z/OS. This difference can affect portability if you use file-names in your COBOL source programs. The following file-name, for example, is valid on Linux on x86 but not on IBM z/OS (except in the z/OS UNIX file system):


/users/joesmith/programs/cobol/myfile.cbl

Case sensitivity: Unlike z/OS, Linux is case sensitive. Names used in source programs (such as uppercase file-names) should be named appropriately in Linux file directories.

Some characters that have no particular meaning on z/OS are interpreted as control characters by Linux. This difference can lead to incorrect processing of ASCII text files. Files should not contain any of the following characters:

  • X'0A' (LF: line feed)
  • X'0D' (CR: carriage return)
  • X'1A' (EOF: end-of-file)

If you use device-dependent (platform-specific) control codes in your programs or files, these control codes can cause problems when you try to port the programs or files to platforms that do not support the control codes. As with all other platform-specific code, it is best to isolate such code as much as possible so that you can replace it easily when you move the application to another platform.