ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/intpgm.htm

131 lines
8.3 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="CL programs and procedures" />
<meta name="abstract" content="CL programs and procedures are created from source statements consisting entirely of control language commands. The commands are compiled into either an OPM program or an ILE module that can be bound into programs made up of modules written in CL or other languages." />
<meta name="description" content="CL programs and procedures are created from source statements consisting entirely of control language commands. The commands are compiled into either an OPM program or an ILE module that can be bound into programs made up of modules written in CL or other languages." />
<meta name="DC.subject" content="procedure, CL, CL procedure, description, control language (CL), used within CL, control language (CL) introduction, CL procedure" />
<meta name="keywords" content="procedure, CL, CL procedure, description, control language (CL), used within CL, control language (CL) introduction, CL procedure" />
<meta name="DC.Relation" scheme="URI" content="rbam6clconcepts.htm" />
<meta name="DC.Relation" scheme="URI" content="proce.htm" />
<meta name="DC.Relation" scheme="URI" content="clmod.htm" />
<meta name="DC.Relation" scheme="URI" content="clpr.htm" />
<meta name="DC.Relation" scheme="URI" content="clser.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="intpgm" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>CL programs and procedures</title>
</head>
<body id="intpgm"><a name="intpgm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CL programs and procedures</h1>
<div><p>CL programs and procedures are created from source statements consisting
entirely of control language commands. The commands are compiled into either
an OPM program or an ILE module that can be bound into programs made up of
modules written in CL or other languages.</p>
<p>Advantages of using CL programs and procedures include: </p>
<ul><li>Using CL programs and procedures is faster than entering and running the
commands individually.</li>
<li>CL programs and procedures provide consistent processing of the same set
of commands and logic.</li>
<li>Some functions require CL commands that cannot be entered individually
and must be part of a CL program or procedure.</li>
<li>CL programs and procedures can be tested and debugged like other high-level
language (HLL) programs and procedures.</li>
<li>Parameters can be passed to CL programs and procedures to adapt the operations
performed by the program or procedure to the particular requirements of that
use.</li>
<li>You can bind CL modules with other ILE high-level language modules into
a program.</li>
</ul>
<p>CL programs and procedures can be used for many kinds of applications.
For example, CL procedures can be used to: </p>
<ul><li>Provide an interface to the user of an interactive application through
which the user can request application functions without an understanding
of the commands used in the program or procedure. This makes the workstation
user's job easier and reduces the chances of errors occurring when commands
are entered.</li>
<li>Control the operation of an application by establishing variables used
in the application (such as date, time, and external indicators) and specifying
the library list used by the application. This ensures that these operations
are performed whenever the application is run.</li>
<li>Provide predefined routines for the system operator, such as procedures
to start a subsystem, to provide backup copies of files, or to perform other
operating functions. The use of CL programs and procedures reduces the number
of commands the operator uses regularly, and ensures that system operations
are performed consistently.</li>
</ul>
<p>Most of the CL commands provided by the system can be used in CL programs
and procedures. Some commands are specifically designed for use in CL programs
and procedures and are not available when commands are entered individually.
These commands include: </p>
<ul><li>Logic control commands that can be used to control which operations are
performed by the program or procedure according to conditions that exist when
the program or procedure is run. For example, <em>if</em> a certain condition
exists, <em>then do</em> certain processing, <em>else</em> do some other operation.
These logic operations provide both conditional and unconditional branching
within the CL program or procedure.</li>
<li>Data operations that provide a way for the program or procedure to communicate
with a workstation user. Data operations let the program or procedure send
formatted data to and receive data from the workstation, and allow limited
access to the database.</li>
<li>Commands that allow the program or procedure to send messages to the display
station user.</li>
<li>Commands that receive messages sent by other programs and procedures.
These messages can provide normal communication between programs and procedures,
or indicate that errors or other exceptional conditions exist.</li>
<li>The use of variables and parameters for passing information between commands
in the program or procedure and between programs and procedures.</li>
<li>Commands that call other procedures. (Procedures cannot be called from
the command line or in the batch job stream.)</li>
</ul>
<p>Using CL programs and procedures, applications can be designed with a separate
program or procedure for each function, and with a CL program or procedure
controlling which programs or procedures are run within the application. The
application can consist of both CL and other HLL programs or procedures. In
this type of application, CL programs or procedures are used to: </p>
<ul><li>Determine which programs or procedures in the application are to be run.</li>
<li>Provide system functions that are not available through other HLL languages.</li>
<li>Provide interaction with the application user.</li>
</ul>
<p>CL programs and procedures provide the flexibility needed to let the application
user select what operations to perform and run the necessary procedures.</p>
<p>There are four types of CL programs and procedures: procedure,
module, program, and service program.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="proce.htm">Procedure</a></strong><br />
A procedure is a set of self-contained high-level language statements that performs a particular task and then returns to the caller.</li>
<li class="ulchildlink"><strong><a href="clmod.htm">Module</a></strong><br />
A module is the object that results from compiling high-level language
source statements using an ILE (Integrated Language
Environment<sup>®</sup>) compiler. </li>
<li class="ulchildlink"><strong><a href="clpr.htm">Program</a></strong><br />
There are several different types of programs.</li>
<li class="ulchildlink"><strong><a href="clser.htm">Service program</a></strong><br />
A service program is an i5/OS™ object that contains one or more
modules. </li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbam6clconcepts.htm" title="This describes concepts useful when using control language (CL) commands.">CL concepts</a></div>
</div>
</div>
</body>
</html>