/VALID=(val1,val2...)
Getinput can compare the user input to valid possibilities specified
with /VALID.
Options are:
/VALID=(str1,str2,str3) As user input only the valid
strings are accepted. When the
user input is unique, only the
unique part is needed, see examples.
/VALID=(2,4,6) As user input only the strings
2, 4 and 6 are accepted.
/VALID=(1,10) As user input only the strings
1 and 10 are accepted.
/VALID=(1,10)/TYPE=INTEGER As user input an integer from
1 to 10 is accepted.
/VALID=(1,10)/TYPE=INT/NORANG As user input the integers 1 and 10
are accepted.
1 – Examples
$ GETINPUT OutputSymbol /VALID=(yes,no)/PROMPT="Continue"
Continue: JA
%GIP-W-INPERR, input has to be in the VALID list
Continue: ?
%GIP-I-HELP, the input must be chosen from the following list: YES,NO
Continue: y
$ show symbol OutputSymbol
OUTPUTSYMBOL = "YES"
$ GETINPUT OutputSymbol /VALID=(1,5)/TYPE=INT/PROMPT="Kies een optie"
Kies een optie: 0
%GIP-W-INPERR, input has to be in the VALID list
Kies een optie: yes
%GIP-W-INPERR, input has to be numeric
Kies een optie: ?
%GIP-I-HELP, the input must be an integer value from 1 to 5
Kies een optie: 5
$ show symbol OutputSymbol
OUTPUTSYMBOL = "5"