The ISPF Panel Definition - Example

The following is an example of many of the different parts of an ISPF panel definition used to define a main menu screen. This example is to illustrate the usage of some of the sections of a panel definition and although I obtained this code from a real panel I have cut out some sections of the code to reduce the example to a more manageable length. I have not tested the cut down version of the code used in this example. Note also that the non-displayable hexadecimal characters used as attributes appear as dots in this example and would need to be replaced by their real hex values in order to get the panel to function.

)CCSID NUMBER(00037)
)PANEL KEYLIST(ISRSAB,ISR) IMAGE(&ZIMGNAM,&ZIMGROW,&ZIMGCOL)
)ATTR DEFAULT(...) FORMAT(MIX)
0B TYPE(AB)
0D TYPE(PS)
04 TYPE(ABSL) GE(ON)
05 TYPE(PT)
09 TYPE(FP)
0A TYPE(NT)
11 TYPE(SAC)
16 TYPE(VOI) PADC(USER)
2B TYPE(DT)
22 TYPE(WASL) SKIP(ON) GE(ON)
26 TYPE(NEF) CAPS(ON) PADC(USER)
27 AREA(SCRL) EXTEND(ON)
28 TYPE(PS) CSRGRP(99)
29 TYPE(GRPBOX)
2A AREA(DYNAMIC)
19 TYPE(DATAOUT) COLOR(WHITE)
1A TYPE(DATAOUT) COLOR(RED)
1B TYPE(DATAOUT) COLOR(BLUE)
1C TYPE(DATAOUT) COLOR(GREEN)
1D TYPE(DATAOUT) COLOR(PINK)
1E TYPE(DATAOUT) COLOR(YELLOW)
1F TYPE(DATAOUT) COLOR(TURQ)
30 TYPE(DATAOUT) PAS(ON)
31 TYPE(CHAR) COLOR(WHITE)
32 TYPE(CHAR) COLOR(RED)
33 TYPE(CHAR) COLOR(BLUE)
34 TYPE(CHAR) COLOR(GREEN)
35 TYPE(CHAR) COLOR(PINK)
36 TYPE(CHAR) COLOR(YELLOW)
37 TYPE(CHAR) COLOR(TURQ)
38 TYPE(DATAOUT) CUADYN(VOI)
39 TYPE(CHAR) COLOR(WHITE) HILITE(REVERSE)
3A TYPE(CHAR) COLOR(RED) HILITE(REVERSE)
3B TYPE(CHAR) COLOR(BLUE) HILITE(REVERSE)
3C TYPE(CHAR) COLOR(GREEN) HILITE(REVERSE)
3D TYPE(CHAR) COLOR(PINK) HILITE(REVERSE)
3E TYPE(CHAR) COLOR(YELLOW) HILITE(REVERSE)
3F TYPE(CHAR) COLOR(TURQ) HILITE(REVERSE)
)ABC DESC('Menu') MNEM(1)
PDC DESC('Settings') UNAVAIL(ZPM1) MNEM(1) ACC(CTRL+S)
ACTION RUN(ISRROUTE) PARM('SET')
PDC DESC('View') UNAVAIL(ZPM2) MNEM(1) ACC(CTRL+V)
ACTION RUN(ISRROUTE) PARM('BR1')
PDC DESC('Edit') UNAVAIL(ZPM3) MNEM(1) ACC(CTRL+E)
ACTION RUN(ISRROUTE) PARM('ED1')
PDC DESC('ISPF Command Shell') UNAVAIL(ZPM4) MNEM(6) ACC(CTRL+C)
ACTION RUN(ISRROUTE) PARM('C1')
PDC DESC('Dialog Test...') UNAVAIL(ZPM5) MNEM(8) ACC(CTRL+T)
ACTION RUN(ISRROUTE) PARM('DAL')
PDC DESC('Status Area...') UNAVAIL(ZPMS) MNEM(8) ACC(CTRL+A)
ACTION RUN(ISRROUTE) PARM('SAM')
PDC DESC('Exit') MNEM(2) PDSEP(ON) ACC(CTRL+X) ACTION RUN(EXIT)
)ABCINIT
.ZVARS=ISR@OPT
)ABC DESC('Utilities') MNEM(1)
PDC DESC('Library') UNAVAIL(ZUT1) MNEM(1) ACC(ALT+1)
ACTION RUN(ISRROUTE) PARM('U1')
PDC DESC('Data set') UNAVAIL(ZUT2) MNEM(1) ACC(ALT+2)
ACTION RUN(ISRROUTE) PARM('U2')
PDC DESC('Move/Copy') UNAVAIL(ZUT3) MNEM(1) ACC(ALT+3)
ACTION RUN(ISRROUTE) PARM('U3')
PDC DESC('Data Set List') UNAVAIL(ZUT4) MNEM(2) ACC(ALT+4)
ACTION RUN(ISRROUTE) PARM('U4')
)ABCINIT
.ZVARS=PDFUTIL
&zut9 = '1'
)ABC DESC('Help') MNEM(1)
PDC DESC('General') MNEM(1) ACTION RUN(TUTOR) PARM('ISR01000')
PDC DESC('Settings') MNEM(1) ACTION RUN(TUTOR) PARM('ISP05000')
PDC DESC('View') MNEM(1) ACTION RUN(TUTOR) PARM('ISR10000')
PDC DESC('Edit') MNEM(1) ACTION RUN(TUTOR) PARM('ISR20000')
PDC DESC('Utilities') MNEM(1) ACTION RUN(TUTOR) PARM('ISR30000')
PDC DESC('Foreground') MNEM(1) ACTION RUN(TUTOR) PARM('ISR40000')
PDC DESC('Batch') MNEM(1) ACTION RUN(TUTOR) PARM('ISR50000')
PDC DESC('Command') MNEM(1) ACTION RUN(TUTOR) PARM('ISR60010')
PDC DESC('Dialog Test') MNEM(1) ACTION RUN(TUTOR) PARM('ISP70000')
PDC DESC('Exit') MNEM(2) ACTION RUN(TUTOR) PARM('ISP90100')
PDC DESC('Status Area') MNEM(2) ACTION RUN(TUTOR) PARM('ISPSAMHP')
PDC DESC('About...') MNEM(1) ACTION RUN(TUTOR) PARM('ISRLOGO')
PDC DESC('Changes for this Release') MNEM(2) ACTION RUN(TUTOR) PARM('ISR00005')
PDC DESC('Tutorial') MNEM(4) ACTION RUN(TUTOR) PARM('ISR00000')
PDC DESC('Appendices') MNEM(2) ACTION RUN(TUTOR) PARM('ISR00004')
PDC DESC('Index') MNEM(2) ACTION RUN(TUTOR) PARM('ISR91000')
)ABCINIT
.ZVARS=PRIMHELP
)BODY  CMD(ZCMD)
.. Menu. Utilities. Help.
.------------------------------------------------------------------------------
.                          .ISPF Primary Option Menu.                          .
.Option ===>.Z                                                                 .
.SAREA39                                               ..GRPBOX1
.                                                      ...TMPROWS,TMPSHDW    ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ...                   ..
.                                                      ....
.                                                      .
.ZEXI..
.    .Enter.Z.to Terminate using log/list defaults.
)AREA SAREA39
.0 .Settings     .Terminal and user parameters         .
.1 .View         .Display source data or listings      .
.2 .Edit         .Create or change source data         .
.3 .Utilities    .Perform utility functions            .
.4 .Foreground   .Interactive language processing      .
.5 .Batch        .Submit job for language processing   .
.6 .Command      .Enter TSO or Workstation commands    .
.7 .Dialog Test  .Perform dialog testing               .
)INIT
.ZVARS = '(ZCMD ZEXX)'
.HELP = ISR00003
&ZPRIM = YES
&ZEXX = 'X'
&ZEXI = ' '
.CURSOR = ZCMD
&TMPROWS = &ZSDATA
&TMPSHDW = &ZSSHDW
IF (&ZHILITE = YES OR &ZGUI = &Z)
.ATTRCHAR(19)='PAS(ON) COLOR(WHITE)'
.ATTRCHAR(1A)='PAS(ON) COLOR(RED)'
.ATTRCHAR(1B)='PAS(ON) COLOR(BLUE)'
.ATTRCHAR(1C)='PAS(ON) COLOR(GREEN)'
.ATTRCHAR(1D)='PAS(ON) COLOR(PINK)'
.ATTRCHAR(1E)='PAS(ON) COLOR(YELLOW)'
.ATTRCHAR(1F)='PAS(ON) COLOR(TURQ)'
IF (&ZGUI = &Z)
&ZPASICON = 'ON'
&ZPASTEXT = 'OFF'
IF (&ZSCREEN = '1')
VGET (ZSAREA1)
&ZSAREA = &ZSAREA1
GOTO A
IF (&ZSCREEN = '2')
VGET (ZSAREA2)
&ZSAREA = &ZSAREA2
GOTO A
IF (&ZSCREEN = '3')
VGET (ZSAREA3)
&ZSAREA = &ZSAREA3
GOTO A
IF (&ZSCREEN = '4')
VGET (ZSAREA4)
&ZSAREA = &ZSAREA4
GOTO A
ELSE
VGET (ZSAREA5)
&ZSAREA = &ZSAREA5
A:
&zcstf = 0
IF (&ZSAREA = 'OFF') &zcstf = 1
ELSE
&ZPASICON = 'OFF'
&ZPASTEXT = 'ON'
VGET (ZSCML ZSCBR ZSCED ZTAPPLID) PROFILE
IF (&ZSCML = ' ') &ZSCML = 'PAGE'
IF (&ZSCBR  = ' ') &ZSCBR = 'PAGE'
IF (&ZSCED  = ' ') &ZSCED = 'PAGE'
IF (&ZTAPPLID = ' ') &ZTAPPLID = 'ISR'
VPUT (ZSCML ZSCBR ZSCED ZTAPPLID) PROFILE
&ZHTOP = ISR00003   /* TUTORIAL TABLE OF CONTENTS        */
&ZHINDEX = ISR91000 /* TUTORIAL INDEX - 1ST PAGE         */
&ZSCLMPRJ = &Z      /* TUTORIAL INDEX - 1ST PAGE         */
IF (&ZLOGO = 'YES')
IF (&ZSPLIT = 'NO')
IF (&ZCMD = &Z)
IF (&ZLOGOPAN = 'DONE')
.MSG = ISRLO999
.RESP = ENTER
&ZLOGOPAN = 'DONE'
&ZCLEAN = 'NO'
IF (&ZCMD = &Z) &ZLOGOPAN = 'DONE'
VPUT (ZLOGOPAN) SHARED
IF (&ZSPLIT = 'YES') &ZLOGOPAN = 'DONE'
VPUT (ZHTOP,ZHINDEX,ZSCLMPRJ) PROFILE
IF (&ZCSTF = 1)
&ZIMGNAM ='ISPFGIFL'
&ZIMGROW =3
ELSE
&ZIMGNAM ='ISPFGIFS'
&ZIMGROW =15
&ZIMGCOL =56
&GRPBOX1 = ''
IF (&ZCSTF='0') .ATTR(GRPBOX1) = 'WIDTH(22) DEPTH(13)'
ELSE .ATTR(GRPBOX1) = 'WIDTH(0)'
.ATTR(ZEXI)='PADC(NULLS) PAS(&ZPASICON) CSRGRP(99)'
.ATTR(ZEXX)='PAS(&ZPASTEXT) CSRGRP(99)'
)REINIT
.CURSOR = ZCMD
VGET (ZTAPPLID) PROFILE
IF (&ZTAPPLID = ' ') &ZTAPPLID = 'ISR'
)PROC
IF (&ZCSTF='1') .ATTR(GRPBOX1) = 'WIDTH(0)'
IF (.CURSOR = TMPROWS AND &ZCMD = ' ')
&ZSAR  =TRANS(&ZSCREEN 1,&ZSAREA1 2,&ZSAREA2 3,&ZSAREA3 4,&ZSAREA4 *,&ZSAREA5)
IF (&ZSAR = 'CAL','UPS','SES') &ZCMD = 'SP'
&ZSEL = TRANS (TRUNC (&ZCMD,'.')
0,'PGM(ISPISM) SCRNAME(SETTINGS)'
1,'PGM(ISRBRO) PARM(ISRBRO01) SCRNAME(VIEW)'
2,'PGM(ISREDIT) PARM(P,ISREDM01) SCRNAME(EDIT)'
3,'PANEL(ISRUTIL) SCRNAME(UTIL)'
4,'PANEL(ISRFPA) SCRNAME(FOREGRND)'
5,'PGM(ISRJB1) PARM(ISRJPA) SCRNAME(BATCH) NOCHECK'
6,'PGM(ISRPTC) SCRNAME(CMD)'
7,'PGM(ISPYXDR) PARM(&ZTAPPLID) SCRNAME(DTEST) NOCHECK'
X,EXIT
SP,'PGM(ISPSAM) PARM(PNS)'
' ',' '
*,'?' )
&ZTRAIL=.TRAIL
)PNTS
FIELD(ZPS01001) VAR(ZCMD) VAL(0)
FIELD(ZPS01002) VAR(ZCMD) VAL(1)
FIELD(ZPS01003) VAR(ZCMD) VAL(2)
FIELD(ZPS01004) VAR(ZCMD) VAL(3)
FIELD(ZPS01005) VAR(ZCMD) VAL(4)
FIELD(ZPS01006) VAR(ZCMD) VAL(5)
FIELD(ZPS01007) VAR(ZCMD) VAL(6)
FIELD(ZPS01008) VAR(ZCMD) VAL(7)
FIELD(ZEXI) VAR(ZCMD) VAL(X) DEPTH(2) IMAGE(ISPEXIT) PLACE(L)
FIELD(ZEXX) VAR(ZCMD) VAL(X)
)END

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate