ILE COBOL Programmer's Guide


Example of Compiling a Source Program into a Module Object

This example shows you how to create a ILE COBOL module object using the CRTCBLMOD command.

  1. To create a module object, type:
    CRTCBLMOD MODULE(MYLIB/XMPLE1)
    SRCFILE(MYLIB/QCBLLESRC)  SRCMBR(MYLIB/XMPLE1)
    OUTPUT(*PRINT)
    TEXT('My ILE COBOL Program on iSeries')
    CVTOPT(*FLOAT)
    

    The CRTCBLMOD command creates the module XMPLE1 in MYLIB, the same library which contains the source. The output option OUTPUT(*PRINT) specifies a compiler listing. The conversion option CVTOPT(*FLOAT) specifies that floating-point data types are brought into the program with their DDS names and a USAGE of COMP-1 (single-precision) or COMP-2 (double-precision).

  2. Type one of the following CL commands to view the compile listing.
    Note:
    In order to view a compiler listing you must have authority to use the commands listed below.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]