z/OS ISPF Dialog Tag Language Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Menu-choice fields

z/OS ISPF Dialog Tag Language Guide and Reference
SC19-3620-00

Use a menu-choice selection field to create an ISPF option menu. Menu-choice fields are similar to single-choice fields. That is, the user can select only one of the choices presented. The entry field for this type of selection field is the command line, which is formatted with the word Option instead of Command. As with single-choice selections, you can specify a preselected choice so that one item is already selected when the panel is displayed.

The CHOICE tag is followed by an ACTION tag which specifies the type of selection (PANEL, PGM, CMD, or EXIT), and other attributes required by the ISPF SELECT service.

When creating an option menu, the MENU keyword is required on the PANEL tag. The optional PRIME keyword causes the creation of a primary option menu. The SELFLD tag must specify TYPE=MENU. Depending on the panel being created, the SELFLD tag attributes ENTWIDTH, FCHOICE, and TRAIL, and the CHOICE tag attribute SELCHAR might be required. See Tag reference for more information on the PANEL, SELFLD, CHOICE, and ACTION tags.

The example markup creates a sample option menu:
<!doctype dm system ()>
<!--  MENU selection panel example -->
<panel name=menusel1 menu>Sample Option Menu
  <topinst>Enter a selection choice

  <region indent=4>
    <selfld type=menu entwidth=1 selwidth=40>
      <choice checkvar=xtest1 match=a>Select Command
        <action run=tstch1 type=cmd parm='1234'
                newappl=aaaa passlib newpool suspend
                lang=crex nocheck mode=fscr>
      <choice checkvar=xtest1 match=b>Select Panel
        <action run=tstch2 type=panel
                addpop newappl=aaaa passlib newpool suspend>
      <choice checkvar=xtest1 match=c>Select Program
        <action run=tstch3 type=pgm parm=abcd
                newappl=aaaa passlib newpool suspend
                nocheck mode=fscr>
      <choice checkvar=xtest1 match=x>Exit
        <action run=exit type=exit>
    </selfld>
  </region>

  <cmdarea>
</panel>

The resulting panel is:

Figure 1. Sample option menu
                             Sample Option Menu

 Enter a selection choice

     1 Select Command
     2 Select Panel
     3 Select Program
     4 Exit













Option ===> _____________________________________________________________

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014