Simple CL program

199 Views


This example is a CL program that calls several programs.

A CL program or procedure can be as simple or as complex as you want.

To consolidate several activities normally done by the system operator at the beginning of the day (to call programs A, B, and C, for example), you can create a CL procedure called STARTUP with the following code:

PGM /* STARTUP */
CALL PGM(A)
CALL PGM(B)
CALL PGM(C)
ENDPGM

First enter the CL source, then create the program and then run the program.

 

To enter CL source, follow these steps:

1. Type command WRKMBRPDM and F6, then specify source member STARTUP, CLLE as Type. (This option creates a source member named STARTUP that will also be the name of the program.)

2. Specify CLLE in the Type field and press the Enter key.

3. On the SEU display, use the I (insert) line command to enter the CL commands (CALL is a CL command).

When you have finished entering the source statements, Press F3 to exit from SEU. Then take 14 on the member to compile.

Common commands used in CL programs and procedures

The list contains the commands frequently used in CL programs and procedures. You can use this list to select the appropriate command for the function you want.

 

Post Comments