The @@QUESTION command is used to ask a question and to receive a valid reply.
Required
@@QUESTION ------PROMPT------ 'text' ------------------------->
>-----ANSWER ----- @@CANSnnn --------------------->
@@NANSnnn
-----------------------------------------------------------------
Optional
>-----EXTEND ----- 'text' ------------------------->
| |
-- 8 max --
>-----LOWER ------ *NO --------------------------->
*YES
>---- VALUES ----- compare value ------------------>
| |
----- 40 max ------
>---- RANGE ------ low value -- high value -------->
| |
--------- 20 max ----------
>---- SPCVAL --- from value -- replacement value -->
| |
--------- 40 max ----------
>-----HELPIDS ---- HELP panel identifiers ---------|
| |
-------- 10 max -----------
Parameters
PROMPT
Specifies the prompt text for the question. This is up to a maximum of 74 characters. The prompt text may contain special variables (refer to the 15.22.5 Special Template Variable Notes on special variables). More detailed prompt text can be placed in the EXTEND parameter.
ANSWER
Specifies the "special" variable that is to contain the answer to the question. It must be one of the special question and answer variables described in a following section (i.e. @@CANSnnn or @@NANSnnn). The last 2 characters of nnn may be a 2 character index name, which will be substituted by the current numeric value of the index.
EXTEND
Specifies the extended prompt text for the question if the PROMPT parameter cannot contain a full enough description of the question. This is up to a maximum of 8 lines of 74 characters. The extended text may contain special variables.
LOWER
Specifies whether the answer to the question is to remain in lowercase rather than being converted to uppercase.
VALUES
Specifies from 1 to 40 values to be checked against the answer.
RANGE
Specifies from 1 to 20 ranges of values to be checked against the answer. Each individual range must consist of a "low" value and a "high" value.
SPCVAL
Specifies from 1 to 20 values to be replaced by another value e.g. "Y" to "*YES".
HELPIDS
Specifies up to 10 HELP panel identifiers for this application template which will be displayed when the user presses the HELP function key. These are presented as full page screens of HELP.
Examples
The following examples apply to the @@QUESTION command.
Example 1: Ask the user if the change function key is to be enabled.
@@QUESTION PROMPT('Is the change function key to be +
enabled ?') +
ANSWER(@@CANS001) EXTEND('Reply Y or N only'.....) +
LOWER(*NO) SPCVAL((Y *YES) ('y' *YES) (N *NO) +
('n' *NO)) HELPIDS(HELP010 HELP020)
Example 2: Ask the user how many conditions are to be tested.
@@QUESTION PROMPT('How many conditions are to be tested ?') +
ANSWER(@@NANS001) EXTEND('Indicate the number of +
conditions that are to be generated' 'by this +
application template') HELPIDS(HELP040 HELP050)