A Generic Command Choice Program
September 22, 2004 Bruce Guetzkow
The code for this article is available for download.
I’ve had many opportunities to create my own commands on the AS/400, iSeries, and i5. Although you can use the VALUES or SPCVAL keywords to hardcode valid values, changing valid values requires changing the command source. On occasion I’ve created a command with a keyword for which valid values are already stored in a file. By specifying the CHOICE and CHOICEPGM parameters on the PARM, ELEM or QUAL statements, you can create a program to display the list of valid values stored in that file. The following is an example