CL Command Reference - QUAL
CL Command List > QUAL Reference
Description:
The Qualifier (QUAL) command definition statement describes one part of a qualified name. If a name is the allowable value of a parameter or list item defined in a PARM or ELEM statement, it can be changed to a qualified name by using a QUAL statement for each qualifier used to qualify the name
The order in which the QUAL statements are entered into the source file determines the positional order in which the qualifiers must be specified and passed to the validity checker and the command processing program. The first qualification of a qualified name must be either a simple name, a generic name, or a defined special value.
The QUAL statement (or only the first QUAL statement if there are more than one) must have a statement label that matches the statement label value that must be specified in a PARM or ELEM statement for which the qualifier is being defined. The qualifiers for the parameter or list item are then entered on the command in the form: value3/value2/value1, where values 1 through 3 are qualifiers that are each described by a QUAL statement. The values are passed to the command processing program in the same order, with the periods removed, and with each value padded to its maximum length.
Note: The QUAL statement contains certain parameters and predefined values that can be used only when IBM-supplied command processing programs are called by the command being defined. Because of limitations in some high-level languages, these values may not be useful in the definition statements of user-defined commands. These parameters and values are identified by the phrase (For IBM-supplied commands) that immediately follows the parameter keyword (if the entire parameter is for IBM-supplied commands only) or the predefined value to which it applies.
Examples:
Example 1: Qualified Job Name as One Element
PARM KWD(SPLFILE) TYPE(L1) DFT(*) SNGVAL(*)
L1: ELEM TYPE(*NAME) MIN(1) /* For file name */
ELEM TYPE(Q1)
Q1: QUAL TYPE(*NAME) MIN(1) /* For job name */
QUAL TYPE(*NAME) /* For user name */
QUAL TYPE(*CHAR) LEN(6) /* For job number */
The SPLFILE parameter is optional and, if not specified, defaults to an asterisk (*). Otherwise, the value consists of a two-element list. The first element is a file name and it is required. The second element is a qualified job name. The first qualifier is required; the last two qualifiers are optional. The following are some examples of valid SPLFILE parameter syntax:
. SPLFILE(*)
. SPLFILE(MYSPLFILE MYJOB)
. SPLFILE(MYSPLFILE 123456/USERA/MYJOB)
Example 2: List of Qualified Object Names as One Element
PARM KWD(DTAMBRS) TYPE(L1) DFT(*ALL) MAX(32) +
SNGVAL(*ALL)
L1: ELEM TYPE(Q1) MIN(1)
ELEM TYPE(*NAME) MIN(0) MAX(32) SPCVAL(*NONE) +
DFT(*NONE)
Q1: QUAL TYPE(*NAME) MIN(1)
QUAL TYPE(*NAME) DFT(*CURRENT) SPCVAL(*CURRENT)
The parameter named DTAMBRS is optional and, if not specified, defaults to *ALL. Otherwise, the value consists of a list, each element of which is itself a list. Each sublist consists of a qualified file name optionally followed by one or more member names. If no member name is specified, *NONE is taken as the default. If no library qualifier is specified for the file, *CURRENT is taken as the default. Each sublist can contain one file name and up to 32 member names. Up to 32 such sublists can appear as the value of DTAMBRS. The following are some examples of valid DTAMBRS parameter syntax:
. DTAMBRS(*ALL)
. DTAMBRS((PFILE1 *NONE))
. DTAMBRS((LIB1/PFILE1 (MBR1 MBR2)))
. DTAMBRS((*CURRENT/PFILE1 (MBR1 MBR2 MBR3)) (LIB2/PFILE2 (MBRA MBRB)))