Use CL or HLL for a qualified name

This describes the format in a qualified name is passed when a command is run using CL or a high-level language.

A qualified name is passed to the command processing program in the following format when using CL or HLL:


A qualified name is passed to the command processing program in this format when using CL or HLL.

For example, if the display station user enters NAME(USER/A) for the previously defined QUAL statements, the name is passed to the command processing program as follows:


If the display station user enters NAME(USER/A) for the previously defined QUAL statements the name is passed to the command processing program.

Qualifiers are passed to the command processing program consecutively by their types and length just as single parameter values are passed (as described under Define parameters). 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.

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:


Example of what is passed if the display station user enters *NONE as the single value a 20-character value is passed.

Qualified names can be processed in CL programs using the Substring built-in function as shown in the following example.

The substring built-in function (%SUBSTRING or %SST) is used to separate the qualified name into two values.

PGM PARM(&QLFDNAM)
DCL &QLFDNAM TYPE(*CHAR) LEN(20)
DCL &OBJ TYPE(*CHAR) LEN(10)
DCL &LIB TYPE(*CHAR) LEN(10)
CHGVAR &OBJ %SUBSTRING(&QLFDNAM 1 10) /* First 10 */
CHGVAR &LIB %SST(&QLFDNAM 11 10) /* Second 10 */
 .
 .
 .
ENDPGM

You can then specify the qualified name in the proper CL syntax. For example, OBJ(&LIB/&OBJ).

You can also separate the qualified name into two values using the following method:

PGM PARM(&QLFDNAM)
DCL &QLFDNAM TYPE(*CHAR) LEN(20)
CHKOBJ (%SST(&QLFDNAM 11 10)/%SST(&QLFDNAM 1 10)) *PGM
 .
 .
 .
ENDPGM

A simple list of qualified names is passed to the command processing program in the following format:


A simple list of qualified names is passed to the command processing program in this format.

For example, assume that MAX(3) were added as follows to the PARM statement for the NAME parameter.

        PARM   KWD(NAME) TYPE(NAME1) SNGVAL(*NONE) MAX(3)
NAME1:  QUAL   TYPE(*NAME)
        QUAL   TYPE(*NAME)
If the display station user enters the following:
NAME(QGPL/A USER/B)
then the name parameter would be passed to the command processing program as follows.

The name parameter would be passed to the command processing program.

If the display station user enters the single value NAME(*NONE), the name parameter is passed as follows.


The name parameter is passed if the display station user enters the single value NAME(*NONE).