This describes the format in which elements in a mixed list are passed when a command is run using REXX.
When a command is run using REXX, the elements in a mixed list are passed to the command processing program in the following format where valueN is the last value in the mixed list.:
. . . CMPVAL(value1 value2 . . . valueN) . . .
If the user does not enter a value for an element, a default value is passed. For example, if in the previous example, the user enters a comparison value of QCMDI for the CMPVAL parameter, but does not enter a value for the starting position, whose default value is 1, the following is passed:
. . . CMPVAL(QCMDI 1) . . .
Note that trailing blanks are not passed with REXX values.
When a display station user enters a single value or when a single value is the default for a mixed list, the value is passed as the first element in the list. For example, if the display station user enters *ANY as a single value for the parameter, the following is passed:
. . . CMPVAL(*ANY) . . .
Again note that trailing blanks are not passed with REXX values.
If no default value is defined on the PARM statement for an optional parameter and the first value of the list is required (MIN(1)), then the parameter itself is not required. But if any element is specified, the first element is required. In this case, if the command is entered without specifying a value for the parameter, the following is passed:
. . . CMPVAL() . . .