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

99 lines
6.7 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="Use CL or HLL for mixed lists" />
<meta name="abstract" content="This describes the format in which elements in a mixed list are passed when a command is run using CL or a high-level language." />
<meta name="description" content="This describes the format in which elements in a mixed list are passed when a command is run using CL or a high-level language." />
<meta name="DC.subject" content="high-level language (HLL) program, mixed list, HLL (high-level language) program, using CL or HLL for, list, CL or HLL for mixed" />
<meta name="keywords" content="high-level language (HLL) program, mixed list, HLL (high-level language) program, using CL or HLL for, list, CL or HLL for mixed" />
<meta name="DC.Relation" scheme="URI" content="dmlst.htm" />
<meta name="DC.Relation" scheme="URI" content="defpr.htm" />
<meta name="DC.Relation" scheme="URI" content="clpro.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="rbafnmst-gen53" />
<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>Use CL or HLL for mixed lists</title>
</head>
<body id="rbafnmst-gen53"><a name="rbafnmst-gen53"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use CL or HLL for mixed lists</h1>
<div><p>This describes the format in which elements in a mixed list are
passed when a command is run using CL or a high-level language.</p>
<div class="section"> <p>When a command is run using CL or HLL, the elements in a mixed
list are passed to the command processing program in the following format:</p>
<br /><img src="rbafn513.gif" alt="When a command is run using CL or HLL, the elements in a mixed list are passed to the command processing program in the this format." /><br /><p>The number of values in the
mixed list is passed as a binary value of length 2. This value always indicates
how many values have been defined for the mixed list, not how many were actually
entered on the command. This value may be 1 if the SNGVAL parameter is entered
or is passed as the default value. If the user does not enter a value for
an element, a default value is passed. The elements are passed by their types
just as single parameter values are passed. For example, if, in the previous
example the user enters a comparison value of QCMDI for the CMPVAL parameter,
but does not enter a value for the starting position, whose default value
is 1, the following is passed.</p>
<br /><img src="rbafn514.gif" alt="Example of what is passed if, in the previous example the user enters a comparison value of QCMDI for the CMPVAL parameter, but does not enter a value for the starting position, whose default value is 1." /><br /><p>The data QCMDI is passed
as an 80-character value that is left-adjusted and padded with blanks. The
number of elements is sent as a binary value of length 2.</p>
<p>When the display
station user enters a single value or when a single value is the default for
a mixed list, the value is passed as the first element in the list. For example,
if the display station user enters *ANY as a single value for the parameter,
the following is passed.</p>
<br /><img src="rbafn515.gif" alt="The following is passed if the display station user enters *ANY as a single value for the parameter." /><br /><p>*ANY is passed as an 80-character
value that is left-adjusted and padded with blanks.</p>
<p>Mixed lists can
be processed in CL programs. Unlike simple lists, the binary value does not
need to be tested to determine how many values are in the list because this
value is always the same for a given mixed list unless the SNGVAL parameter
was passed to the command processing program. In this case, the value is
1. If the command is entered with a single value for the parameter, only
that one value is passed. To process the mixed list in a CL procedure, you
must use the substring built-in function.</p>
<p>In one case,
only a binary value of 0000 is passed as the number of values for a mixed
list. If no default value is defined on the PARM statement for an optional
parameter and the first value of the list is required (MIN(1)), then the parameter
itself is not required; but if any element is specified the first element
is required. In this case, if the command is entered without specifying a
value for the parameter, the following is passed.<br /><img src="rbafn512.gif" alt="Example of what is passed if the command is entered without specifying a value for the parameter." /><br /></p>
<p>An example of such a
parameter is: </p>
<pre> PARM KWD(KWD1) TYPE(E1) MIN(0)
E1: ELEM TYPE(*CHAR) LEN(10) MIN(1)
ELEM TYPE(*CHAR) LEN(2) MIN(0)</pre>
<p>If this parameter were to be processed by a CL procedure, the
parameter value could be received into a 14-character CL variable. The first
2 characters could be compared to either of the following: </p>
<ul><li>a 2-character variable initialized to hex 0000 using the %SUBSTRING function.</li>
<li>a decimal 0 using the %BINARY built-in function.</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dmlst.htm" title="A mixed list accepts a set of separately defined values.">Define a mixed list</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="clpro.htm" title="This provides tasks and concepts specific to CL programming.">CL programming</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="defpr.htm" title="To define a parameter, you must use the PARM statement.">Define parameters</a></div>
</div>
</div>
</body>
</html>