Compiling Programs

This is a general procedure for compiling programs. It includes the compiling not only of the main program source code but also the source code for supporting modules (such as those in binding directories), form or screen definitions, report definitions, and form and object rules.

For more information on compiling form or screen definitions, see Compiling a Form.

For more information on compiling report definitions, see Compiling a Report.

For more information on compiling form (screen) rules and object rules, see Compiling Form and Object Rules.

To compile programs

  1. Log into the appropriate Environment.
    1. If you installed Lawson Core Technology on an IASP, at the IBM i command prompt, type

      SETASPGRP IASPName

    2. At the IBM i command line, type

      CALL LAWENV

    3. Type the name of an Environment and press Enter.
  2. If you have made any changes to form rules or object rules, recompile the form and object rules. For more information, see Compiling Form and Object Rules.
  3. If you have made any changes to modules or to the source files referred to in copy statements within a module, compile the affected modules. Be sure to compile all changed or affected modules before proceeding to compile any programs. At the Qshell command line, type

    qcompile productline systemcode program/module

  4. If you have made any changes to form or screen definitions, compile the form or screen definitions. For more information on compiling form or screen definitions, see Compiling a Form.
  5. If you have made any changes to report definitions, compile the report definitions. For more information on compiling report definitions, see Compiling a Report.
  6. Compile the programs. For program source file to be compiled, at the Qshell command line, type

    qcompile productline systemcode program

    Note: Note If you are compiling programs because you have changed and recompiled a module, and if that module affects many programs, it might be easier to compile all programs. It could be difficult to determine all of the programs affected by a module. In this case, use rpgcmp.