Generating a Program

The program generation process generates the COBOL program source code and any other files needed to compile and execute a program. Programs are only generated; there is no preparation or delivery. After generating the code, you must build a shell and compile the program shell. For instructions on building a shell, see Building a Shell. For instructions on compiling, see Compiling from Program Definition.

To generate programs

  1. From the Program Definition form, press Action (F4) and choose Generate.

    - or -

    (4GL) From the Environment 4GL menu, choose Programmer Utilities, then Generate Lawson 4GL Program. Then choose Program Generation.

    - or -

    (ADW) From the Application Development Workbench menu, choose Programmer Utilities, then Generate Lawson 4GL Program. Then choose Program Generation.

  2. Press Enter.

    The Program Generation form appears.

  3. In the following fields, type or select the following information.
    Field Description
    Program Options c Compile Program.
    d Generate for Delivery. Used only at Lawson.
    m Generate Environment 4GL Program. Used only at Lawson.
    n Do Not Exit On Error.
    p

    Preprocess.

    Determines which outside files (libraries) are necessary to generate a complete program and loads this information into the generator database.

    Product Line The product line of the program for which you want to generate source code.
    System Code The system code of the program for which you want to generate source code.
    Program Code(s)

    The program codes for which you want to generate source code. You can enter up to ten program codes.

    Leave these fields blank to generate source code for all programs in a system.

    Input/Output Options Optional. A command to display the output or redirect it to a file.
  4. Press OK.

    The system generates code for the target machine defined for the program.

    Command syntax: bldpgm [-cdmnp] productline systemcode [programcode…]

    Options -d and -m are used only at Lawson.