142 lines
7.7 KiB
HTML
142 lines
7.7 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="Define lists for parameters" />
|
|
<meta name="abstract" content="You can define a parameter to accept a list of values instead of just a single value." />
|
|
<meta name="description" content="You can define a parameter to accept a list of values instead of just a single value." />
|
|
<meta name="DC.subject" content="parameter, defining, with simple list, parameter value, list of, list, passing, parameter value to CPP, list of parameter value, list for parameter, command definition, simple list with, simple list, list of parameter value, simple" />
|
|
<meta name="keywords" content="parameter, defining, with simple list, parameter value, list of, list, passing, parameter value to CPP, list of parameter value, list for parameter, command definition, simple list with, simple list, list of parameter value, simple" />
|
|
<meta name="DC.Relation" scheme="URI" content="defcm.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="dslst.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="dmlst.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="dlist.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="dqnam.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="ddrel.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="pmtpc.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="dflst" />
|
|
<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>Define lists for parameters</title>
|
|
</head>
|
|
<body id="dflst"><a name="dflst"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Define lists for parameters</h1>
|
|
<div><p>You can define a parameter to accept a list of values instead of
|
|
just a single value.</p>
|
|
<div class="section"> <p> You can define the following types of lists: </p>
|
|
<ul><li>A simple list, which allows one or more values of the same type to be
|
|
specified for a parameter</li>
|
|
<li>A mixed list, which allows a set of separately defined values to be specified
|
|
for a parameter</li>
|
|
<li>A list within a list, which allows a list to be specified more than once
|
|
for a parameter or which allows a list to be specified for a value within
|
|
a mixed list</li>
|
|
</ul>
|
|
<p>The following sample command source illustrates the different types
|
|
of lists: </p>
|
|
<pre> CMD PROMPT('Example of lists command')
|
|
|
|
|
|
|
|
/* THE FOLLOWING PARAMETER IS A SIMPLE LIST. IT WILL ACCEPT UP TO */
|
|
/* 5 NAMES. */
|
|
PARM KWD(SIMPLST) TYPE(*NAME) LEN(10) DFT(*ALL) +
|
|
SPCVAL((*ALL)) MAX(5) PROMPT('Simple list +
|
|
of up to 5 names')
|
|
|
|
|
|
/* THE FOLLOWING PARAMETER IS A MIXED LIST OF 3 VALUES, EACH OF A */
|
|
/* DIFFERENT TYPE AND/OR LENGTH. EACH ELEMENT MAY NOT BE REPEATED. */
|
|
PARM KWD(MXDLST) TYPE(MLSPEC) PROMPT('This is a +
|
|
mixed list of 3 val')
|
|
MLSPEC: ELEM TYPE(*CHAR) LEN(4) PROMPT('Elem 1 of 3')
|
|
ELEM TYPE(*DEC) LEN(3 0) PROMPT('Second of three')
|
|
ELEM TYPE(*CHAR) LEN(10) PROMPT('Last of three +
|
|
elements')
|
|
|
|
|
|
/* THE FOLLOWING PARAMETER IS A LIST WITHIN A LIST. IT CONTAINS A */
|
|
/* LIST OF UP TO 2 ELEMENTS, WHICH MAY BE REPEATED UP TO 3 TIMES. */
|
|
PARM KWD(LWITHINL1) TYPE(LWLSPECA) MAX(3) +
|
|
PROMPT('Repeatable list of 2 elements')
|
|
LWLSPECA: ELEM TYPE(*CHAR) LEN(10) PROMPT('1st part of +
|
|
repeatable list')
|
|
ELEM TYPE(*DEC) LEN(5 0) PROMPT('2nd part of +
|
|
repeatable list')
|
|
|
|
|
|
/* THE FOLLOWING PARAMETER IS A LIST WITHIN A LIST. IT CONTAINS A */
|
|
/* LIST OF UP TO 2 ELEMENTS, THE FIRST OF WHICH MAY BE REPEATED */
|
|
/* UP TO 3 TIMES. */
|
|
PARM KWD(LWITHINL2) TYPE(LWLSPECB) MAX(1) +
|
|
PROMPT('Repeated simple within mixed')
|
|
LWLSPECB: ELEM TYPE(*CHAR) LEN(10) MAX(3) PROMPT('Simple +
|
|
list within a list')
|
|
ELEM TYPE(*DEC) LEN(5 0) PROMPT('Single parm +
|
|
within a list')</pre>
|
|
<p>The following display shows the prompt for the
|
|
preceding sample command:</p>
|
|
<div class="fignone"><pre class="screen"> Example of lists command (LSTEXAMPLE)
|
|
|
|
Type choices, press Enter.
|
|
|
|
Simple list of up to 5 names . . SIMPLST *ALL
|
|
+ for more values
|
|
This is a mixed list of 3 val MXDLST
|
|
Elem 1 of 3 . . . . . . . . .
|
|
Second of three . . . . . . .
|
|
Last of three elements . . . .
|
|
Repeatable list of 2 elements LWITHINL1
|
|
1st part of repeatable list .
|
|
2nd part of repeatable list .
|
|
+ for more values
|
|
Repeatable simple within mixed LWITHINL2
|
|
Simple list within a list . .
|
|
+ for more values
|
|
Single parm within a list . .
|
|
|
|
|
|
|
|
Bottom
|
|
F3=Exit F4=List F5=Refresh F12=Cancel F13=Prompter help
|
|
F24=More keys </pre>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="dslst.htm">Define a simple list</a></strong><br />
|
|
A simple list can accept one or more values of the type specified by the parameter.</li>
|
|
<li class="ulchildlink"><strong><a href="dmlst.htm">Define a mixed list</a></strong><br />
|
|
A mixed list accepts a set of separately defined values.</li>
|
|
<li class="ulchildlink"><strong><a href="dlist.htm">Define lists within lists</a></strong><br />
|
|
A list within a list can be either a list that can be specified more than once for a parameter (simple or mixed list), or a list that can be specified for a value within a mixed list.</li>
|
|
<li class="ulchildlink"><strong><a href="dqnam.htm">Define a qualified name</a></strong><br />
|
|
A qualified name is the name of an object preceded by the name of the library in which the object is stored.</li>
|
|
<li class="ulchildlink"><strong><a href="ddrel.htm">Define a dependent relationship</a></strong><br />
|
|
A dependent relationship is a required relationship between parameters.</li>
|
|
<li class="ulchildlink"><strong><a href="pmtpc.htm">Possible choices and values</a></strong><br />
|
|
This describes how choices and values for parameters are defined.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="defcm.htm" title="This describes how you can define and create your own commands.">Define commands</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |