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

163 lines
9.8 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="task" />
<meta name="DC.Title" content="CL or HLL command processing program" />
<meta name="abstract" content="This topic describes the command processing program for CL or HLL." />
<meta name="description" content="This topic describes the command processing program for CL or HLL." />
<meta name="DC.subject" content="relationship, PARM statement and DCL command, part of command definition, Create Command (CRTCMD) command, CRTCMD (Create Command) command, *INT4 value, *INT2 value, *UINT2, *UINT4" />
<meta name="keywords" content="relationship, PARM statement and DCL command, part of command definition, Create Command (CRTCMD) command, CRTCMD (Create Command) command, *INT4 value, *INT2 value, *UINT2, *UINT4" />
<meta name="DC.Relation" scheme="URI" content="wcppg.htm" />
<meta name="DC.Relation" scheme="URI" content="exdcc.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/crtcmd.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="wcpclhll" />
<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 or HLL command processing program</title>
</head>
<body id="wcpclhll"><a name="wcpclhll"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CL or HLL command processing program</h1>
<div><p>This topic describes the command processing program for CL or HLL.</p>
<div class="section"> <p>The figure below shows the relationship between the Create Command
(CRTCMD) command, the command definition statements, and the command processing
program for CL and high level languages (HLL).</p>
<div class="fignone" id="wcpclhll__cmdrel"><a name="wcpclhll__cmdrel"><!-- --></a><span class="figcap">Figure 1. Command
Relationships for CL and HLL</span><br /><img src="rbafn542.gif" alt="Command Relationships for CL and HLL" /><br /></div>
<p>If the command processing program is a program written in CL, the
variables that receive the parameter values must be declared to correspond
to the type and length specified for each PARM statement. The following shows
this correspondence.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" valign="bottom" width="25%" id="d0e58">PARM Statement Type</th>
<th align="left" valign="bottom" width="25%" id="d0e60">PARM Statement Length</th>
<th align="left" valign="bottom" width="25%" id="d0e62">Declared Variable Type</th>
<th align="left" valign="bottom" width="25%" id="d0e64">Declared Variable Length</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="25%" headers="d0e58 ">*DEC</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">x y<sup>1</sup></td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*DEC</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">x y<sup>1</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*LGL</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">1</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*LGL</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">1</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">≤n<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*NAME</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">≤n<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*CNAME</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">≤n<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*SNAME</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">≤n<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*GENERIC</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">≤n<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*CMDSTR</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">≤n<sup>2</sup></td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*DATE</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">7</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">7</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*TIME</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">6</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">6</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*INT2</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*INT or *CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">2</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*INT4</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*INT or *CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">4</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*UINT2</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*UINT or *CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">2</td>
</tr>
<tr><td align="left" valign="top" width="25%" headers="d0e58 ">*UINT4</td>
<td align="left" valign="top" width="25%" headers="d0e60 ">n</td>
<td align="left" valign="top" width="25%" headers="d0e62 ">*UINT or *CHAR</td>
<td align="left" valign="top" width="25%" headers="d0e64 ">4</td>
</tr>
<tr><td colspan="4" align="left" valign="top" headers="d0e58 d0e60 d0e62 d0e64 "><div class="note"><span class="notetitle">:</span> <dl><dt class="dlterm"><sup>1</sup></dt>
<dd>x equals the length and y is the number of decimal positions.</dd>
<dt class="dlterm"><sup>2</sup></dt>
<dd>For character variables, if the length of the value passed is greater
than the length declared, the value is truncated to the length declared. If
RTNVAL(*YES) is specified, the length declared must equal the length defined
on the PARM statement.</dd>
</dl>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p>A program written in CL used as a command processing program can
process binary values (such as *INT2 or *INT4). The program can receive these
values as character fields. In that case, the binary built-in function (%BINARY)
can be used to convert them to decimal values. Otherwise, the CL program can
declare them as integer variables.</p>
<p>The difference between *INT2 or *INT4
and *UINT2 or *UINT4 is that the *INT2 and *INT4 types are signed integers
and the *UINT2 and *UINT4 types are unsigned integers. The default value for
all integer types is 0. The *UINT2 and *UINT4 types have the same restrictions
as the *INT and *INT4 types. </p>
<div class="note"><span class="notetitle">Note:</span> The %BINARY built-in function is for
use with signed integers. There is no corresponding function for unsigned
integers.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="wcppg.htm" title="A command processing program (CPP) is a program that processes a command. This program performs some validity checking and processes the command so that the requested function is performed.">Write a command processing program or procedure</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="exdcc.htm" title="This contains examples of defining and creating commands.">Examples: Define and create commands</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/crtcmd.htm">Create Command (CRTCMD) command</a></div>
</div>
</div>
</body>
</html>