What Is the Program Definition Process?

The following diagram illustrates the program development process.

Defining a Program

Program Definition identifies the product line and system code for a program. During the definition phase, you specify the kind of program, the details of how it will run, and what kind of code may be generated from the Lawson 4GL source.

You can define your own programs for any Lawson product line and system code. You can paint and manipulate these programs exactly as you would a Lawson application or menu program. For instructions, see Defining Programs.

Painting a Form or Report

When you paint an online form, you define how the form looks and how it accesses and updates records in the database. Painting a form involves defining some or all of the following:

  • The fields that appear on the form and their characteristics (for example, default values).

  • The record access method you want to specify for the form.

  • Instructions that tell the form what action to perform (form actions and line actions).

  • Conditions that tell the form to access only certain records.

  • Communication between forms.

For instructions, see Online Programs.

Painting a report involves selecting the file to report on, choosing a sequence for the report, defining the structure of the report layout, and putting fields and text on the report. Painting a batch program or a report involves defining some or all of the following:

  • The order in which you want to access records

  • The fields

  • Standard headers and footers

  • Conditions that restrict access to specific fields or records

  • Totals and summaries

  • Parameters

For instructions, see Batch Programs.

Running a Program Interpretively

After you paint a program, you can run it interpretively; you do not have to compile it before you run it against the database. This lets you test the program and make changes before you generate the program into 4GL source code.

For instructions, see Running Programs Interpretively.

Generating Program Code Segments

Program generation is the computer process of translating the form or report you have designed into Lawson 4GL code segments that you can compile to run on the specified computer.

For instructions, see Generating a Program.

Compiling Programs, Rules, and Systems

Compiling a program, its form and object rules, or a system translates the Lawson 4GL code segments you have defined, painted, and generated into an executable (object) program.

For instructions, see Compiling from Program Definition.

Putting a Program into Production

Once a program is a production program (that is, the value of the In Production On field is not None), you cannot change it using Program Definition, and you cannot generate Lawson 4GL code segments for the program. This is a safety feature to keep you, or someone else, from accidentally overwriting the program. If you need to change the program, you must change the In Production On field back to None.

For instructions on putting a program into production, see Defining Programs.

Example of the Define Program Form

The following Program Definition example is for the program GL00. GL00 belongs to the DEV803 product line. This means it can access files only in that product line. The program is attached to the General Ledger (IF) system code. Although the program can access any file in the DEV803 product line, its primary access is the files attached to the IF system code. The program type is Online Update, and the program name is Chart of Accounts. You can generate the 4GL source code for GL00. Because GL00 is a production program, you cannot make changes to it and generate it.