z/OS ISPF Dialog Developer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Example of a master application menu

z/OS ISPF Dialog Developer's Guide and Reference
SC19-3619-00

A master application menu, named ISP@MSTR (See Figure 1), is distributed with ISPF as part of the panel library. This menu can be used, if desired, to allow selection of the various applications available at an installation.

If used, the master menu should be the first menu displayed when the user logs on. It can be displayed automatically by including this command in the user's TSO LOGON procedure:
Read syntax diagramSkip visual syntax diagram
>>-ISPSTART--+-----------------+-------------------------------><
             '-PANEL(ISP@MSTR)-'   

When no keywords are specified on the ISPSTART command, PANEL (ISP@MSTR) is assumed.

The master application menu is generated from a DTL source file (Figure 2). The menu selections are enabled for point-and-shoot selection.

The master application menu )INIT, )PROC, and )PNTS sections are included in Figure 1 to illustrate some of the special menu statement formats already discussed.

Figure 1. Master application menu definition
)INIT
.ZVARS = '(ZCMD ZUSER ZTIME ZTERM ZKEYS ZSCREEN ZLANG ZAPPLID ZENVIR)'
.HELP = ISP00005
&ZPRIM   = YES             /* This is a primary option menu      */
IF (&ZLOGO = 'YES')        /*                              CT@MJC*/
  IF (&ZSPLIT = 'NO')      /* Not in split screen            @L5A*/
    IF (&ZCMD = &Z)        /* No command pending             @L5A*/
      IF (&ZLOGOPAN ¬= 'DONE') /* No logo displayed yet      @L5A*/
        .MSG = ISPLO999    /* Set logo information           @L5A*/
        .RESP = ENTER      /* Simulate enter                 @L5A*/
        &ZLOGOPAN = 'DONE' /*                                @L5A*/
        &ZCLEAN = 'NO'     /*                                @L5A*/
    IF (&ZCMD ¬= &Z)       /* Command pending                @L5A*/
      &ZLOGOPAN = 'DONE'   /*                                @L5A*/
    VPUT (ZLOGOPAN) SHARED /*                                @L5A*/
  IF (&ZSPLIT = 'YES')     /* In split screen                @V5A*/
    &ZLOGOPAN = 'DONE'
)PROC
/* This in a GML based panel generated by ISPDTLC.                    */
/*                                                                    */
/* Make changes by updating the GML source file                       */
/* and reconverting ISP@MSTR.                                         */
&ZCMDWRK = TRUNC(&ZCMD,'.')
&ZTRAIL=.TRAIL
&ZSEL = TRANS (TRUNC (&ZCMD,'.')
  1,'PANEL(ISP@PRIM) SCRNAME(PRIM)'
  X,EXIT
 ' ',' '
   *,'?')
)PNTS
FIELD(ZPS01001) VAR(ZCMD) VAL(1)
FIELD(ZPS01002) VAR(ZCMD) VAL(2)
FIELD(ZPS01003) VAR(ZCMD) VAL(3)
FIELD(ZPS01004) VAR(ZCMD) VAL(4)
FIELD(ZPS01005) VAR(ZCMD) VAL(5)
FIELD(ZPS01006) VAR(ZCMD) VAL(X)
FIELD(ZPS00001) VAR(ZCMD) VAL(END)
)END
/* 5655-042 (C) COPYRIGHT IBM CORP 1982, 2003 */
Figure 2 shows the DTL source for panel ISP@MSTR. All of the translatable text is defined with ENTITY tags and is placed at the beginning of the file. Special comments bordered by a DTL comment line:
 <!-- ############################################ -->
 
identify the places where the source file can be modified and provide an explanation for including additional options.
Figure 2. Master application menu DTL source (1 of 4)
<:-- ISR@MSTR selection menu -->

