157 lines
11 KiB
HTML
157 lines
11 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="Parameter types" />
|
||
<meta name="abstract" content="This describes parameter types, including parameter types only for IBM-supplied commands." />
|
||
<meta name="description" content="This describes parameter types, including parameter types only for IBM-supplied commands." />
|
||
<meta name="DC.subject" content="parameter, defining, type, passing, parameter value to CPP, decimal value, decimal (*DEC), logical value, logical (*LGL), character value, character (*CHAR), name, name (*NAME), path name value, path name (*PNAME), generic name, generic name (*GENERIC), century digit, parameter value to CPP (command processing program), date, date (*DATE), parameter value to CPP, time (*TIME), integer (*INTn), null (*NULL), statement label, parameter value to CPP, variable, variable name (*VARNAME)" />
|
||
<meta name="keywords" content="parameter, defining, type, passing, parameter value to CPP, decimal value, decimal (*DEC), logical value, logical (*LGL), character value, character (*CHAR), name, name (*NAME), path name value, path name (*PNAME), generic name, generic name (*GENERIC), century digit, parameter value to CPP (command processing program), date, date (*DATE), parameter value to CPP, time (*TIME), integer (*INTn), null (*NULL), statement label, parameter value to CPP, variable, variable name (*VARNAME)" />
|
||
<meta name="DC.Relation" scheme="URI" content="defpr.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="prtyp" />
|
||
<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>Parameter types</title>
|
||
</head>
|
||
<body id="prtyp"><a name="prtyp"><!-- --></a>
|
||
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
<h1 class="topictitle1">Parameter types</h1>
|
||
<div><p>This describes parameter types, including parameter types only
|
||
for IBM-supplied commands.</p>
|
||
<p>The basic parameter types are (parameter TYPE value given in parentheses):
|
||
</p>
|
||
<ul><li>Decimal (*DEC). The parameter value is a decimal number, which is passed
|
||
to the command processing program as a packed decimal value of the length
|
||
specified on the LEN parameter. Values specified with more fractional digits
|
||
than defined for the parameter are truncated.</li>
|
||
<li>Logical (*LGL). The parameter value is a logical value, '1' or '0', which
|
||
is passed to the command processing program as a character string of length
|
||
1 (<samp class="codeph">F1</samp> or <samp class="codeph">F0</samp>).</li>
|
||
<li>Character (*CHAR). The parameter value is a character string, which can
|
||
be enclosed in apostrophes and which is passed to the command processing program
|
||
as a character string of the length specified on the LEN parameter. The value
|
||
is passed with its apostrophes removed, is left-justified, and is padded with
|
||
blanks.</li>
|
||
<li>Name (*NAME). The parameter value is a character string that represents
|
||
a basic name. The maximum length of the name is 256 characters. The first
|
||
character is alphabetic (A-Z), $, #, or @. The remaining characters are the
|
||
same as the first character, but can also include the numbers 0 through 9,
|
||
underscores (_), and periods (.). The name can also be a string of characters
|
||
that begin and end with double quotation marks ("). The system passes the
|
||
value to the command processing program as a character string of the length
|
||
specified in the LEN parameter. The value is left-justified and padded with
|
||
blanks. Normally, you use the *NAME type for object names. If you can enter
|
||
a special value such as *LIBL or *NONE for the name parameter, you must describe
|
||
the special value on the SPCVAL parameter. Then, if the display station user
|
||
enters one of the allowed special values for the parameter, the system bypasses
|
||
the rules for name verification.</li>
|
||
<li>Simple name (*SNAME). The parameter value is a character string that
|
||
follows the same naming rules as *NAME, except that no periods (.) are allowed.</li>
|
||
<li>Communications name (*CNAME). The parameter value is a character string
|
||
that follows the same naming rules as *NAME, except that no periods (.) or
|
||
underscores (_) are allowed.</li>
|
||
<li>Path name (*PNAME). The parameter value is a character string, which
|
||
can be enclosed in apostrophes and which is passed to the command processing
|
||
program as a character string of the length specified on the LEN parameter.
|
||
The value is passed with its apostrophes removed, is left-justified, and
|
||
is padded with blanks.</li>
|
||
<li>Generic name (*GENERIC). The parameter value is a generic name, which
|
||
ends with an asterisk (*). If the name does not end with an asterisk, then
|
||
the generic name is assumed to be a complete object name. A generic name identifies
|
||
a group of objects whose names all begin with the characters preceding the
|
||
asterisk. For example, INV* identifies the objects whose names begin with
|
||
INV, such as INV, INVOICE, and INVENTORY. The generic name is passed to the
|
||
command processing program so that it can find the object names beginning
|
||
with the characters in the generic name.</li>
|
||
<li>Date (*DATE). The parameter value is a character string that is passed
|
||
to the command processing program. The character string uses the format <samp class="codeph">cyymmdd</samp> (<samp class="codeph">c</samp> =
|
||
century digit, <samp class="codeph">y</samp> = year, <samp class="codeph">m</samp> = month, <samp class="codeph">d</samp> =
|
||
day). The system sets the century digit based on the year specified on the
|
||
date parameter for the command. If the specified year contained 4 digits,
|
||
the system sets the century digit to 0 for years that start with 19. The system
|
||
sets the century digit to 1 for years that start with 20. For years that are
|
||
specified with 2 digits, the system sets the century digit to 0 if yy equals
|
||
a number from 40 to 99. However, if yy equals a number from 00 through 39,
|
||
the system sets the century digit to 1. The user must enter the date on the
|
||
date parameter of the command in the format that is specified by the date
|
||
format (DATFMT) job attribute. The date separator (DATSEP) job attribute determines
|
||
the optional separator character to use for entering the date. Use the Change
|
||
Job (CHGJOB) command to change the DATFMT and DATSET job attributes . The
|
||
program reads dates with 2–digit years to be in the range of January 1, 1940,
|
||
to December 31, 2039. Dates with 4–digit years must be in the range of August
|
||
24, 1928, to May 9, 2071.</li>
|
||
<li>Time (*TIME). The parameter value is a character string. The system passes
|
||
this string to the command processing program in the format <samp class="codeph">hhmmss</samp> (<samp class="codeph">h</samp> =
|
||
hour, <samp class="codeph">m</samp> = minute, <samp class="codeph">s</samp> = second). The time
|
||
separator (TIMSEP) job attribute determines the optional separator to use
|
||
for entering the time. Use the Change Job (CHGJOB) command to change the TIMSEP
|
||
job attribute.</li>
|
||
<li>Hexadecimal (*HEX). The parameter value is a hexadecimal value. The
|
||
characters specified must be 0 through F. The value is passed to the CPP
|
||
as hexadecimal (EBCDIC) characters (2 hexadecimal digits per byte), and is
|
||
right adjusted and padded with zeros. If the value is enclosed in apostrophes,
|
||
an even number of digits is required.</li>
|
||
<li>Zero elements (*ZEROELEM). The parameter value is considered to be a list
|
||
of zero elements for which no value can be specified in the command. This
|
||
parameter type is used to prevent a value from being entered for a parameter
|
||
that is a list even though the command processing program (CPP) expects a
|
||
value. For example, if two commands use the same CPP, one command could pass
|
||
a list for a parameter, and the other command may not have any values to pass.
|
||
The parameter for the second command would be defined with TYPE(*ZEROELEM).</li>
|
||
<li>Integer (*INT2 or *INT4). The parameter value is an integer that is passed
|
||
as a 2-byte or 4-byte signed binary number. You can declare binary numbers
|
||
in a CL procedure or program as variables of TYPE(*INT). You can also use
|
||
TYPE(*CHAR) and process them with the %BINARY built-in function.</li>
|
||
<li>Unsigned integer (*UINT2 or *UINT4). The parameter value is an integer
|
||
that is passed as a 2-byte or 4-byte unsigned binary number. You can declare
|
||
binary numbers in a CL procedure or program as variables of TYPE(*UINT). You
|
||
can also use TYPE(*CHAR) and process them with the %BINARY built-in function.</li>
|
||
<li>Null (*NULL). The parameter value is a null pointer, which is always passed
|
||
to the command processing program as a place holder. The only PARM keywords
|
||
valid for this parameter type are KWD, MIN, and MAX.</li>
|
||
<li>Command string (*CMDSTR). The parameter value is a command. You can use
|
||
CL variables to specify parameters in the command that are specified in the
|
||
*CMDSTR parameter. However, you cannot use them to specify the entire *CMDSTR
|
||
parameter. For example, "SBMJOB CMD(DSPLIB LIB(&LIBVAR))" is valid in
|
||
a CL Program or procedure, but "SBMJOB CMD(&CMDVAR)" is not.</li>
|
||
<li>Statement label. The statement label identifies the first of a series
|
||
of QUAL or ELEM statements that further describe the qualified name or the
|
||
mixed list being defined by this PARM statement.</li>
|
||
</ul>
|
||
<p>The following parameter types are for IBM-supplied commands only. </p>
|
||
<ul><li>Expression (*X). The parameter value is a character string, variable
|
||
name, or numeric value. The value is passed as a numeric value if it contains
|
||
only digits, a plus or minus sign, and/or a decimal point; otherwise, it is
|
||
passed as a character string.</li>
|
||
<li>Variable name (*VARNAME). The parameter value is a variable name, which
|
||
is passed to the command processing program as a character string. The value
|
||
is left-justified and is padded with blanks. A variable is a name that refers
|
||
to an actual data value during processing. A variable name can be as long
|
||
as 10 alphanumeric characters (the first of which must be alphabetic) preceded
|
||
by an ampersand (&); for example, &PARM. If the name of your variable
|
||
does not follow the naming convention used on i5/OS™, you must enclose the name in apostrophes.</li>
|
||
<li>Command (*CMD). The parameter value is a command. For example, the CL
|
||
command IF has a parameter named THEN whose value must be another command.</li>
|
||
</ul>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="defpr.htm" title="To define a parameter, you must use the PARM statement.">Define parameters</a></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |