Parameters Examples Error messages |
The Prompt Control (PMTCTL) statement specifies a condition that is tested to determine whether prompting is done for the parameters whose PARM statement referred to this PMTCTL statement. The PMTCTL statement must have a statement label that matches the label referred to in the Prompt control (PMTCTL) parameter of one or more PARM statements in the command definition source.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
CTL | Controlling keyword | Name | Required, Positional 1 |
COND | Controlling conditions | Values (up to 50 repetitions): Element list | Required, Positional 2 |
Element 1: Relational operator | *GT, *EQ, *GE, *NL, *LT, *NE, *LE, *NG, *SPCFD, *UNSPCFD | ||
Element 2: Controlling keyword value | Character value | ||
NBRTRUE | Number of true conditions | Single values: *ALL Other values: Element list |
Optional |
Element 1: Relational operator | *GT, *EQ, *GE, *NL, *LT, *NE, *LE, *NG | ||
Element 2: Number of true conditions | 0-25 | ||
LGLREL | Logical relation | *AND, *OR | Optional |
Top |
Specifies the name of the parameter that controls the prompting. The value of the parameter specified here is compared to the value specified in the Controlling conditions (COND) parameter. If the Prompt control program prompt (PMTCTLPGM parameter) of the PARM statement is coded for the parameter specified here, the value returned by the program specified in that PMTCTLPGM parameter is compared to the values specified on the Controlling conditions (COND) parameter. If the parameter specified here is a list or qualified name, only the first list item or qualifier is compared.
Top |
Specifies the condition against which the parameter specified on the Controlling keyword (CTL) parameter is tested. Up to 50 conditions can be specified.
Top |
Specifies the number of conditions specified on the Controlling conditions (COND) parameter that must be true if the parameter is prompted for.
Top |
Specifies, when PMTCTL statements are in a group, the logical relationship between this PMTCTL statement and the preceding PMTCTL statements in the group. This allows conditional prompting using more than one controlling parameter.
Top |
Example 1: Selective Prompting with One Control Parameter
A: PMTCTL CTL(TYPE) COND((*EQ *) (*EQ *LIST)) + NBRTRUE(*EQ 1)
If either TYPE(*) or TYPE(*LIST) is specified, the parameters which reference this PMTCTL statement are selected for prompting.
Example 2: Selective Prompting with Multiple Control Parameters Using Multiple PMTCTL Statements
B: PMTCTL CTL(P1) COND((*EQ *ALL)) PMTCTL CTL(P1) COND((*EQ *SOME)) LGLREL(*OR) PMTCTL CTL(P2) COND((*EQ *ALL)) LGLREL(*AND) PMTCTL CTL(P1) COND((*EQ *NONE)) LGLREL(*OR) PMTCTL CTL(P2) COND((*NE *ALL)) LGLREL(*AND)
The parameters which refers to this group of PMTCTL statements are selected for prompting if any of the following conditions exist:
Top |
None
Top |