<:doctype dm system(
  <:ENTITY ispzmstr system -- common logic file imbed -->

<:-- Start of translatable panel text section                        -->
<:--   text delimited by " is to be translated                       -->
<:--   text should end with '">' as shown.                           -->
<:--     the '">' can be moved to the right for text expansion       -->

 <:-- panel title text follows - maximum length = 74 bytes           -->
  <:ENTITY panel_title
           "ISPF Master Application Menu">

 <:-- choice selection text entries follow                           -->
 <:-- choice text for this panel consists of 2 parts:                -->
 <:--   part 1 - point and shoot - primary description               -->
 <:--   part 2 - additional descriptive text                         -->
 <:--  if combined length of text for part 1 plus part 2 exceeds     -->
 <:--  54 bytes, the part 2 text will be folded into multiple lines  -->

 <:-- part 1 - point and shoot - primary description follows         -->
 <:-- pad short text with blanks, aligning the ending quote mark     -->
 <:--     all text strings must be the same length, including blanks -->
 <:-- ############################################################## -->
 <:-- To add options 2, 3, 4, or 5 to this panel:                    -->
 <:--   - Replace the text below for "choice_n_pnts"                 -->
 <:--        (where "n" is the option number)                        -->
 <:--     with the point-and-shoot key identifying option text.      -->
 <:--                                                                -->
 <:-- To add new options to this panel:                              -->
 <:--   - repeat the text below for "choice_n_pnts"                  -->
 <:--        (where "n" is the option number)                        -->
 <:--     for the new option number and add it to the list           -->
 <:--     with the point-and-shoot key identifying option text.      -->
 <:--      for example:                                              -->
 <:--          <:ENTITY choice_6_pnts  "New option 6">               -->
 <:-- ############################################################## -->
   <:ENTITY choice_1_pnts  "Sample 1   ">
   <:ENTITY choice_2_pnts  ".          ">
   <:ENTITY choice_3_pnts  ".          ">
   <:ENTITY choice_4_pnts  ".          ">
   <:ENTITY choice_5_pnts  ".          ">
   <:ENTITY choice_X_pnts  "Exit       ">
 
Figure 3. Master application menu DTL source (2 of 4)
 <:-- part 2 - additional descriptive text                           -->
 <:-- ############################################################## -->
 <:-- To add options 2, 3, 4, or 5 to this panel:                    -->
 <:--   - Replace the text below for "choice_n_text"                 -->
 <:--        (where "n" is the option number)                        -->
 <:--     with the additional option description text.               -->
 <:--                                                                -->
 <:-- To add new options to this panel:                              -->
 <:--   - repeat the text below for "choice_n_text"                  -->
 <:--        (where "n" is the option number)                        -->
 <:--     for the new option number and add it to the list           -->
 <:--     with the additional option description text.               -->
 <:--      for example:                                              -->
 <:--          <:ENTITY choice_6_text "(Description for option 6)  ">-->
 <:-- ############################################################## -->
   <:ENTITY choice_1_text
       "Sample application 1        ">
   <:ENTITY choice_2_text
       "(Description for option 2)  ">
   <:ENTITY choice_3_text
       "(Description for option 3)  ">
   <:ENTITY choice_4_text
       "(Description for option 4)  ">
   <:ENTITY choice_5_text
       "(Description for option 5)  ">
   <:ENTITY choice_X_text
       "Terminate ISPF using list/log defaults">

 <:-- Status area labels          - maximum text length = 10 bytes   -->
  <:ENTITY status_userid  "Userid . :">
  <:ENTITY status_time    "Time . . :">
  <:ENTITY status_term    "Terminal :">
  <:ENTITY status_pfkeys  "Pf keys  :">
  <:ENTITY status_scrnum  "Screen . :">
  <:ENTITY status_lang    "Language :">
  <:ENTITY status_appl    "Appl ID  :">
  <:ENTITY status_rel     "Release  :">

 <:-- Generated panel comments    - maximum text length = 66 bytes   -->
  <:ENTITY panel_cmnt1
          "This in a GML based panel generated by ISPDTLC.">
  <:ENTITY panel_cmnt2
          "                                              ">
  <:ENTITY panel_cmnt3
          "Make changes by updating the GML source file  ">
  <:ENTITY panel_cmnt4
          "and reconverting ISP@MSTR.                    ">

 <:-- panel instruction text line - maximum text length = 78 bytes   -->
 <:-- panel instruction entities will be concatenated                -->
  <:ENTITY panel_instruct_1
    "Enter <ps var=zcmd value=END csrgrp=99>END</ps> ">
  <:ENTITY panel_instruct_2
    "command to terminate application">

<:-- End of translatable panel text section                          -->
)>         <:-- DO NOT DELETE THIS LINE -->
Figure 4. Master application menu DTL source (3 of 4)
<varclass name=vcc type='char 80'>
<xlatl format=upper>
</xlatl>

<varclass name=vco type='char 7'>

<varlist>
  <vardcl name=zcmd varclass=vcc>
  <vardcl name=zuser varclass=vco>
  <vardcl name=ztime varclass=vco>
</varlist>

<copyr>5694-A01 (C) COPYRIGHT IBM CORP 1982, 2004
<panel name=isp@mstr help=isp00005 padc=user keylist=isrnsab applid=isr
       width=80 depth=24 menu prime window=no>&panel_title;

