O'Reilly logo

Complete CL: The Definitive Control Language Programming Guide, Fourth Edition by Ron Hawkins, Doug Pence, Ted Holt, Kevin Forsythe, Ernie Malaga

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. A First Look at CL

What better way to begin a study of CL programming than by looking at a typical CL procedure?

The Parts of a CL Procedure

A procedure is a compilable set of CL commands. Dissecting and analyzing the various parts of a CL procedure serves as a good introduction to CL. Figure 2.1 shows a typical CL procedure. The lines that make up a CL procedure can be called CL statements or CL commands. The two terms are interchangeable.

Table 2.1. An example of typical CL procedure.

PGM PARM(&greeting) COPYRIGHT TEXT('(c) 2004, Kaiser Consulting, Inc.') DCL &greeting *CHAR 5 DCL &msg *CHAR 80 VALUE(' ') DCL &terminal *CHAR 10 DCL &user *CHAR 10 MONMSG cpf0000 begin: RTVUSRPRF *CURRENT RTNUSRPRF(&user) RTVJOBA JOB(&terminal) CHGVAR &msg ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required