19 Work with Model Control Language Programs

This chapter contains these topics:

Control language (CL) is the primary interface between the system programmer and the AS/400 operating system. A command is a single control language statement. A series of commands can serve as source statements you can use to create a CL program. You compile the commands into a program the system calls whenever it needs the functions the program provides.

JD Edwards World provides you with a series of model CL programs that you can copy and change to call the CASE programs that you develop. You must use a CL program to add an RPG program as an option on a JD Edwards World menu.

You use the Source Entry Utility (SEU) to change the source code for your CL programs. When adding a new CL program using SEU, you can copy the JD Edwards World model CLs and tailor their specifications to fit your needs.

Note:

You can view only the source code if the source code resides on your machine.

19.1 Working with CL Models

To copy a model CL

  1. On Software Versions Repository, locate a model.

  2. Enter 3 in the Option field next to the program.

  3. Click Enter in the Copy Source Prompt window.

  4. On Software Versions Repository, enter 2 in the Option field next to the program.

    The source code displays.

  5. On the Source Entry Utility, enter the new program name.

    The following illustrates the source code for J98MODEL1 using the program Help. You can also view the code using the Software Versions Repository.

    Figure 19-1 Source Code for J98MODEL1 screen

    Description of Figure 19-1 follows
    Description of "Figure 19-1 Source Code for J98MODEL1 screen"

To customize a CL model

  1. On the Source Entry Utility, locate the lines that contain lower-case xx and make changes.

    The lines in the model that require changing contain lower-case xx. This design allows you to easily scan the code for the xx and enter your changes.

  2. Exit and save the CL program.

  3. Compile the program.

19.2 JD Edwards World Model CL Programs

JD Edwards World includes a series of model CL programs that you can copy and customize to meet your programming needs. The following table describes each model CL program.

Model CL Programs Description
J98MODEL1 Serves as a template for all interactive programs that do not retrieve processing options in the CL code.
J98MODEL2 Serves as a template for batch programs that need the DREAM Writer but have no printer file.
J98MODEL3 Serves as a template for interactive programs that need a prompt for parameters.
J98MODEL4 Serves as a template for either batch or interactive programs that require the retrieval of processing options in the CL code, but do not require DREAM Writer selection or sequencing.
J98MODEL5 Serves as a template for batch CL programs that call report programs with fixed selection and sequencing while still passing all printer file overrides, processing options, and page-heading functions to the RPG report program.
J98MODEL6 Serves as a template for batch CL programs that require all DREAM Writer functions and call multiple print programs over the same OPNQRYF access path.
J98MODEL7 Serves as a template for batch CL programs that require all DREAM Writer functions and call multiple print programs over the same OPNQRYF access path.
J98MODEL8 Serves as a template for batch programs that have a control file.

You can create certain model CL programs using the Quick Start CL Generator. See Chapter 25, "Work with Quick Start CL Generator" for more information.