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.
Steps involved in Compiling:
- 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.
- The resulting object files must be linked together into a single program file.
- An object file cannot contain more than one program.
- Object module is the input for link-edit, which ends up in an executable module known as Load Module.
- 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.
- The compiler translates your COBOL program into language that the computer can process (object code).
- Use compiler-directing statements and compiler options to control your compilation.
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!