<cmdarea noinit>
<area depth=8 extend=force width=59 dir=horiz>

  <:-- selection options follow - left side of panel                -->
  <selfld type=menu selwidth=* trail=ztrail fchoice=1 entwidth=1
          tsize=12 selcheck=yes>
    <choice> <ps var=zcmd value=1 csrgrp=99>
        &choice_1_pnts;</ps>
        &choice_1_text;
      <action run=isp@prim type=panel scrname=prim>
 <:-- ############################################################## -->
 <:-- To add options 2, 3, 4, or 5 to this panel:                    -->
 <:--     add a <ACTION> tag provide the selection                   -->
 <:--     information for the generated ZSEL statement.              -->
 <:--                                                                -->
 <:--     <action run=newoptn2 type=panel scrname=opt2>              -->
 <:--       where:                                                   -->
 <:--             run=newoptn2   - provides the name of the panel,   -->
 <:--                              pgm, cmd, wscmd, wscmdv           -->
 <:--             type=panel     - provides the selection choice:    -->
 <:--                              panel, pgm, cmd, wscmd, wscmdv    -->
 <:--             scrname=opt2   - provides an optional screen name  -->
 <:-- ############################################################## -->
    <choice> <ps var=zcmd value=2 csrgrp=99>
        &choice_2_pnts;</ps>
        &choice_2_text;
    <choice> <ps var=zcmd value=3 csrgrp=99>
        &choice_3_pnts;</ps>
        &choice_3_text;
    <choice> <ps var=zcmd value=4 csrgrp=99>
        &choice_4_pnts;</ps>
        &choice_4_text;
    <choice> <ps var=zcmd value=5 csrgrp=99>
        &choice_5_pnts;</ps>
        &choice_5_text;
 
Figure 5. Master application menu DTL source (4 of 4)
 <:-- ############################################################## -->
 <:-- To add new options to this panel:                              -->
 <:--   - add a new <choice> tag to this list following the          -->
 <:--     pattern of the <choice> tags above.                        -->
 <:--     a new <ACTION> tag is required to provide the selection    -->
 <:--     information for the generated ZSEL statement.              -->
 <:--                                                                -->
 <:--     <choice> <ps var=zcmd value=6 csrgrp=99>                   -->
 <:--         &choice_6_pnts;</ps>                                   -->
 <:--         &choice_6_text;                                        -->
 <:--     <action run=newoptn6 type=panel scrname=opt6>              -->
 <:--       where:                                                   -->
 <:--             run=newoptn6   - provides the name of the panel,   -->
 <:--                              pgm, cmd, wscmd, wscmdv           -->
 <:--             type=panel     - provides the selection choice:    -->
 <:--                              panel, pgm, cmd, wscmd, wscmdv    -->
 <:--             scrname=opt6   - provides an optional screen name  -->
 <:-- ############################################################## -->
    <choice selchar=X> <ps var=zcmd value=X csrgrp=99>
        &choice_X_pnts;</ps>
        &choice_X_text;
      <action run=exit     type=exit>
    <comment type=proc>&panel_cmnt1;
    <comment type=proc>&panel_cmnt2;
    <comment type=proc>&panel_cmnt3;
    <comment type=proc>&panel_cmnt4;
  </selfld>
</area>

  <:-- right side of option menu panel follows, status area  -->
<area dir=horiz>
  <region dir = vert>
    <divider>
    <dtacol pmtwidth=10 entwidth=8>
      <dtafld datavar=ZUSER usage=out>  &status_userid;
      <dtafld datavar=ZTIME usage=out>  &status_time;
      <dtafld datavar=ZTERM usage=out>  &status_term;
      <dtafld datavar=ZKEYS usage=out>  &status_pfkeys;
      <dtafld datavar=ZSCREEN usage=out>&status_scrnum;
      <dtafld datavar=ZLANG  usage=out> &status_lang;
      <dtafld datavar=ZAPPLID usage=out>&status_appl;
      <dtafld datavar=ZENVIR usage=out> &status_rel;
    </dtacol>
  </region

<:-- panel logic file imbed -->
  &ispzmstr;
</area>
<region>
  <info width=78>
    <lines>
&panel_instruct_1;&panel_instruct_2;
    </lines>
    <p>5694-A01 (C) COPYRIGHT IBM CORP 1982, 2003
  </info>
</region>
</panel>
To add a new application to the master menu, copy the ISP@MSTR DTL source file from the GML library to a private data set. Locate the sections of code within the DTL comment lines:
 <!-- ############################################################## -->
and modify the DTL source code to:
  1. Define the point-and-shoot option text
  2. Define the option description text
  3. Add an <ACTION> tag for each additional option.

See the z/OS ISPF Dialog Tag Language Guide and Reference for a description of Dialog Tag Language syntax and information about compiling DTL panels.

Compile the modified DTL source file using the ISPDTLC command, and review the generated panel to confirm that your changes have been processed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014