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

102 lines
7.0 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="Use CL or HLL for a qualified name" />
<meta name="abstract" content="This describes the format in a qualified name is passed when a command is run using CL or a high-level language." />
<meta name="description" content="This describes the format in a qualified name is passed when a command is run using CL or a high-level language." />
<meta name="DC.subject" content="qualified name, using CL or HLL, command definition, example, command definition, processing, qualified name in a CL program, CL program, processing qualified name, processing in CL program, substring built-in function (%SUBSTRING), used to process qualified name, control language (CL), program, qualified name in CL program, %SST (substring) function, %SUBSTRING (substring) built-in function, processing qualified name, substring function, processing qualified name, passing to CPP" />
<meta name="keywords" content="qualified name, using CL or HLL, command definition, example, command definition, processing, qualified name in a CL program, CL program, processing qualified name, processing in CL program, substring built-in function (%SUBSTRING), used to process qualified name, control language (CL), program, qualified name in CL program, %SST (substring) function, %SUBSTRING (substring) built-in function, processing qualified name, substring function, processing qualified name, passing to CPP" />
<meta name="DC.Relation" scheme="URI" content="dqnam.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="defqlclhll" />
<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 a qualified name</title>
</head>
<body id="defqlclhll"><a name="defqlclhll"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use CL or HLL for a qualified name</h1>
<div><p>This describes the format in a qualified name is passed when a
command is run using CL or a high-level language.</p>
<div class="section"> <p>A qualified name is passed to the command processing program
in the following format when using CL or HLL:</p>
<br /><img src="rbafn519.gif" alt="A qualified name is passed to the command processing program in this format when using CL or HLL." /><br /><p>For example,
if the display station user enters <samp class="codeph">NAME(USER/A)</samp> for the previously
defined QUAL statements, the name is passed to the command processing program
as follows:</p>
<br /><img src="rbafn520.gif" alt="If the display station user enters NAME(USER/A) for the previously defined QUAL statements the name is passed to the command processing program." /><br /><p>Qualifiers are passed to
the command processing program consecutively by their types and length just
as single parameter values are passed (as described under <a href="defpr.htm#defpr">Define parameters</a>).
The separator characters (/) are not passed. This applies regardless of
whether a single parameter, an element of a mixed list, or a simple list of
qualified names is passed.</p>
<p>If the display station user enters a single
value for a qualified name, the length of the value passed is the total of
the length of the parts of the qualified name. For example, if you define
a qualified name with two values each of length 10, and if the display station
user enters a single value, the single value passed is left-adjusted and padded
to the right with blanks so that a total of 20 characters is passed. If the
display station user enters *NONE as the single value, the following 20-character
value is passed:</p>
<br /><img src="rbafn521.gif" alt="Example of what is passed if the display station user enters *NONE as the single value a 20-character value is passed." /><br /><p>Qualified names can be processed
in CL programs using the Substring built-in function as shown in the following
example.</p>
<p>The substring built-in function (%SUBSTRING or %SST) is used
to separate the qualified name into two values. </p>
<pre>PGM PARM(&amp;QLFDNAM)
DCL &amp;QLFDNAM TYPE(*CHAR) LEN(20)
DCL &amp;OBJ TYPE(*CHAR) LEN(10)
DCL &amp;LIB TYPE(*CHAR) LEN(10)
CHGVAR &amp;OBJ %SUBSTRING(&amp;QLFDNAM 1 10) /* First 10 */
CHGVAR &amp;LIB %SST(&amp;QLFDNAM 11 10) /* Second 10 */
.
.
.
ENDPGM</pre>
<p>You can then specify the qualified name in the proper CL syntax.
For example, <samp class="codeph">OBJ(&amp;LIB/&amp;OBJ)</samp>.</p>
<p>You can also
separate the qualified name into two values using the following method: </p>
<pre>PGM PARM(&amp;QLFDNAM)
DCL &amp;QLFDNAM TYPE(*CHAR) LEN(20)
CHKOBJ (%SST(&amp;QLFDNAM 11 10)/%SST(&amp;QLFDNAM 1 10)) *PGM
.
.
.
ENDPGM</pre>
<p>A simple list of qualified names is passed to the command processing
program in the following format:</p>
<br /><img src="rbafn522.gif" alt="A simple list of qualified names is passed to the command processing program in this format." /><br /><p>For example, assume that
MAX(3) were added as follows to the PARM statement for the NAME parameter.
</p>
<pre> PARM KWD(NAME) TYPE(NAME1) SNGVAL(*NONE) MAX(3)
NAME1: QUAL TYPE(*NAME)
QUAL TYPE(*NAME)</pre>
<div class="p">If the display station user enters the following: <pre>NAME(QGPL/A USER/B)</pre>
then the name parameter would be passed to the command processing
program as follows.</div>
<br /><img src="rbafn523.gif" alt="The name parameter would be passed to the command processing program." /><br /><p>If the display station user
enters the single value NAME(*NONE), the name parameter is passed as follows.</p>
<br /><img src="rbafn524.gif" alt="The name parameter is passed if the display station user enters the single value NAME(*NONE)." /><br /></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dqnam.htm" title="A qualified name is the name of an object preceded by the name of the library in which the object is stored.">Define a qualified name</a></div>
</div>
</div>
</body>
</html>