TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

COBOL - Compile Process


The compilation is a process of converting the source code into object code(i.e. Machine understandable code).

Like other programming language, COBOL program also compiled first in order to execute the code. We need JCL to compile and exeute the code.

If you don't know what is JCL, Go to our JCL tutorial page to learn JCL.

image missing

Steps involved in Compiling:
  1. If the source program consists of a main program and one or more subprograms, then the main program and each subprogram must be compiled separately.

  2. The resulting object files must be linked together into a single program file.

  3. An object file cannot contain more than one program.

  4. Object module is the input for link-edit, which ends up in an executable module known as Load Module.

  5. The coder needs to define the data sets needed for the compilation and specify any compiler options necessary for the program and the desired output.

  6. The compiler translates your COBOL program into language that the computer can process (object code).

  7. Use compiler-directing statements and compiler options to control your compilation.

Note: This compile is only for simple COBOL program. Compile process is different for other COBOL programming like IMS, DB2 and CICS.

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal