Compiling under z/OS UNIX

Compile Enterprise COBOL programs under z/OS® UNIX by using the cob2 command. Under z/OS UNIX, you can compile any COBOL program that you can compile under z/OS. The object code generated by the COBOL compiler can run under z/OS.

About this task

As part of the compilation step, you define the files needed for the compilation, and specify any compiler options or compiler-directing statements that are necessary for your program and for the output that you want.

The main job of the compiler is to translate COBOL programs into language that the computer can process (object code). The compiler also lists errors in source statements and provides supplementary information to help you debug and tune programs.