Running COBOL programs under z/OS UNIX

COBOL programs are supported under z/OS® UNIX.

In order to use COBOL under z/OS UNIX, the COBOL programs must be compiled with the Enterprise COBOL for z/OS compiler, COBOL for OS/390 & VM compiler or the COBOL for MVS & VM compiler, and the programs must be compiled with the RENT compiler option.

You can compile and link edit your COBOL programs in the z/OS UNIX shell with the cob2 command. The cob2 command is available with COBOL for OS/390 & VM V2R2 or Enterprise COBOL for z/OS.

Alternatively, you can compile your programs in TSO or batch and have the object module written to a z/OS UNIX file by using the PATH parameter instead of the DSNAME parameter for the SYSLIN DD. Once you have your object modules in a z/OS UNIX file, you can use the c89 utility to create an executable file.

When you want to use COBOL programs under z/OS UNIX, be aware of the following situations:

For more information about compiling, link-editing, and running COBOL programs in a z/OS UNIX shell environment, see the appropriate version of the programming guide in the COBOL library at Enterprise COBOL for z/OS library.