This section contains a summary of general information needed to
properly code CL commands.
Delimiters
- Blanks are the basic separators between the parts of a command:
- Between command label and command name (not required, because the colon
[:] is the delimiter).
- Between command name and first parameter, and between parameters.
- Between values in a list of values (not required between ending and beginning
parentheses that enclose nested lists inside a list).
- Between the slashes and the name or label of some job control commands,
like // DATA (not required).
- Blanks cannot separate a parameter's keyword from the left parenthesis
preceding its values. When a keyword is used, parentheses must be used to
enclose the values; blanks can occur between the parentheses and the
values. For example, KWD( A ) is valid.
- Multiple blanks are treated as a single blank, unless they occur in a
quoted string or a comment.
- A colon must immediately follow a command label. Only one label can be
used on any command (LABEL1: DCLF).
- Apostrophes must be used to specify the beginning and end of a quoted
character string. If a character string contains special characters, such
as blanks, apostrophes are required. If an apostrophe must be used in the
quoted string, two apostrophes must be entered consecutively to indicate that
it is an apostrophe and not the end of the quoted string.
- Parentheses must be used:
- On parameters that are specified (coded) in keyword form
- To group multiple values in a single list, in a positional parameter,
or around expressions
- To indicate a list (of none, one, or several elements) nested inside another list
- Sets of parentheses inside parentheses can be entered as long as they
are paired, up to the maximum of five nested levels in logical expressions
or three nested levels in lists of values.
- Comments can appear wherever blanks are permitted, except after a continuation
character on the same line or record.
- A plus or minus sign at the end of a line indicates that the command is
continued on the following line. Blanks following a + or - sign in the same
record are ignored; blanks in the next record that precede the first non-blank
character are ignored when + is specified and included when - is specified.
One blank must precede the + sign when it is used between separate parameters
or values.
Parameters
- All required parameters must be coded.
- If an optional parameter is not coded, the system uses its default value
if the parameter has one. A default value is indicated by showing the value
as bold and underlined text in the Choices column of the parameter summary
table.
- Words or abbreviations specified in capital letters in the command and
parameter descriptions must be coded as shown. This is true of all command
names, the keywords of parameters (if used), and many parameter values. Lowercase
letters not coded in quoted strings or in comments are translated to uppercase
letters. Lowercase letters specified for values on parameters defined as CASE(*MIXED)
are not translated to uppercase letters.
- If there are key parameters, the values for the key parameters must be
entered on the prompt before the remaining parameters will be shown. The
Notes column in the parameter summary table indicates which parameters, if
any, are key parameters.
- Parameters cannot be coded in positional form past the positional parameter
limit defined in the command object. The Notes column in the parameter summary
table indicates which parameters may be specified in positional form.
Parameter Values
- The first character in all names must be an alphabetic character (A through
Z, $, #, @, or a double quotation mark (")). Names must not exceed 10 characters
(CL variable names and built-in function names can have 11 characters maximum,
including the preceding & or % characters). In some commands, the names
of objects can be specified in qualified form (library-name/object-name) or
in path name form (directory-name/object name).
- Predefined values that begin with an asterisk can be used only for the
purposes intended, unless they are included in comments or quoted strings.
These include predefined parameter values (*ALL, for example), symbolic operators
(*EQ, for example), and the null value (*N).
- In a CL program, a variable can be specified for all parameters, except
where that is explicitly restricted. The user-specified value of the variable
is passed as if it had been specified on the command.
- In a CL program, a character string expression can be specified for any
parameter defined with EXPR(*YES). The resulting value of the expression is
passed as if the value had been specified on the command.
- Null (omitted) values are specified with the characters *N, which mean
that no value was specified and the default value, if one exists, should be
used. *N is needed only when another value following the omitted value is
being specified as a positional parameter or an element in a list.
- Either a comma or a period can be used to indicate a decimal point in
a numeric value. The decimal point is the only special character allowed between
digits in the numeric string; there is no delimiter for indicating thousands.
- When repetition is indicated for a parameter:
- A predefined value is not coded more than once in a series of values.
- As many user-defined values (like names or numeric limits) can be entered
as there are different values or names, up to the maximum number of repetitions
allowed. For example, if a parameter description states "Up to 20 repetitions,"
you can specify a maximum of 20 values.
Note: When you are using parameters that have the same name in different
commands, the meaning of (and the values for) that parameter in each command
may be somewhat different. Refer to the correct command description for the
explanation of the parameter you are using.