Defining Programs
Use this procedure to define a program through the Program Definition form
To define a program
- On the Program Definition form, highlight the program whose characteristics you wish to modify.
- Press Define (F6).
-
From the Define menu, choose Program.
The Define Program form appears, showing the definition for the program that was highlighted.
Note: You can open a blank Define Program form by pressing Insert (F8) from the Program Definition form. -
In the following fields, type or select the following
information.
Field Description Product Line The product line for the program.
Note: If you are using multiple data areas and data IDs within a product line, you can enter a data area or a data ID instead of a product line. You will still be accessing the same program definition as if you had entered the product line that the data area or data ID is associated with. The difference is that if you run the program from within pgmdef, you will be accessing only the data associated with the data area or data ID. If you enter a product line, you will be accessing the data from the data area with the same as the product line.System Code The system code for the program. Program Code The program code.
The program code for a form must have four characters. The program code for a batch program must have five characters. For a description of the Lawson standards for program codes, see What Is a Program Code?.
Program Type An online program (Online Inquiry, Online Update, or Menu).
- or -
A batch program (Batch Report, Batch Update, or Import/Export).
For a description of each program type, see What Is a Program Code?.
Note: Environment 4GL users can select Online Inquiry, Batch Report, or Import and Export only.Program Name The name of the program you are defining. Allow Generation For The language or languages into which the program can be generated.
-
Press Select (F4).
-
Press Mark to choose one or more languages into which you want to generate this program.
-
Press Mark again to deselect a language.
-
Press OK to close the select window.
If you do not select a language, the value of the Allow Generation For field is None.
In Production On The target machine where the program is to be in production.
-
Press Select (F4).
-
Press Mark to choose the target machine or machines on which this form or report is in production.
-
Press Mark again to deselect a target machine.
-
Press OK to close the select window.
The program is now considered a production program.
Because you cannot generate a production program, you should not select a target machine for a program that has not yet been generated.
If you do not select a target machine, the value of the In Production On field is None.
Note: You cannot change an Application Development Workbench program in Program Definition if it is in production. You can take it out of production (that is, change the In Production On field back to None), and then make changes.When you put an Environment 4GL program in production, you can no longer access it through Query Definition.
Cluster Node (Online programs only) Select the cluster node where you want this program to reside (for distributed computing systems). Run Type Select Prototyped, Four G/L, or Prototyped and 4G/L.
Prototyped allows the program to be run interpretively.
Four G/L allows the program to be run only after a successful compilation.
Prototyped and 4G/L generates both versions, and every time a user launches the program, through either pgmdef or lapm, the user has the option to run either version. This is useful for continuing development on a prototype and letting users try out the prototype without affecting the compiled version.
Number of Users Per Process (Online programs only) The maximum number of users that may use the same lacobrts (Lawson COBOL Run Time System) process for a program before another is started. Execute (Batch programs only) Whether only one or more than one job for the batch program can run at the same time. Select Concurrently if you want to allow more than one job to run the program at the same time. Select Non Concurrently if you want to allow only one job at a time to run the program.
Note: Do not change this value for Lawson-delivered programs from Non Concurrently to Concurrently unless you are certain that multiple simultaneous jobs for the same program will cause no harm.Can Be Accessed via INVOKE Select Yes or No, depending on whether this program can be called from another program through an INVOKE. Executable (Online programs only) For Lawson use only. -
-
Press OK twice.
The system automatically adds the form IDs for any online inquiry, online update, batch report, batch update, and import and export programs you define to the Application IDs form. The system adds the form IDs for any menu programs you define on the Menu IDs form.
At this point, the program is a shell. The form is defined through the painting process.
-
For online or batch programs, paint the form. For instructions, see Selecting the Primary File.
-
For import and export programs, select the files you want to import or export, then define parameters and selection criteria to import or export specific records from the files. For instructions, see Selecting the Primary File.
-
For menu programs, select the programs you want on the menu. For instructions, see Defining a Menu Program.
-