Top Banner
(c) Copyright International Business Machines Corporation 1992, 1998 All rights reserved. ISPF Panels Beyond the Basics Doug Nadel Research Triangle Park North Carolina USIB3Z3Z at IBMMAIL March, 2000
138
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Panels

( c ) C o p y r i g h t I n t e r n a t i o n a l B u s i n e s s M a c h i n e s C o r p o r a t i o n 1 9 9 2 , 1 9 9 8A l l r i g h t s r e s e r v e d .

ISPF PanelsBeyond the Basics

Doug Nadel

Research Triangle ParkNorth Carolina

USIB3Z3Z at IBMMAIL

March, 2000

Page 2: Panels

ISPF PanelsBeyond the Basics

Doug Nadel

Research Triangle ParkNorth Carolina

USIB3Z3Z at IBMMAIL

March, 2000

Page 3: Panels

Contents ISPF

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Basic Panel Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Types of panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Basic DISPLAY Panel Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Displaying a panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Panel Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Some other panel sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7The )ATTR section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8The )BODY section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Windows in ISPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10CUA Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Pulldowns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Defining pull down choices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16)ABC section example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17)BODY section for pulldowns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18A complete pulldown example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Scrollable Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

What is a Scrollable Area? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Why use scrollable areas? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Panels with scrollable areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Miscellaneous Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Scrollable panel example (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Scrollable panel example (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Scrollable Area Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Scrollable Areas in Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Multiple scrollable areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Dynamic Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

What is a Dynamic Area? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Why use dynamic areas? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

ISRUDSL0 (DS List) panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Panels with dynamic areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Defining a dynamic area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35EXTEND(OFF) example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36EXTEND(ON) example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Shadow Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Dynamic area example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Dynamic area Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Dynamic area REXX Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Using the panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Scrolling a dynamic area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Miscellaneous Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44DTL vs 'Old style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

What is DTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Why use DTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Sample DTL Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Generated 'Panel' source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52DTL/'Old style' sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

SHARE Winter '99 i

Page 4: Panels

Contents ISPFDynamic areas in DTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Tutorial panels in DTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Field Level Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Some other constructs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

)PNTS section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62New constructs sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Panel Exits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

What are they? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Dynamic loading or Preloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67A Sample Panel Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Sample panel-exit panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69PL/I Panel Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70PL/I Panel Exit (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

SHARE Winter '99 ii

Page 5: Panels

Preface ISPF

The following presentation is intended to be given on at theSHARE Winter 1999 Conference in San Francisco, California. Thispresentation discusses advanced techniques for using ISPFpanels in ISPF version 4 and as such contains no IBM* restrictedinformation.

The following terms, which are ma rked with an asterisk at theirfirst occurrence, are trademarks of the International BusinessMachines Corporation.

IBMCUA

The "notes" pages included with the foils indicate the topics tobe discussed with each foil. They are not intended to be acomplete script but they are representative of the presentationcontent.

IBM's plans are subject to change. Nothing in this document isintended to create any representations or warranties. IBMwarranties are contained in the applicable IBM licenseagreements.

This document contains sample code. IBM PROVIDES THISCODE ON AN "AS IS" BASIS WITHOUT WARRANTY OF ANYKIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOTLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITYOR FITNESS FOR A PARTICULAR PURPOSE.

SHARE Winter '99 1

Page 6: Panels

Introduction ISPF

Session Number: 2631

Subject: ISPF Panels - Beyond the Basics

Speaker: Doug Nadel

SHARE Winter '99 2

Page 7: Panels

Overview ISPF

1. Basic panel concepts for DISPLAY panels

(SELECT panels not covered)

2. CUA* Attributes

3. Windowing Concepts

4. Pulldowns

5. Scrollable areas

Dialog panels

Tutorial panels

6. Dynamic Areas

Scrolling

Shadow Variables

7. New Version 4 Constructs

8. Panel Exits

9. DTL comparisons

ÄH Features of ISPF Version 4 and higher

Version 3.5 Service discontinued Nov, 1997

Version 4.1 Service discontinued April, 1997

SHARE Winter '99 3

Page 8: Panels

Overview /Notes ISPF

This presentation covers advanced panel topics using ISPF versions 3.3 through 4.5. I will be using REXX as theprimary programming language because of its flexibility. However, for simple examples, I will also use CLIST andPL/I.

The topics which will be covered will include some basic panel concepts for review, Dynamic areas, ScrollableAreas, Tutorial Panels, Panel Exits, and some basic comparisons between 'old style' panels and Dialog TagLanguage (DTL) panels.

Some of the new constructs for Version 4 will be discussed.

SHARE Winter '99 3-1

Page 9: Panels

Basic Panel Concepts ISPF

Types of panels

1. DISPLAY panels

Invoked via 'ISPEXEC DISPLAY' service

Primarily for data entry or output

2. SELECT panels

Invoked via 'ISPEXEC SELECT' service

Primarily for providing selection lists such as optionmenus.

3. Tutorial Panels

Invoked by ISPF when HELP is requested

SHARE Winter '99 4

Page 10: Panels

Basic Panel Concepts /Notes ISPF

ISPF has three main types of panels: DISPLAY panels, SELECT panels, and tutorial panels.

Display panels are the panels that are shown with the 'ISPEXEC DISPLAY PANEL(...)' service. They are the mostcommon ISPF panel type, and are used for data entry, progress messages, and output-only panels.

Select panels are used mainly for presenting options menus such as the ISPF/PDF Primary Option Panel. Selectpanels are invoked with the 'ISPEXEC SELECT PANEL(...)' service. The setting of the variable &ZSEL to an ISPFcommand string in the )PROC section of a select panel causes the invocation of a command, program or anotherselect panel.

Although all of the concepts discussed in this presentation are applicable to select panels, they will not be coveredas a separate topic here.

Tutorial panels are panels which are displayed by the ISPF tutorial processor (ISPTUTOR). They have a fewidiosyncrasies, mostly in the area of special variables used by the tutorial processor. Again, although all of theconcepts discussed in this presentation are applicable to tutorial panels, they will not be covered as a separate topichere, except where necessary.

SHARE Winter '99 4-1

Page 11: Panels

Basic DISPLAY Panel Concepts ISPF

Displaying a panel

1. Set up variables to be shown or updated

2. Call ISPEXEC DISPLAY service (or ISPLINK for compiledlanguages)

3. Check return code to see if user pressed END or ENTER

SHARE Winter '99 5

Page 12: Panels

Basic DISPLAY Panel Concepts /Notes ISPF

The general method of displaying a panel is to set up variables, call ISPEXEC or ISPLINK with the DISPLAY serviceand the panel name, and then, after the panel is displayed, check the return code from the display.

The variable setup is done with the VDEFINE or VREPLACE service in compiled languages and assembler. In REXXand CLIST, ISPF has access to the language variables, so no special variable creation is necessary. You can justassign values to variables, and as long as those variable names match ISPF conventions (up to 8 characters, startingwith a letter, and containing national characters or numbers; REXX stem variables are not supported), the variablesin the CLIST or EXEC will be available to ISPF and can be used in panels.

SHARE Winter '99 5-1

Page 13: Panels

Basic DISPLAY Panel Concepts ... ISPF

Panel Sections

)ATTR Defines attribute characters, dynamicand graphic areas, etc.

)BODY Defines where panel elements will be,among other things.

)INIT Contains logic for before the panel isdisplayed the 1st time by the program.

)REINIT Contains logic for before the panel isredisplayed by ISPF (for errors) orwithout a panel name.

)PROC Allows logic for after the panel isdisplayed, such as variable verification,message setting, etc.

)END Tells ISPF that the panel definition iscomplete.

SHARE Winter '99 6

Page 14: Panels

Basic DISPLAY Panel Concepts /Notes ISPF

Panels are divided into processing sections. Each section contains information that ISPF needs to create a screenimage, and create, verify, or change data that is to be displayed on the screen. The main, or most common sectionsare listed here.

)ATTR This section defines how ISPF should use certain characters. The characters, which the paneldeveloper chooses, can be used to define field characteristics, color, highlighting, etc., to tellISPF where special types of fields (such as scrollable areas, dynamic areas, and graphic areas)begin and end, and how to display some of the data (Caps on or off for example).

)BODY Defines where panel elements will be, what the static text will look like, what the panel size is,where the command line is, and other things. When examining a panel, This is usually the firstplace to look.

)INIT Contains logic for before the panel is displayed the first time by the program. It is usually usedto set variables which will be displayed, or to set variables which have special meaning toISPF, to indicate such things as the associated tutorial panel name, whether the panel is aprimary selection panel, etc.

)REINIT Contains logic for before the panel is redisplayed by ISPF (for errors) or without a panel name.

)PROC Allows logic for after the panel is displayed, such as variable verification, message setting, etc.Most of the time, the majority of panel logic will be placed in this area.

)END Tells ISPF that the panel definition is complete. Any characters after the )END are ignored byISPF.

SHARE Winter '99 6-1

Page 15: Panels

Some other panel sections ISPF

)PANEL Defines panel as a CUA* panel.Specifies keylist used.

)CCSID Defines Coded Character Set Identifier(CCSID)

)ABC Defines action bar choices

)ABCINIT Defines action bar initial processing

)ABCPROC Defines action bar choice selectionprocessing

)AREA Defines a scrollable area

)LIST Defines a selectable list (listbox in GUI)

)PNTS Point and shoot field definition

)HELP Associates fields with tutorial panelnames (field level help).

) H E L PF I E L D ( s o m e f l d ) P A N E L ( s o m e p a n )

)MODEL Defines table display area for tabledisplay service TBDISPL.

SHARE Winter '99 7

Page 16: Panels

Some other panel sections /Notes ISPF

Other less commonly used panel sections are listed here.

)PANEL Defines the panel as a CUA panel. It also Specifies the name of the keylist to be in effect whilethis panel is displayed.

)CCSID Defines Coded Character Set Identifier (CCSID).

)ABC Defines action bar choices on CUA panels.

)ABCINIT Defines action bar initial processing. It is required if the )ABC section is present. This definesthe processing to take place before that action bar choice is displayed.

)ABCPROC Defines action to be taken when the action bar choice is selected by the user.

)AREA Defines a scrollable area. The contents of this section often look like the contents of the )BODYsection. In effect, it is a small, scrollable )BODY section that is imbedded into the real )BODYsection.

)HELP Associates fields in the )BODY or )AREA sections with tutorial panel names. This is how fieldlevel help is implemented. If the cursor is on a field which has a tutorial panel associated withit, and the user presses HELP, the associated panel is displayed under the control of the ISPFtutorial processor.

)MODEL Defines the table display area for table display service TBDISPL. The )MODEL section providesISPF with a list of table variables to display, and the attributes (color, case, highlighting, etc.)of each column of variables. More than one line of variables can be supplied in the )MODELsection.

SHARE Winter '99 7-1

Page 17: Panels

The )ATTR section ISPF

Defines attribute characters used to:

Ä Define input and output field characteristics

Ä Start and end of dynamic areas

Ä Highlighting within dynamic areas

Ä Start and end of scrollable areas

Ä Start and end of graphic areas

Ä Start of action bar pull down names

Ä Characteristics of pull down choices

SHARE Winter '99 8

Page 18: Panels

The )ATTR section /Notes ISPF

In the )ATTR section, you will find the definitions of attribute characters. Often you will see sections that define howa particular character in the )BODY section will affect highlighting or color on the panel. The most common of theseis to use the percent sign (%) for output highlighting.

In addition to that type of definition, characters can be assigned to have effects in dynamic areas, and shadowvariables, as well as to define the starting and ending locations of special areas.

SHARE Winter '99 8-1

Page 19: Panels

The )BODY section ISPF

Defines where fields are physically placed on the screen andsome of the characteristics (from )ATTR section)

Ä Static text

Ä Input and output fields

Ä Dynamic areas

Ä Scrollable areas

Ä Graphic areas

Ä Action bar pull downs

Also defines window size, command line, and other things.

SHARE Winter '99 9

Page 20: Panels

The )BODY section /Notes ISPF

In addition to the placement of fields, (static, input, dynamic, scrollable, graphic, action bar choices, etc.), the )BODYstatement defines what the windows size will be if this panel is displayed in a window (using the ADDPOP/REMPOPservices), what field will act as the command line, how to expand the panel for large screens (3278 Mod 5, etc.),where the message fields should be located, and some DBCS (double byte character support) characteristics.

SHARE Winter '99 9-1

Page 21: Panels

Windows in ISPF ISPF

Panels and messages can be displayed in windows.

Ä Panels should have WINDOW(columns,rows) coded in the)BODY section.

Ä Programs must place ADDPOP and REMPOP aroundDISPLAY or SELECT.

I S P E X E C A D D P O P / * a d d p o pÄu p w i n d o w * /I S P E X E C D I S P L A Y P A N E L ( p a n e l n a m e )I S P E X E C R E M P O P / * r e m o v e p o pÄu p w i n d o w * /

SHARE Winter '99 10

Page 22: Panels

Windows in ISPF /Notes ISPF

Both panels and messages can be displayed in windows. You may specify the size of the window in the )BODYsection of the panel. For example:

) B O D Y W I N D O W ( 4 6 , 9 )

would tell ISPF to display a window which is 46 columns wide and 9 columns deep not including the borders andassociated attribute bytes .

If a program is to display a panel in a window, the program must issue the ADDPOP service before the window isdisplayed, and the REMPOP service after the window is displayed. Otherwise the panel is shown in a full screen (notin a window).

When deciding on the size of the panel, remember that some users will run with the Program Function keys showing(PFSHOW ON) and you will want to leave room for the PF key display. Also remember that ISPF requires 2 bytes oneither side and 2 lines on the top and bottom for the window border.

Messages can be placed in windows also. This is accomplished in one of two ways:1. Set the .TYPE and or .WINDOW values in the message definition.2. Create long messages that are greater than the width of the panel.

SHARE Winter '99 10-1

Page 23: Panels

Windows in ISPF ... ISPF

Windows can be moved by the user.

1. Place cursor on a panel border.

2. Press enter.

3. Place cursor where you want the upper left corner.

Only top-most window can be moved.

SHARE Winter '99 11

Page 24: Panels

Windows in ISPF /Notes ISPF

Windows can be moved by the user of your application. They may want to do this to see information that is behindthe window, or in the case of field level error messages, to move the window out of the way so that they can enterdata.

Window movement is accomplished by telling ISPF to move the window (by placing the cursor on the window borderand pressing enter), and moving the cursor to the location where the upper left corner of the window should bemoved to. ISPF will make any necessary adjustments to insure that the whole window still fits on the screen.

SHARE Winter '99 11-1

Page 25: Panels

CUA Attributes ISPF

CUA Attributes allow you provide color consistency for fieldswhich have the same function.

Ä Input fields

Ä Panel Titles

Ä Warning messages

Ä many others

Attributes are specified in the )ATTR section

) A T T R% T Y P E ( E T ) / * e m p h a s i z e d t e x t * /_ T Y P E ( N E F ) P A D ( U S E R ) C A P S ( O N ) / * n o r m a l e n t r y f i e l d * /+ T Y P E ( N T ) / * N o r m a l t e x t * /

) B O D Y

Each user can customize how each field looks using theCUAATTR command.

SHARE Winter '99 12

Page 26: Panels

CUA Attributes /Notes ISPF

ISPF allows you to use new attributes in your panel definitions to allow for consistent color presentation across theISPF session. These attributes, referred to as CUA Attributes are set in the )ATTR section, and are types. Eachcorresponds to a CUA panel element.

Individual users can set the colors for individual CUA attributes by using the CUAATTR command from any commandline or from the settings panels (option 0).

Note that you can override the default attribute characters in the )ATTR section, as the example shows.

SHARE Winter '99 12-1

Page 27: Panels

CUA Attributes ... ISPF

N o n - C U A a t t r i b u t e sV a l u e U s a g eT E X T T e x t ( p r o t e c t e d ) f i e l dI N P U T I n p u t ( u n p r o t e c t e d ) f i e l dO U T P U T O u t p u t ( p r o t e c t e d ) f i e l dD A T A I N I n p u t ( u n p r o t e c t e d ) f i e l d i n a d y n a m i c a r e aD A T A O U T O u t p u t ( p r o t e c t e d ) f i e l d i n a d y n a m i c a r e aC H A R C h a r a c t e r a t t r i b u t e s i n a d y n a m i c a r e aG R P B O X G r o u p b o xP S P o i n t - a n d - s h o o t

C U A a t t r i b u t e sV a l u e U s a g eA B A B u n s e l e c t e d c h o i c e sA B S L A B s e p a r a t o r l i n eC E F C h o i c e e n t r y f i e l dC H C o l u m n h e a d i n gC T C a u t i o n t e x tD T D e s c r i p t i v e t e x tE E E r r o r e m p h a s i sE T E m p h a s i z e d t e x tF P F i e l d p r o m p tL E F L i s t e n t r y f i e l dL I L i s t i t e m sL I D L i s t i t e m d e s c r i p t i o nN E F N o r m a l e n t r y f i e l dN T N o r m a l t e x tP I N P a n e l i n s t r u c t i o nP T P a n e l t i t l eR P R e f e r e n c e p h r a s eS A C S e l e c t a v a i l a b l e c h o i c e sS C S e l e c t e d c h o i c eS I S c r o l l i n f o r m a t i o nS U C S e l e c t u n a v a i l a b l e c h o i c e sV O I V a r i a b l e o u t p u t i n f o r m a t i o nW A S L W o r k a r e a s e p a r a t o r l i n eW T W a r n i n g t e x t

SHARE Winter '99 13

Page 28: Panels

CUA Attributes /Notes ISPF

This foil lists the attributes, both CUA and Non-CUA, which can be specified by TYPE() in the )ATTR section of thepanel definition.

There are many options for each of the attribute types. See the manuals for details on each attribute.

SHARE Winter '99 13-1

Page 29: Panels

Pulldowns ISPF

Action bar on top of the panel

Each action bar may have multiple choices when selected.

A panel with pulldowns:Â Ä

F i l e L a n g u a g e s C o l o r s H e l p- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

L a n g u a g e : 1 1 . A u t o m a t i c C o l o r i n g : 2 1 . D o n o t c o l o r p r o g r a m2 . A s s e m b l e r 2 . C o l o r p r o g r a m3 . B o o k M a s t e r4 . C5 . C O B O L6 . I S P F D T L7 . I S P F P a n e l8 . I S P F S k e l e t o n9 . J C L

1 0 . P a s c a l1 1 . P L / I1 2 . R E X X1 3 . O t h e r1 4 . D e f a u l t

. .

SHARE Winter '99 14

Page 30: Panels

Pulldowns /Notes ISPF

Pulldowns allow you to have an action bar at the top of the screen and each action bar choice may have multipleactions associated with it. You may code pulldowns in either panel language or DTL. What I will be showing hereis how to code them in panel language.

Selection of an action bar choice is done by placing the cursor on the action bar choice and pressing enter. Whenthe enter key is pressed, a pulldown is shown which gives additional choices which can be selected by number orby cursor positioning.

The example panel shows how a panel with an action bar might look.

SHARE Winter '99 14-1

Page 31: Panels

Pulldowns ... ISPF

The same panel with 'File' selected.

 ÄF i l e L a n g u a g e s C o l o r s H e l p

Ú- - - - - - - - - - - - - - - - - - - - - - - - - - - - ¿ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! _ 1 . R e s t a r t A p p l i c a t i o n ! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _! 2 . D e f a u l t A l l S e t t i n g s !! 3 . S a v e a n d E x i t ! o l o r i n g : 2 1 . D o n o t c o l o r p r o g r a m! 4 . C a n c e l ! 2 . C o l o r p r o g r a mÀ- - - - - - - - - - - - - - - - - - - - - - - - - - - - Ù

4 . C5 . C O B O L6 . I S P F D T L7 . I S P F P a n e l8 . I S P F S k e l e t o n9 . J C L

1 0 . P a s c a l1 1 . P L / I1 2 . R E X X1 3 . O t h e r1 4 . D e f a u l t

. .

SHARE Winter '99 15

Page 32: Panels

Pulldowns /Notes ISPF

This shows how the panel would look once the 'File' choice is selected. The pulldown, in this case, contains 4 itemswhich can be selected by number or by choice. If the user presses the END, Exit, or CANCEL key, the pulldown isremoved with no action taken.

While the pulldown is displayed, the rest of the panel becomes read-only.

SHARE Winter '99 15-1

Page 33: Panels

Defining pull down choices ISPF

Ä Panel defines each pulldown and its actions

Ä There are 3 action bar sections)ABC DESC(...) Defines action names and response)ABCINIT Allows setup before pulldown display)ABCPROC Allows setup after action selection

ÄH )ABC DESC(...) and )ABCINIT are required

ÄH )ABCINIT must set .ZVARS to a unique name

Ä The action bar must be added to the )BODY section

SHARE Winter '99 16

Page 34: Panels

Defining pull down choices /Notes ISPF

A panel can define pulldowns using the )ABC, )ABCINIT, and )ABCPROC panel sections.)ABC DESC(...) Defines action names and response. This is done with keywords:

PDC DESC(...) defines the name shown on the panel.ACTION RUN(...) defines a string to be placed on the command line when this action isselected.

)ABCINIT Allows setup before pulldown display. This allows you to alter the text of the action. Forexample you may want to verify that some conditions are met and make the text of an actionstate that the choice is unavailable. Within the )ABCINIT section, you must assign a value to.ZVARS of a unique name, even if you do not use the name for anything else. This is to allowISPF to create a field on the action bar which will contain the name of the action.

)ABCPROC Allows setup after action selection. This section is not required and is only be needed in specialcases.

SHARE Winter '99 16-1

Page 35: Panels

)ABC section example ISPF

When an action is selected ISPF sets the command line from theACTION RUN() statement and simulates an ENTER key.

) A B C d e s c ( F i l e )P D C D E S C ( ' R e s t a r t A p p l i c a t i o n ' )A C T I O N R U N ( R E S T A R T )P D C D E S C ( ' D e f a u l t A l l S e t t i n g s ' )A C T I O N R U N ( R E S E T )P D C D E S C ( ' S a v e a n d E x i t ' )A C T I O N R U N ( E N D )P D C D E S C ( ' C a n c e l ' )A C T I O N R U N ( C A N C E L )

) A B C I N I T. Z V A R S = F I L E X

Action can be handled by

Ä Command table

Ä Program logic

Ä Panel logic

SHARE Winter '99 17

Page 36: Panels

)ABC section example /Notes ISPF

This foil shows an example of an )ABC section of a panel. It has 4 actions, defined by the PDC (pull down choice)keyword. Each PDC section has an ACTION section which tells ISPF what action to take when the pulldown choiceis selected.

When a pulldown choice is selected, ISPF takes the value of the ACTION RUN(...) statement (the part in the RUN()section) and logically places it on the command and then simulates an Enter key. This means that you can have theprocessing be handled by the command table, program logic, or panel logic.

For example, you can specify ACTION RUN(CANCEL) and have the ISPF command table handle the CANCELcommand. Or you could say ACTION RUN(XYZ) and have your panel logic and/or program handle the XYZ command(assuming it is not in the active command table).

SHARE Winter '99 17-1

Page 37: Panels

)BODY section for pulldowns ISPF

Ä Add attributes for types AB, ABSL to )ATTR) A T T R

$ T Y P E ( A B ) / * a c t i o n b a r * /@ T Y P E ( A B S L ) / * a c t i o n b a r s e p . l i n e * /

Ä Add )ABC sections with DESC() keyword) A B C d e s c ( M e n u )

P D C D E S C ( ' S a v e ' ) A C T I O N R U N ( S A V E )< a d d i t i o n a l l o g i c h e r e >

) A B C I N I T. z v a r s = ' M E N U X '

) A B C d e s c ( H e l p )< a d d i t i o n a l l o g i c h e r e >

Ä Add action bar and separator line to top of )BODY) B O D Y+ $ M e n u $ H e l p +@ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ

Ä Use names in action bar as you want them to appear.

Ä Choice names must match value in the )ABC DESC()

SHARE Winter '99 18

Page 38: Panels

)BODY section for pulldowns /Notes ISPF

To create an action bar on a panel, you need to

1. Add at least the TYPE(AB) to the )ATTR section

2. Add )ABC and )ABCINIT sections to describe the action bar choices.

Ä Remember to set DESC in )ABC to menu name

Ä Remember to assign .ZVERB in the )ABCINIT section

3. Add an action bar to the panel using an AB attribute character for each pull down. After the attribute place thename of the pulldown from the )ABC section

4. Add an action bar separator line (optional)

To process the action bar selections, alter your program or panel logic, or add selections to your command table.

SHARE Winter '99 18-1

Page 39: Panels

A complete pulldown example ISPF

) A T T RT Y P E ( P T ) / * P a n e l t i t l e * /

% T Y P E ( E T ) / * E m p h a s i z e d t e x t * /+ T Y P E ( N T ) / * N o r m a l t e x t * /_ T Y P E ( N E F ) / * N o r m a l e n t r y f i e l d * /$ T Y P E ( A B ) / * A c t i o n b a r * /@ T Y P E ( A B S L ) / * A c t i o n b a r s e p a r a t o r l i n e * /

) A B C d e s c ( M e n u )P D C D E S C ( ' S a v e ' ) A C T I O N R U N ( S A V E )P D C D E S C ( ' E n d ' ) A C T I O N R U N ( E N D )P D C D E S C ( ' C a n c e l ' ) A C T I O N R U N ( C A N C E L )

) A B C I N I T. z v a r s = ' M E N U X '

) A B C D E S C ( H e l p )P D C D E S C ( ' E x t e n d e d H e l p . . . ' )A C T I O N R U N ( H E L P )

) A B C I N I T. Z V A R S = H E L P X. R E S P = E N T E R / * D o n ' t e v e n s h o w c h o i c e * /

/ * T h i s i s a n e x a m p l e a n d * // * i s N O T C U A . . * /

) B O D Y W I N D O W ( 4 8 , 6 )+ $ M e n u $ H e l p +@ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ+

P a n e l T i t l e% = = = > _ Z C M D +

T h i s i s n o r m a l t e x t . R i g h t ? _ A N S + ( Y e s , N o )) E N D

SHARE Winter '99 19

Page 40: Panels

A complete pulldown example /Notes ISPF

This is a working example of a panel which will appear in a window (if an ADDPOP was issued). It has 2 pulldowns,Menu and Help. It shows the use of some CUA Attributes, overriding the defaults (&, + , and _) and it shows anexample of adding processing to the )ABCINIT section for the Help pulldown.

If the Help pulldown is selected, ISPF will automatically simulate an extra enter key because of the .RESP=ENTERin the )ABCINIT section. Thus the pulldown will never be shown and since the default is for ISPF to select the firstpull down choice when just the enter key is pressed and the pulldown is selected for the 1st time, ISPF will run theHELP command and will never actually show the pulldown. This is a method you can use to have action bar choicesautomatically take some action.

The panel looks like this when displayed:

 ÄM e n u H e l p

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P a n e l T i t l e

C o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

T h i s i s n o r m a l t e x t . R i g h t ? _ _ _ ( Y e s , N o ). .

When 'Menu' is selected, a pulldown is shown:

 ÄM e n u H e l p

Ú- - - - - - - - - - - - - - ¿ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! _ 1 . S a v e ! e l T i t l e! 2 . E n d ! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _! 3 . C a n c e l !À- - - - - - - - - - - - - - Ù e x t . R i g h t ? _ _ _ ( Y e s , N o )

. .

SHARE Winter '99 19-1

Page 41: Panels

Scrollable Areas ISPF

What is a Scrollable Area?

Ä Like a )BODY section of indeterminate length

Ä Lets you use one panel instead of many

Ä Uses same basic syntax as an 'old' )BODY section

Ä ISPF handles UP/DOWN scrolling if the image does not fiton the screen or in the window.

Ä ISPF gives an indicator of whether there is more data aboveor below the current data.

M o r e : + Y o u c a n o n l y s c r o l l f o r w a r d sM o r e : Ä Y o u c a n o n l y s c r o l l b a c k w a r d sM o r e : Ä + Y o u c a n s c r o l l b a c k w a r d s o r f o r w a r d s

( B l a n k ) A l l d a t a i s c u r r e n t l y s h o w n

ÄH ISPF updates the indicator with any interaction (splitscreen, PF keys, etc)

SHARE Winter '99 20

Page 42: Panels

Scrollable Areas /Notes ISPF

A scrollable area can be compared to the )BODY section of the panel. However, it can be much longer then the)BODY section, and you can have multiple scrollable areas defined within the )BODY section.

This allows you to define one panel, and allow your end-user to scroll the information, rather than defining multiplepanels.

They are very simple to define. The )BODY section definition resembles that of a dynamic area, and the )AREAsection, where you define the information to be displayed within the area, uses the same syntax that you would useif you defined it within the )BODY section.

The two major differences between Dynamic and Scrollable areas area that 1) the scrollable area definition mustbe done at panel creation time, rather than at run-time, like the dynamic areas. However for scrollable areas, ISPFhandles all of the scrolling of the data, along with updating the scroll indicator whenever any interaction with thepanel occurs.

SHARE Winter '99 20-1

Page 43: Panels

Scrollable Areas ... ISPF

Why use scrollable areas?

Applications with large panels can run on small screens

Less application logic (one panel rather than multiple)

Simpler implementation than dynamic areas

Ä Familiar syntax

Ä Scrolling handled by ISPF

Easier tutorial implementation

Ä One panel rather than multiple, no need to use ZCONTin tutorials

SHARE Winter '99 21

Page 44: Panels

Scrollable Areas /Notes ISPF

Scrollable areas are extremely useful for applications which must run on multiple screen sizes and/or have largeamounts of data that is grouped. For example, if you have a data entry application, where the information to enterdoes not fit on a normal terminal screen, you can either create multiple panels, and have your application displaythem, or create a scrollable area with all the information and have the end-user scroll through it.

Advantages to the scrollable area are that it allows your application to have less logic to display the information.In this example, your application would need to determine what the end-user wants to do and put up the appropriatepanel each time. Also, the syntax is much the same as that of the )BODY section, and the implementation is easierthan that of dynamic areas.

Scrollable areas are also available in tutorials, and allow the information on one panel rather than many.

SHARE Winter '99 21-1

Page 45: Panels

Panels with scrollable areas ISPF

)ATTR section must contain AREA definition

) A T T R@ A R E A ( S C R L ) E X T E N D ( O N )

EXTEND ON|OFF - Causes the scrollablearea to extend to the last line on thescreen if necessary.

)BODY section must use the area character, and an areaname:

In the example, the scrollable area is bounded by '@'characters and uses the area name 'surv'.

+ @ s c a r e a @

The )AREA section follows the )BODY section:) A R E A s c a r e a+ F i r s t N a m e % = = = > _ F N A M E + ( n i c k n a m e )+ L a s t N a m e % = = = > _ L N A M E + ( s u r n a m e )

SHARE Winter '99 22

Page 46: Panels

Panels with scrollable areas /Notes ISPF

To define a scrollable area, the )ATTR section much contain an attribute byte definition for AREA(SCRL), in the samemanner as dynamic areas. You may specify EXTEND either OFF or ON, with OFF being the default.

The )BODY section contains the definition for the placement and size of the scrollable area, in the same manner asthe dynamic area definition. You specify an area name in the )BODY section definition, which maps to an )AREAsection, defined later, which contains the data to be displayed within the area.

The )AREA section is defined like a miniature )BODY section, which fits into the scrollable area dimensions in theaction )BODY section of the panel.

You may have multiple scrollable areas on the panel. If more than one scrollable area exists, cursor placementdetermines which area to scroll.

A scrollable area cannot contain another area with scroll capabilities such as another scrollable area, a scrollabledynamic area, or a scrollable graphic area.

SHARE Winter '99 22-1

Page 47: Panels

Miscellaneous Information ISPF

a Panel may have more than 1 scrollable area

ÄH Cursor position is used to determine which area toscroll

Area definition in )BODY may be more than one line.

Scrollable areas may not contain other scrollable areas butthey MAY contain dynamic areas with EXTEND(OFF).

SHARE Winter '99 23

Page 48: Panels

Miscellaneous Information /Notes ISPF

SHARE Winter '99 23-1

Page 49: Panels

Scrollable panel example (1 of 2) ISPF

 Ä) A T T R

$ A R E A ( S C R L ) E X T E N D ( O N )# T Y P E ( I N P U T ) P A D ( _ ) C A P S ( O F F )@ T Y P E ( I N P U T ) P A D ( _ ) C A P S ( O N )

) B O D Y% - - - - - - - - - - - - - - - - - - - - - S U P E R S E E D Y S E E D C O M P A N Y - - - - - - - - - - - - - - - - - - - - - - %% C O M M A N D = = = > _ Z C M D ++

+ P r e s s % P F 8 + t o g o f o r w a r d , % P F 7 + t o g o b a c k , % P F 3 + t o e x i t$ s u r v $

) A R E A s u r v+ T h a n k y o u f o r p a r t i c i p a t i n g i n t h i s s u r v e y . P l e a s e r e s t

a s s u r e d t h a t t h e i n f o r m a t i o n y o u p r o v i d e w i l l r e m a i n % s t r i c t l yc o n f i d e n t i a l + u n l e s s w e f e e l l i k e d i v u l g i n g i t .

% I n f o r m a t i o n a b o u t y o u++ L a s t N a m e . . . . . . . . . . . . # l n a m e ++ F i r s t N a m e . . . . . . . . . . . . # f n a m e ++ M i d d l e I n i t i a l . . . . . . . . . @ z +

+ S t r e e t A d d r e s s . . . . . . . . . # s a d d r ++ A p a r t m e n t n u m b e r . . . . . . . # a a d d r ++ C i t y . . . . . . . . . . . . . . . . . . . # c a d d r ++ S t a t e o r P r o v i n c e . . . . . . @ z + ( U s e 2 l e t t e r a b b r e v i a t i o n ) ++ Z i p o r P o s t a l C o d e . . . . . @ p c o d e +

+ O c c u p a t i o n . . . . . . . . . . . . . # o c c ++ N u m b e r o f y e a r s a t+ y o u r c u r r e n t j o b . . . . . # y r +

A n n u a l i n c o m e # i n c + ( o p t i o n a l )+ S i z e o f y o u r g a r d e n . . . . @ g s z + ( P o r c h , B a c k y a r d , F a r m , N o n e )+% I n f o r m a t i o n a b o u t o u r s e r v i c e s

+ W h e r e d i d y o u h e a r a b o u t o u r s e r v i c e s ? # h o w h e a r ++ W h a t s i m i l a r s e r v i c e s h a v e y o u u s e d ? # s i m s e r v +

. .

SHARE Winter '99 24

Page 50: Panels

Scrollable panel example (1 of 2) /Notes ISPF

This part of the panel shows the )ATTR section, the )BODY section, and the beginning of the )AREA section.

The area name 'surv' is used in both the )BODY section and the )AREA tag. This is how the connection is madebetween area definitions in the )BODY and )AREA sections.

Note that there is an attribute character in column 1 for each of the lines. This is not required, but it is generally agood idea because the beginning of the scrollable area uses the same attributes that precede the scrollable areaunless the area contains attributes of its own.

The area can take up all or part of the line in the )BODY section. This example illustrates that, although the )AREAsection contents start in column 1, the display starts where the attribute byte is in the )BODY section.

SHARE Winter '99 24-1

Page 51: Panels

Scrollable panel example (2 of 2) ISPF

 Ä% P l e a s e r a t e t h e f o l l o w i n g c a t e g o r i e s o n a s c a l e o f 1 t o 1 0 .% 1 < - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - > 1 0% P o o r A v e r a g e E x c e l l e n t% P l e a s e u s e a 0 f o r ' N o t A p p l i c a b l e '

+ C a t a l o g . . . . . . . . . . . . . . . . . . . . # Z ++ S a l e s r e p r e s e n t a t i v e s . . . . . . . # Z ++ T i m e t o p r o c e s s y o u r o r d e r . . # Z ++ G e n e r a l m e r c h a n d i s e . . . . . . . . . # Z + ( G e n e r a l s e e d s a n d p l a n t s )+ S p e c i a l t y m e r c h a n d i s e . . . . . . . # Z + ( R a r e p l a n t s , t o o l s , e t c . )+ R e t u r n P o l i c y . . . . . . . . . . . . . . . # Z ++ C o m p l a i n t D e p a r t m e n t . . . . . . . . # Z ++ O u r L a w y e r s . . . . . . . . . . . . . . . . . # Z +

% I n f o r m a t i o n a b o u t y o u r b u y i n g h a b i t s

+ D o y o u s u b s c r i b e t o o u r % g a r d e n i n g f a s h i o n s c a t a l o g ? @ G F ++ D o y o u b u y g a r d e n % s u p p l i e s f o r o t h e r p e o p l e ? @ G O ++ W o u l d y o u b e i n t e r e s t e d i n b u y i n g a % r e a l l y b i g b r i d g e ? @ B B +) I N I T

. Z V A R S = ' ( M I , P A D D R , C A T , R E P , T I M E , G E N , S P E C , R E T P , C O M P , S U I T ) ') P R O C

V E R ( & L N A M E , N B )V E R ( & F N A M E , N B )V E R ( & S A D D R , N B )V E R ( & C A D D R , N B )V E R ( & P A D D R , N B , L I S T , A K , A S , H I , G A , N C , S C , N Y , K Y , Q C , B C , W A , H I , M I , T X , A L , F L )V E R ( & Y R , N U M )V E R ( & I N C , N U M )& G S Z = T R A N S ( T R U N C ( & G S Z , 1 ) P , P O R C H B , B A C K Y A R D , F , F A R M N , N O N E * , ' ? ' )& G F = T R A N S ( T R U N C ( & G F , 1 ) Y , Y E S N , N O * , ' ? ' )& G O = T R A N S ( T R U N C ( & G O , 1 ) Y , Y E S N , N O * , ' ? ' )& B B = T R A N S ( T R U N C ( & B B , 1 ) Y , Y E S N , N O * , ' ? ' )V E R ( & G S Z , N B , L I S T , P O R C H , B A C K Y A R D , F A R M , N O N E )V E R ( & C A T , N B , R A N G E , 0 , 1 0 )V E R ( & R E P , N B , R A N G E , 0 , 1 0 )V E R ( & T I M E , N B , R A N G E , 0 , 1 0 )V E R ( & G E N , N B , R A N G E , 0 , 1 0 )V E R ( & S P E C , N B , R A N G E , 0 , 1 0 )V E R ( & R E T P , N B , R A N G E , 0 , 1 0 )V E R ( & C O M P , N B , R A N G E , 0 , 1 0 )V E R ( & S U I T , N B , R A N G E , 0 , 1 0 )V E R ( & G F , N B , L I S T , Y E S , N O )V E R ( & G O , N B , L I S T , Y E S , N O )V E R ( & B B , N B , L I S T , Y E S , N O )

) E N D. .

SHARE Winter '99 25

Page 52: Panels

Scrollable panel example (2 of 2) /Notes ISPF

This section shows the remainder of the )AREA section, the )INIT section and the )PROC section.

The )INIT section in this example only contains the assignment of names to 'Z' variable place holders. Theassignment follows the normal conventions; Each variable named 'Z' in the BODY, and AREA is associated with areal variable name in the order it is found in the panel definition. (This allows you to have fields with names thatare larger than the field size).

Verification is done as if the area was just part of the regular )BODY section.

SHARE Winter '99 25-1

Page 53: Panels

Scrollable Area Display ISPF

 Ä- - - - - - - - - - - - - - - - - - - - - S U P E R S E E D Y S E E D C O M P A N Y - - - - - - - - - - - - - - - - - - - - - -C O M M A N D = = = >

P r e s s P F 8 t o g o f o r w a r d , P F 7 t o g o b a c k , P F 3 t o e x i tM o r e : +

T h a n k y o u f o r p a r t i c i p a t i n g i n t h i s s u r v e y . P l e a s e r e s ta s s u r e d t h a t t h e i n f o r m a t i o n y o u p r o v i d e w i l l r e m a i n s t r i c t l yc o n f i d e n t i a l u n l e s s w e f e e l l i k e d i v u l g i n g i t .

I n f o r m a t i o n a b o u t y o u

L a s t N a m e . . . . . . . . . . . . J o h n _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _F i r s t N a m e . . . . . . . . . . . . P u b l i c _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _M i d d l e I n i t i a l . . . . . . . . . Q

S t r e e t A d d r e s s . . . . . . . . . 1 0 0 M a i n S t r e e t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _A p a r t m e n t n u m b e r . . . . . . . 1 B _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _C i t y . . . . . . . . . . . . . . . . . . . A n y t o w n _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _S t a t e o r P r o v i n c e . . . . . . Q C ( U s e 2 l e t t e r a b b r e v i a t i o n )Z i p o r P o s t a l C o d e . . . . . H 3 C 3 A 8 _ _

O c c u p a t i o n . . . . . . . . . . . . . V i l l a g e I d i o t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _N u m b e r o f y e a r s a t

. .

 Ä- - - - - - - - - - - - - - - - - - - - - S U P E R S E E D Y S E E D C O M P A N Y - - - - - - - - - - - - - - - - - - - - - -C O M M A N D = = = >

P r e s s P F 8 t o g o f o r w a r d , P F 7 t o g o b a c k , P F 3 t o e x i tM o r e : - +

N u m b e r o f y e a r s a ty o u r c u r r e n t j o b . . . . . 3 0

A n n u a l i n c o m e 2 5 _ _ _ _ _ ( o p t i o n a l )S i z e o f y o u r g a r d e n . . . . F A R M _ _ _ _ ( P o r c h , B a c k y a r d , F a r m , N o n e )

I n f o r m a t i o n a b o u t o u r s e r v i c e s

W h e r e d i d y o u h e a r a b o u t o u r s e r v i c e s ? R a d i o F r e e A p e xW h a t s i m i l a r s e r v i c e s h a v e y o u u s e d ? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

P l e a s e r a t e t h e f o l l o w i n g c a t e g o r i e s o n a s c a l e o f 1 t o 1 0 .1 < - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - > 1 0

P o o r A v e r a g e E x c e l l e n tP l e a s e u s e a 0 f o r ' N o t A p p l i c a b l e '

C a t a l o g . . . . . . . . . . . . . . . . . . . . 1 0S a l e s r e p r e s e n t a t i v e s . . . . . . . 9 _T i m e t o p r o c e s s y o u r o r d e r . . 1 _

. .

SHARE Winter '99 26

Page 54: Panels

Scrollable Area Display /Notes ISPF

These screens show the display of the scrollable area panel as the end-user enters data into the input fields asscrolls. Notice that the scroll indicator (the More: - + ) is updated according to whether or not there is additionalinformation in each direction (forward and backward).

SHARE Winter '99 26-1

Page 55: Panels

Scrollable Area Display ... ISPF

Scrolled to the bottom

 Ä- - - - - - - - - - - - - - - - - - - - - S U P E R S E E D Y S E E D C O M P A N Y - - - - - - - - - - - - - - - - - - - - - -C O M M A N D = = = >T H E R E I S N O A D D I T I O N A L I N F O R M A T I O N B E L O W T H I S L I N E .

P r e s s P F 8 t o g o f o r w a r d , P F 7 t o g o b a c k , P F 3 t o e x i tM o r e : -

1 < - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - > 1 0P o o r A v e r a g e E x c e l l e n t

P l e a s e u s e a 0 f o r ' N o t A p p l i c a b l e '

C a t a l o g . . . . . . . . . . . . . . . . . . . . 9S a l e s r e p r e s e n t a t i v e s . . . . . . . 1 _T i m e t o p r o c e s s y o u r o r d e r . . 1 _G e n e r a l m e r c h a n d i s e . . . . . . . . . 1 _ ( G e n e r a l s e e d s a n d p l a n t s )S p e c i a l t y m e r c h a n d i s e . . . . . . . 1 _ ( R a r e p l a n t s , t o o l s , e t c . )R e t u r n P o l i c y . . . . . . . . . . . . . . . 1 _C o m p l a i n t D e p a r t m e n t . . . . . . . . 1 _O u r L a w y e r s . . . . . . . . . . . . . . . . . 1 0

I n f o r m a t i o n a b o u t y o u r b u y i n g h a b i t s

D o y o u s u b s c r i b e t o o u r g a r d e n i n g f a s h i o n s c a t a l o g ? N O _D o y o u b u y g a r d e n s u p p l i e s f o r o t h e r p e o p l e ? N O _W o u l d y o u b e i n t e r e s t e d i n b u y i n g a r e a l l y b i g b r i d g e ? Y E S

. .

±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±

SHARE Winter '99 27

Page 56: Panels

Scrollable Area Display /Notes ISPF

When there is no more information to display, and the user requests a scroll function in that direction, a messageis displayed stating that there is no more information to scroll to in that direction.

SHARE Winter '99 27-1

Page 57: Panels

Scrollable Areas in Tutorials ISPF

Work the same as in other panels, except

ÄH UP/DOWN scrolling is accomplished with RIGHT/LEFTkeys.

This is in keeping with the functions of LEFT and RIGHT intutorials.

SHARE Winter '99 28

Page 58: Panels

Scrollable Areas in Tutorials /Notes ISPF

You can define scrollable areas within your tutorial panels, as well. If you have tutorial panels which relate to thesame field that you currently have continued with ZCONT, you can put all the information on one panel usingscrollable areas, and not have to continue them in that manner. This allows for cursor-dependent scrolling, also.

Up and down scrolling is done with the RIGHT and LEFT commands, to keep it consistent with previous function oftutorial panels. You can also use the ENTER key to scroll down.

SHARE Winter '99 28-1

Page 59: Panels

Multiple scrollable areas ISPF

) P A N E L) A T T R³ T Y P E ( P T ). T Y P E ( F P )? T Y P E ( N T )_ T Y P E ( N E F ) P A D C ( _ )$ A R E A ( s c r l )

) B O D Y W I N D O W ( 6 5 , 2 2 ) C M D ( Z C M D )³ S a m p l e P a n e l? C o m m a n d = = = > _ Z C M D?? I n p u t y o u r d a t a s e t s :

$ s c r l 1 Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä $. I S P P L I B : $ $

$ $$ $$ s c r l 2 Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä $

. I S P M L I B : $ $$ $$ $$ s c r l 3 Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä $

. I S P S L I B : $ $$ $$ $$ s c r l 4 Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä Ä $

. I S P T L I B : $ $$ $$ $

) A R E A s c r l 1. _ p l i b d s 1 ?. _ p l i b d s 2 ?. _ p l i b d s 3 ?. _ p l i b d s 4 ?. _ p l i b d s 5 ?. _ p l i b d s 6 ?. _ p l i b d s 7 ?. _ p l i b d s 8 ?. _ p l i b d s 9 ?. _ p l i b d s 1 0 ?) A R E A s c r l 2. _ m l i b d s 1 ?. _ m l i b d s 2 ?

. . . e t c . . . f o r e a c h o f t h e 4 s c r o l l a b l e a r e a s) I N I T& Z C MD = ' ') P R O C) E N D

SHARE Winter '99 29

Page 60: Panels

Multiple scrollable areas /Notes ISPF

This is a simple example showing how to use multiple scrollable areas on a single panel. It is used to input datasetnames for the normal ISPF DDnames. Up to 10 datasets are available for each of the four DDnames given. All thisinformation would not fit on one panel, but the information is all related, and is an excellent use of a scrollable area.

We could have made this one long scrollable area, but didn't want to force the user to scroll if they only had oneor two datasets for each DDname.

SHARE Winter '99 29-1

Page 61: Panels

Multiple scrollable areas ... ISPF

 ÄS a m p l e P a n e l

I n p u t y o u r d a t a s e t s :M o r e : +

I S P P L I B : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

M o r e : +I S P M L I B : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

M o r e : +I S P S L I B : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

M o r e : +I S P T L I B : _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

C o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _. .

First line is ALWAYS reserved for scroll indicator

If all data is displayed, the line is left blank

Notice: The field prompts outside of the scrollable areaare coded on the 2nd line for this reason

SHARE Winter '99 30

Page 62: Panels

Multiple scrollable areas /Notes ISPF

Notice that the DDnames (ISPPLIB, etc) are coded outside of the scrollable area on the second line. This is due tothe fact that ISPF reserves the first line of the scrollable area for the scroll indicator, and we wanted the DDname tobe displayed on the line with the first input field. They are outside of the scrollable are so that they never get scrolledout of sight of the end-user.

SHARE Winter '99 30-1

Page 63: Panels

Dynamic Areas ISPF

What is a Dynamic Area?

Ä Area in )BODY section to be filled in at run-time.

Ä Lets your program decide how your panel will look.

Ä Offers a great deal of flexibility!

Program retains control of:

Colors (both field color and at the character level)

Field size

Input fields

Verification

Scrolling (Up, Down, Right, Left)

SHARE Winter '99 31

Page 64: Panels

Dynamic Areas /Notes ISPF

Dynamic areas allow you to define what a part of your panel looks like at run time. That means you can create inputor output fields under program control. It also means that you can have complete control of the characteristics ofevery character position in the dynamic area. For example, you could display a three character word and have everyword be a different color.

Dynamic areas work by allowing you to tell ISPF the name of a variable which contains the data to be displayed.Within that variable, you can imbed attribute characters defined in the )ATTR section which will have specialmeaning to ISPF, such as 'start display in green', or 'start an input field'. The attributes types are DATAIN, CHAR,and DATAOUT, and can be used to define input fields, text, and output fields, just like in the )BODY section, as wellas the colors to be associated with those fields/text.

You can also define USERMOD and DATAMOD fields within your dynamic area. These allow your program todetermine a) If a user has entered anything in the field, even if it is the same characters as are currently there, b)if the user changed anything in the field.

Dynamic areas offer a great deal of flexibility. For example, if you need a table with right/left scrolling capability,you can use dynamic areas to implement it. If you just want to highlight titles with the 1st character in a differentcolor, you can use dynamic areas without even having your program know about it (This is done by setting up all thenecessary variables in panel logic). A simple example of this will be shown later on.

SHARE Winter '99 31-1

Page 65: Panels

Dynamic Areas ... ISPF

Why use dynamic areas?

Special display requirements

Ä Field level color control

Ä Character level attribute support

Ä Best use of different screen sizes.

Ä Nonstandard "table" display

Right-Left scrolling

Field (or character) level highlighting and colors

Better control of what information gets displayed

Dataset List (option 3.4) uses a dynamic area.

SHARE Winter '99 32

Page 66: Panels

Dynamic Areas /Notes ISPF

There are many times you may want to use dynamic areas.

If your screen sizes are varied (24 lines, 32, 43, etc), you may want to use dynamic areas to display your data. If youwant character level highlighting you will need to use dynamic areas. And since your program decides what fieldsget displayed, you may only generate certain fields for certain users. This can be done without complicated panellogic, although it does increase the complexity of the program which drives the panel.

SHARE Winter '99 32-1

Page 67: Panels

ISRUDSL0 (DS List) panel ISPF

 Ä) A T T R D E F A U L T ( $ + _ )

_ T Y P E ( I N P U T ) I N T E N S ( H I G H ) C A P S ( O N )! A R E A ( D Y N A M I C ) S C R O L L ( O N ) E X T E N D ( O N )

0 1 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) / * L E F T H E A D E R * /0 2 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( P I N K ) / * M E S S A G E A R E A * /0 3 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( T U R Q ) / * V O L U M E N A M E * /0 4 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) / * S E P A R A T O R L I N E S * /0 5 T Y P E ( D A T A I N ) I N T E N S ( L O W ) C A P S ( O N ) C O L O R ( Y E L L O W ) / * D A T A S E T N A M E * /0 6 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( G R E E N ) / * T R K , % X T , D E V * /0 7 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( W H I T E ) / * D S O R G , R E C F M E T C * /0 8 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( R E D ) / * C R E A T E , E X P , E T C * /0 9 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( B L U E ) / * E N D O F D A T A L I N E * /1 0 T Y P E ( D A T A O U T ) I N T E N S ( L O W ) C O L O R ( R E D ) / * B E L O W E N D * /

) B O D Y W I D T H ( 8 0 )$ & Z D L T I T L E +$ C O M M A N D = = = > _ Z C M D $ S C R O L L = = = > _ Z U S C ++! Z D A T A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !! !! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !) I N I T

. H E L P = I S R 3 4 0 1 4) P R O C

V P U T ( Z U S C ) P R O F I L E) E N D

. .

SHARE Winter '99 33

Page 68: Panels

ISRUDSL0 (DS List) panel /Notes ISPF

This panel is an old modified copy of the product panel ISRUDSL0. This panel is what the data set list utility (OPTION3.4) of ISPF/PDF uses to display the list of datasets. When you scroll left or right, option 3.4 does not change panels,it only changes the value of the variable ZDATA which is then displayed in a dynamic area on this panel.

Option 3.4 was written to use different attribute characters for different items in the list. Using this panel, you canshow the header in the default low intensity color, the message areas in pink, the volume names in turquoise, thedata set names in yellow, etc.

To see a good example of how dynamic areas work scroll right and left in option 3.4 Data Set List.

SHARE Winter '99 33-1

Page 69: Panels

Panels with dynamic areas ISPF

)ATTR section must contain AREA definition

) A T T R@ A R E A ( D Y N A M I C ) S C R O L L ( O N ) E X T E N D ( O N )

)ATTR section may contain DATAIN and DATAOUTdefinitions

0 1 T Y P E ( D A T A O U T ) C O L O R ( R E D )0 2 T Y P E ( D A T A I N ) C O L O R ( G R E E N ) P A D ( _ )

)BODY section must use the attribute character defined forthe dynamic area, and a program variable, which willcontain the data which is to be put into this area atdisplay-time:

In this example, the dynamic area is bounded by '@'characters and displays the variable 'DYNAREA'.

+ T h i s i s e x t e n d a b l e @ D Y N A R E A @

ÄH The default color is whatever preceded the dynamicarea in the )BODY section.

SHARE Winter '99 34

Page 70: Panels

Panels with dynamic areas /Notes ISPF

Panels with dynamic areas on them need two basic things that 'regular' panels do not have. They need changes tothe )ATTR section and changes to the )BODY section.

The )ATTR section must have a character defined which will tell ISPF that when this character is encountered, adynamic area starts, and when it is encountered again (must be on the same line), that is where the dynamic areaends. Multiple lines can be specified (in the shape of a "box", and ISPF will wrap the text specified by the variablewithin the box.

You can also define characters that, when found in the dynamic area will affect the display. The attributes are similarto regular )BODY character attributes except that instead of using TYPE(TEXT) and TYPE(INPUT), you useTYPE(DATAOUT) and TYPE(DATAIN). This means that you can use the same character with different meanings indynamic areas and the )BODY itself. You can, for example, have the letter R just be displayed in the )BODY, but ifit is in the dynamic area variable, it will start showing output in the color RED.

) A T T R. . .

R T Y P E ( D A T A O U T ) C O L O R ( R E D ). . .

) B O D Y

The )BODY section must define where the dynamic area is, and what variable will contain the data that is displayed.The definition starts and ends with the character defined as AREA(DYNAMIC) in the )ATTR section. Immediatelyfollowing the first instance of that character is the name of the variable.

SHARE Winter '99 34-1

Page 71: Panels

Defining a dynamic area ISPF

) A T T R@ A R E A ( D Y N A M I C ) S C R O L L ( O N ) E X T E N D ( O N ) D A T A M O D ( 1 5 )

SCROLL ON|OFF - Tells ISPF to let the application knowwhen the user requests a scroll of the dynamicarea.

EXTEND ON|OFF - Causes the dynamic area to extend tothe last line on the screen.

DATAMOD Character or hex code - Defines a character to beset in your variable if the data following it ismodified by the user.

USERMOD Character or hex code - Defines a character to beset in your variable if the area is typed in, even ifthe value is not changed.

USERMOD and DATAMOD cause the TYPE(DATAIN) characterto be altered in the displayed variable.

SHARE Winter '99 35

Page 72: Panels

Defining a dynamic area /Notes ISPF

SCROLL All scrolling for the dynamic area MUST be done by your program. However, ISPF allows youto specify that your program plans to do scrolling, by specifying SCROLL(ON) or SCROLL(OFF).If SCROLL(ON) is specified, when the user requests a scrolling function, ISPF will pass controlto your program (by completing the DISPLAY service) and setting the SCROLL value in ZVERB.

EXTEND EXTEND allows the depth of the dynamic area to be automatically increased, if required, tomatch the panel )BODY depth with the depth of the physical screen. This is useful when yourapplication will run on different terminal sizes, so that your application can take advantage ofthe extra lines.

USERMOD and DATAMOD If you specify USERMOD and/or DATAMOD for attribute characters, when the dynamicarea variable is returned to the dialog, the usermod-code and the datamod-code are used toreplace the attribute character of each field that has bee modified. One or both can bespecified for an attribute character within the dynamic area. USERMOD specifies that the userhad typed into the field, but the data itself has not changed. DATAMOD specifies that the datahas changed, either by user input or a capitalization/justification, etc.

SHARE Winter '99 35-1

Page 73: Panels

EXTEND(OFF) example ISPF

With EXTEND(OFF) you must outline the entire dynamic area.) A T T R

@ A R E A ( D Y N A M I C ) S C R O L L ( O N ) E X T E N D ( O F F )R T Y P E ( D A T A O U T ) C O L O R ( R E D )W T Y P E ( D A T A O U T ) C O L O R ( W h i t e )

) B O D Y%ÄÄÄÄÄÄÄÄÄ E X A M P L E U S I N G A D Y N A M I C A R E A W I T H E X T E N D ( O F F )ÄÄÄÄÄÄÄÄÄÄ%% C O M M A N D = = = > _ Z C M D % S C R O L L = = = > _ A M T +%++ T h i s i s n o t @ D Y N A R E A @+ e x t e n d a b l e . @ @+ @ @+ D y n a m i c a r e a i s @ @+ s e v e n l i n e s l o n g @ @+ @ @+ @ @%% T h i s l i n e w i l l b e s h o w n b e l o w t h e d y n a m i c a r e a .) I N I T

& d y n 1 = ' R T h i s i s t h e t e x t w h i c h w i l l R b e d '& d y n 2 = ' i s p l a y e d i n t h e a r e a . A s R y o u c a n s e e , W s p e c i a l R c a r '& d y n 3 = ' e R m u s t b e t a k e n t o s p a c e t h e R t e x t c o r r e c t l y , a n d p '& d y n 4 = ' u t t h e R d a t a o u t a t t r i b u t e b y t e s i n R t h e c o r r e c t p l a c e s . '& d y n a r e a = ' & d y n 1 . & d y n 2 . & d y n 3 . & d y n 4 '

) E N DÂ Ä

- - - - - - - - - E X A M P L E U S I N G A D Y N A M I C A R E A W I T H E X T E N D ( O F F ) - - - - - - - - - -C O M M A N D = = = > % S C R O L L = = = >

T h i s i s n o t T h i s i s t h e t e x t w h i c h w i l le x t e n d a b l e . b e d i s p l a y e d i n t h e a r e a . A s

y o u c a n s e e , s p e c i a l c a r eD y n a m i c a r e a i s m u s t b e t a k e n t o s p a c e t h e

s e v e n l i n e s l o n g t e x t c o r r e c t l y , a n d p u t t h ed a t a o u t a t t r i b u t e b y t e s i nt h e c o r r e c t p l a c e s .

T h i s l i n e w i l l b e s h o w n b e l o w t h e d y n a m i c a r e a .

. .

SHARE Winter '99 36

Page 74: Panels

EXTEND(OFF) example /Notes ISPF

In this example, the variable to contain the dynamic area data is called 'DYNAREA'. The total size of the dynamicarea is 7 lines long because of the EXTEND(OFF). The data outside of the dynamic area is not altered by thepresence of the dynamic area. If the user presses a scroll key (UP, DOWN, RIGHT, or LEFT), control will be returnedto the program because of the SCROLL(ON).

SHARE Winter '99 36-1

Page 75: Panels

EXTEND(ON) example ISPF

With EXTEND(ON) you must outline the start of the dynamic area,and may extend it further down the screen.ISPF will extend it further if necessary.

) A T T R@ A R E A ( D Y N A M I C ) S C R O L L ( O N ) E X T E N D ( O N )R T Y P E ( D A T A O U T ) C O L O R ( R E D )W T Y P E ( D A T A O U T ) C O L O R ( W H I T E )

) B O D Y%ÄÄÄÄÄÄÄÄÄ E X A M P L E U S I N G A D Y N A M I C A R E A W I T H E X T E N D ( O N )ÄÄÄÄÄÄÄÄÄÄÄ%% C O M M A N D = = = > _ Z C M D % S C R O L L = = = > _ A M T +%++ T h i s i s n o t e x t e n d a b l e , @ D Y N A R E A @+ @ @+ b u t t h e l a s t l i n e i s . @ @

% A n d t h i s l i n e i s a t t h e b o t t o m .) I N I T

& d y n 1 = ' R T h i s i s t h e t e x t w h i c h w i l l R '& d y n 2 = ' b e d i s p l a y e d i n t h e a r e a . A s R '& d y n 3 = ' y o u c a n s e e , W s p e c i a l R c a r e R '& d y n 4 = ' m u s t b e t a k e n t o s p a c e t h e R '& d y n 5 = ' t e x t c o r r e c t l y , a n d p u t t h e R '& d y n 6 = ' d a t a o u t a t t r i b u t e b y t e s i n R '& d y n 7 = ' t h e c o r r e c t p l a c e s . '& d y n a r e a = ' & d y n 1 . & d y n 2 . & d y n 3 . & d y n 4 . & d y n 5 . & d y n 6 . & d y n 7 . '

) E N DÂ Ä

- - - - - - - - - E X A M P L E U S I N G A D Y N A M I C A R E A W I T H E X T E N D ( O N ) - - - - - - - - - - -C O M M A N D = = = > S C R O L L = = = >

T h i s i s n o t e x t e n d a b l e , T h i s i s t h e t e x t w h i c h w i l lb e d i s p l a y e d i n t h e a r e a . A s

b u t t h e l a s t l i n e i s . y o u c a n s e e , s p e c i a l c a r eb u t t h e l a s t l i n e i s . m u s t b e t a k e n t o s p a c e t h eb u t t h e l a s t l i n e i s . t e x t c o r r e c t l y , a n d p u t t h eb u t t h e l a s t l i n e i s . d a t a o u t a t t r i b u t e b y t e s i nb u t t h e l a s t l i n e i s . t h e c o r r e c t p l a c e s .b u t t h e l a s t l i n e i s .b u t t h e l a s t l i n e i s .b u t t h e l a s t l i n e i s .b u t t h e l a s t l i n e i s .b u t t h e l a s t l i n e i s .b u t t h e l a s t l i n e i s .b u t t h e l a s t l i n e i s .

A n d t h i s l i n e i s a t t h e b o t t o m .. .

SHARE Winter '99 37

Page 76: Panels

EXTEND(ON) example /Notes ISPF

In this example, the variable to contain the dynamic area data is called 'DYNAREA'. The total size of the dynamicarea will be determined at run time (because of the EXTEND(ON) in the )ATTR section. The data outside of thedynamic area on the last line will be repeated on every line from where it is in the definition, down to the last lineon the screen, because the dynamic area will be extended. If the user presses a scroll key (UP, DOWN, RIGHT, orLEFT), control will be returned to the program.

SHARE Winter '99 37-1

Page 77: Panels

Shadow Variables ISPF

Allow for character level highlighting and graphic escapecharacters.

Alleviates problems with blanks due to field attributes

1. Add a second variable to the dynamic areadefinition:

+ T h i s i s e x t e n d a b l e @ D Y N A R E A , S H A D O W @

2. Add TYPE(CHAR) definitions to ATTR section

B T Y P E ( C H A R ) C O L O R ( B L U E ) I N T E N S ( L O W ) H I L I T E ( R E V E R S E )W T Y P E ( C H A R ) C O L O R ( W H I T E ) I N T E N S ( H I G H ) G E ( & M Y G E )

3. Characters in shadow variable override fieldhighlighting for that individual character that itassociates to in the dynamic area string.

Programs can check ZGE to determine if terminalsupports graphic escape characters and set dynamicarea accordingly

SHARE Winter '99 38

Page 78: Panels

Shadow Variables /Notes ISPF

TYPE(CHAR) indicates to ISPF that you are defining a character attribute as opposed to a field attribute. Valuekeywords are COLOR, HILITE, and GE.

The color may be specified by a dialog variable, which is set by the application. This allows the color to be changedwithin the application. If this is not defined, the color of the underlying field attribute is used.

The valid values for HILITE are USCORE for underscore, BLINK for blinking, and REVERSE for reverse video. The'value' can be a dialog variable which is set by the application. This allows the extended highlighting to be changedwithin the application. If this is not defined, the highlighting of the underlying field attribute is used.

GE may be specified as ON or OFF (OFF is the default). The 'value' can be specified by a dialog variable that is setby the application. If the terminal supports Graphic Escape order, a GE order is placed before the character codein the order stream. If the terminal does not support graphic escape, or the value is not '40'X - 'FE'X, then no GEorder is placed in the order stream prior to the character, and the character is displayed as a blank. The applicationcan check the new Z-variable 'ZGE' to determine if the terminal being used supports graphic escape.

A dynamic area must be defined in your panel. The dynamic area name must be followed by a comma, followedby the shadow variable name, followed immediately by a blank.

The shadow variable name follows the same naming rules as the dynamic area name.

When defining the shadow variable 'text', be sure that the spacing is correct, so that the character attribute isassociated with the appropriate character in the dynamic area text. Any Character attribute which maps to thelocation of a field attribute byte will be ignored.

SHARE Winter '99 38-1

Page 79: Panels

Dynamic area example ISPF

The following is a panel and REXX exec example to show:

1. Dynamic area panel

2. Mixing dynamic and static areas

3. Extending a dynamic area to fill the screen.

4. Scrolling up and down.

5. Use of a shadow variable for character level attributes.

SHARE Winter '99 39

Page 80: Panels

Dynamic area example /Notes ISPF

This is a simple example of dynamic areas. It includes defining the dynamic and shadow variable within the )BODYsection, the setting of the dynamic and shadow variable text strings, and the REXX code to handle simple scrollingrequests.

SHARE Winter '99 39-1

Page 81: Panels

Dynamic area Panel ISPF

A panel named DYNAREA

Shows how static input/output areas coexist with a dynamicarea

Shows how an extendable dynamic area can be specified

Shows how to use a shadow variable for character levelattributes.

Driven by the REXX exec on the next page

) A T T R@ A R E A ( D Y N A M I C ) S C R O L L ( O N ) E X T E N D ( O N )0 1 T Y P E ( D A T A O U T ) C O L O R ( R E D )0 2 T Y P E ( D A T A O U T ) C O L O R ( B L U E )0 3 T Y P E ( D A T A O U T ) C O L O R ( G R E E N )0 4 T Y P E ( D A T A O U T ) C O L O R ( W H I T E )r T Y P E ( C H A R ) C O L O R ( R E D ) H I L I T E ( R E V E R S E )g T Y P E ( C H A R ) C O L O R ( G R E E N ) H I L I T E ( R E V E R S E )b T Y P E ( C H A R ) C O L O R ( B L U E ) H I L I T E ( R E V E R S E )$ T Y P E ( T E X T ) C O L O R ( Y E L L O W )

) B O D Y%ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ E X A M P L E F O R U S I N G A D Y N A M I C A R E AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ%% C O M M A N D = = = > _ Z C M D % S C R O L L = = = > _ A M T +%+ T h i s a r e a i s f i x e d . s i z e : & s i z e++ T h i s i s a n i n p u t f i e l d % = = = > _ s o m e v a r +++ T h i s i s e x t e n d a b l e @ D Y N A R E A , D Y N S H A D @

$ T h i s s h o u l d b e a t t h e b o t t o m o f t h e s c r e e n w h e n i n f u l l s c r e e n .) E N D

Variable DYNSHAD is the 'shadow variable'.

SHARE Winter '99 40

Page 82: Panels

Dynamic area Panel /Notes ISPF

This panel shows several things. First, the panel defines a dynamic area, but it also contains static text (fieldprompts), an output field (size), and an input field (somevar). All of these elements, and many more if needed, cancoexist together.

The dynamic area defined in the panel is defined with SCROLL(ON) and EXTEND(ON). This allows the applicationto scroll the data within the dynamic area when the user requests it, and ISPF will, at display time, extend thedynamic area depth so that the depth of the )BODY section equals that of the terminal that the panel is beingdisplayed on.

It also shows how to use a shadow variable and character-level attributes to highlight individual characters withinthe string, overriding the field attribute for just one character, with no intervening space from a field attribute. Theshadow variable is optional. . Shadow variables are only needed when you want character level attributes.

Character level attributes tend to generate more complex 3270 data streams, so users on remote lines will seeslower performance.

SHARE Winter '99 40-1

Page 83: Panels

Dynamic area REXX Routine ISPF

/ * R E X X Ä D y n a m i c a r e a e x a m p l e * /A d d r e s s i s p e x e c / * C a l l s g o t o I S P F * /r e d = ' 0 1 ' x / * A s s i g n c o l o r s t o * /b l u e = ' 0 2 ' x / * A t t r i b u t e b y t e s * /g r e e n = ' 0 3 ' x / * f o u n d i n t h e d a t a * /w h i t e = ' 0 4 ' xm a x l i n e s = 6 0 0 / * s e t m a x n u m b e r o f l i n e s * /d y n d a t a = ' ' / * i n i t i a l i z e d a t a * /s h a d a t a = ' ' / * i n i t i a l i z e s h a d o w v a r * /

D o a = 1 t o m a x l i n e s b y 3 / * C r e a t e s o m e d u m m y d a t a * /d y n d a t a = d y n d a t a ³³w h i t e ³³l e f t ( ' T h i s i s ' r e d ³³' r e d ' w h i t e ³³a , 2 9 )d y n d a t a = d y n d a t a ³³w h i t e ³³l e f t ( ' T h i s i s ' b l u e ³³' b l u e ' w h i t e ³³a + 1 , 2 9 )d y n d a t a = d y n d a t a ³³w h i t e ³³l e f t ( ' T h i s i s ' g r e e n ³³' g r e e n ' w h i t e ³³a + 2 , 2 9 )s h a d a t a = s h a d a t a ³³' r 's h a d a t a = s h a d a t a ³³' b 's h a d a t a = s h a d a t a ³³' g '

E n d

/ * A d d a b o t t o m o f d a t a m a k e r t o t h e e n d o f t h e d a t a * /d y n d a t a = d y n d a t a ³³b l u e ³³c e n t r e ( g r e e n ³³' B O T T O M ' ³³b l u e , 2 9 , ' * ' )s h a d a t a = s h a d a t a ³³' '

c u r l i n e = 1 ; / * s e t c u r r e n t l i n e # * /

/ * ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* // * D i s p l a y l o o p u n t i l e n d o r e r r o r * // * ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* /

D o U n t i l d i s p r c > 0d y n a r e a = s u b s t r ( d y n d a t a , 1 + ( c u r l i n e Ä1 ) * 3 0 ) / * s e t d y n a m i c v a r i a b l e * /d y n s h a d = s u b s t r ( s h a d a t a , 1 + ( c u r l i n e Ä1 ) * 3 0 ) / * s e t s h a d o w v a r i a b l e * /s i z e = l e n g t h ( d y n a r e a ) / * S e t a s c a l a r v a r i a b l e * /' I S P E X E C D I S P L A Y P A N E L ( D Y N A R E A ) ' / * D i s p l a y t h e d a t a * /d i s p r c = r c / * s a v e r e t u r n c o d e * /' I S P E X E C V G E T ( Z V E R B , Z S C R O L L A , Z S C R O L L N ) ' / * g e t s c r o l l v a l u e s * /S E L E C T / * P r o c e s s s c r o l l i n g * /

W h e n ( z v e r b = ' U P ' ) T h e n / * S c r o l l u p * /I f z s c r o l l a = ' M A X ' T h e n / * i f s c r o l l w a s m a x * /

c u r l i n e = 1 / * s c r o l l t o t o p * /E l s e / * e l s e a n u m b e r i s k n o w n * /

c u r l i n e = m a x ( 1 , c u r l i n e Äz s c r o l l n ) ; / * ( m a x i m u m i s t o p ) * /W h e n ( z v e r b = ' D O W N ' ) T h e n / * S c r o l l d o w n * /

I f z s c r o l l a = ' M A X ' T h e n / * i f s c r o l l w a s m a x * /c u r l i n e = m a x l i n e s / * s c r o l l t o b o t t o m * /

E l s e / * e l s e a n u m b e r i s k n o w n * /c u r l i n e = m i n ( m a x l i n e s , c u r l i n e + z s c r o l l n ) ; / * ( m a x i s b o t t o m ) * /

O t h e r w i s e ; / * c o u l d u s e l e f t & r i g h t t o o * /E n d

E n d / * E n d o f d i s p l a y l o o p * /

SHARE Winter '99 41

Page 84: Panels

Dynamic area REXX Routine /Notes ISPF

This REXX routine shows how to set up a variable for use as a dynamic area variable, how to set up the shadowvariable associated with that area, how to display the panel, and how to process UP and DOWN scrolling.RIGHT/LEFT scrolling is ignored in this example.

The data to be shown is set up to imbed the hex characters '01'x, '02'x, '03'x, and'04'x to represent colors red, blue,green, and white respectively. It will highlight each of the color names in their respective color, and show a list withcolored color names, and line numbers.

The exec also sets up a shadow variable, which highlights the first character of each line with a color in reversevideo. This 'shadowing' effect is only available in dynamic areas, and allows a change of the attribute at thecharacter level, with no intervening 'blank' space caused by a field attribute.

Note that the shadow variable (variables shadata and dynshad in this example) is optional. You could leave it outof the panel and the exec and you would not have character level coloring.

The display is handled by setting a variable which contains the program data (dyndata) and then setting a secondvariable which will actually display the data (DYNAREA). The second variable is needed in this case to handlescrolling. The same manipulation with the length of the dyndata variable is done to the associated shadow variable,dynshad.

The variable dyndata starts with the first line to be displayed. When a scroll request is received, the programcalculates the offset into DYNDATA of the first displayed line, and creates DYNAREA from there.

In a compiled language, you do not necessarily need to VDEFINE a second variable (the one actually used in thepanel), since VREPLACE makes setting the second variable very easy.

SHARE Winter '99 41-1

Page 85: Panels

Using the panel ISPF

Scrolled to top Ä

- - - - - - - - - - - - - - - - - - - - - E X A M P L E F O R U S I N G A D Y N A M I C A R E A - - - - - - - - - - - - - - - - - - - - -C O M M A N D = = = > S C R O L L = = = > C S R

T h i s a r e a i s f i x e d . s i z e : 1 8 0 3 0

T h i s i s a n i n p u t f i e l d = = = >

T h i s i s e x t e n d a b l e T h i s i s r e d 1T h i s i s e x t e n d a b l e T h i s i s b l u e 2T h i s i s e x t e n d a b l e T h i s i s g r e e n 3T h i s i s e x t e n d a b l e T h i s i s r e d 4T h i s i s e x t e n d a b l e T h i s i s b l u e 5

.

.

.T h i s i s e x t e n d a b l e T h i s i s b l u e 1 4T h i s i s e x t e n d a b l e T h i s i s g r e e n 1 5

T h i s s h o u l d b e a t t h e b o t t o m o f t h e s c r e e n w h e n i n f u l l s c r e e n .. .

Scrolled to bottom Ä

- - - - - - - - - - - - - - - - - - - - - E X A M P L E F O R U S I N G A D Y N A M I C A R E A - - - - - - - - - - - - - - - - - - - - -C O M M A N D = = = > S C R O L L = = = > C S R

T h i s a r e a i s f i x e d . s i z e : 6 0

T h i s i s a n i n p u t f i e l d = = = >

T h i s i s e x t e n d a b l e T h i s i s g r e e n 6 0 0T h i s i s e x t e n d a b l e * * * * * * * * * * B O T T O M * * * * * * * * * * *T h i s i s e x t e n d a b l eT h i s i s e x t e n d a b l eT h i s i s e x t e n d a b l e

.

.

.T h i s i s e x t e n d a b l eT h i s i s e x t e n d a b l eT h i s i s e x t e n d a b l e

T h i s s h o u l d b e a t t h e b o t t o m o f t h e s c r e e n w h e n i n f u l l s c r e e n .. .

SHARE Winter '99 42

Page 86: Panels

Using the panel /Notes ISPF

This shows how the example looks when scrolled to the top (UP MAX) and to the bottom (DOWN MAX). Notice the'size:' field. That is the size of the DYNAREA variable. It does not have to exactly match the size of the dynamic areathat is displayed. ISPF handles that for you.

If you want to have DOWN MAX fill the screen with data, you can, in the )PROC section, set a variable using theLVLINES(...) function and base your calculations on that.

SHARE Winter '99 42-1

Page 87: Panels

Scrolling a dynamic area ISPF

ISPF returns ZSCROLLN, ZSCROLLA, ZVERB

ZVERB Direction of scroll (UP, DOWN, LEFT, RIGHT)

ZSCROLLA Amount to scroll (MAX, CSR, HALF, DATA,number, etc.)

ZSCROLLN Number of lines to scroll

ÄH UP/DOWN scrolling

If all of your data is in one variable, use(ZSCROLLN*area width) to locate the start of thedisplayed variable.

In a compiled language, VREPLACE is good for creatingthe displayed variable.

ÄH LEFT/RIGHT scrolling

Left/right scrolling usually involves creating a newvariable to display.

This is because the dynamic area uses acontiguous string.

SHARE Winter '99 43

Page 88: Panels

Scrolling a dynamic area /Notes ISPF

When the user requests a scrolling action for the dynamic area, ISPF returns several variables which containinformation about the requested scroll. This information is checked by the application and is then used by theapplication to reset the dynamic area variable.

ZVERB Direction of scroll (UP, DOWN, LEFT, RIGHT)

ZSCROLLA Amount to scroll (MAX, CSR, HALF, DATA, number, etc)

ZSCROLLN Number of lines to scroll

SHARE Winter '99 43-1

Page 89: Panels

Miscellaneous Information ISPF

Character level coloring is available through shadowvariables.

You can use ISPEXEC PQUERY to get area sizes.

LVLINE() function in )PROC section may be used todetermine last visible line (for DOWN MAX)

you can allow for automatic expansion for 3278 Mod-5 bycoding / / in the dynamic area definition in the )BODYsection and coding a variable width on the )BODYstatement.

For extendable areas, other characters on the line arereplicated on each 'extended' line.

From panel ISREFR01 (edit user panel):Â Ä

) B O D Y W I D T H ( & Z W I D T H ) E X P A N D ( / / )% E D I T - - - - - . Z T I T L E - - - - - - - - - - - - - - - - - - - / - / - - - - - - - - - - - - - - - - - % C O L U M N S . Z C L . Z C R % %% C O M M A N D = = = > _ Z C M D / / % S C R O L L = = = > _ Z %! Z D A T A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / - / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !! / / !! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / - / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !) P R O C

& L A S T L I N E = & L V L I N E ( Z D A T A )) E N D

. .

SHARE Winter '99 44

Page 90: Panels

Miscellaneous Information /Notes ISPF

ISPF has several functions which can be used to help get additional information to assist in the definition of thedynamic area variable or scrolling requests.

PQUERY can help get information about areas contained within the panel. You specify the area name, and ISPF canreturn such things as the area type, and its' width and depth.

The LVLINE built-in function can be called from the )INIT, )REINIT, or )PROC sections. It returns the line number ofthe last line within a dynamic, graphic, or scrollable area which was visible to the end-user on the currentlydisplayed panel. This is extremely useful when the user can be in split-screen mode.

Your application can be coded to take advantage of larger-size terminal screens by using extendable areas, and bycoding variable widths (on the )BODY section) and using the automatic expansion feature of ISPF. On the )BODYsection, you code the EXPAND keyword, and then specify the characters you will place in the text of the panel whenyou wish to expand. The character in the )BODY that you place between these two characters will be used when theexpansion is done.

SHARE Winter '99 44-1

Page 91: Panels

DTL vs 'Old style ISPF

What is DTL

Dialog Tag Language

SGML for panels

ÄH Frees developer from many panel design decisions

ÄH Easy way to create CUA compliant dialogs

Why use DTL

CUA compliance

Standards within a group

Application keylists outside of profiles

Global changes

ÄH DTL files imbed sections1. Often used phrases2. Variable class definitions3. Action Bar definitions

SHARE Winter '99 45

Page 92: Panels

DTL vs 'Old style /Notes ISPF

Dialog Tag Language is a tag-based markup language, such as BookMaster. DTL was created for various reasons,including

1. Ease of use of markup tags. The tag names directly relate to the 'element' that they create, such as a < P > tagcreates a paragraph.

2. Flexibility in application development. GML's can be quickly changed and regenerated. Use of imbed "entities"allow global changes across your application panels, and aids in reuse.

3. It provides consistency in dialog elements when many programmers are working on the same application, or fornew programmers.

4. DTL enforces some formatting rules defined by CUA, so your programmers do not have to be experts in CUA todefine CUA conforming application elements.

5. It enables NLS support and provides translations of various keywords, such as the "More:" used on ScrollableAreas.

Application keylists can be created outside of using actual profiles, by using < K E Y L > and < K E Y I > tags. Thekeylists are created as xxxKEYS where xxx is your application ID used when converting the GML.

Using DTL Imbed files, or Entities, allows for reuse within your application development. This is useful forimbedding panel sections, such as an action bar definition which is used globally, keylists, variable classeswithin an application, and often used words or phrases, such as your company name.

SHARE Winter '99 45-1

Page 93: Panels

Sample DTL Source ISPF

< . D O C T Y P E D M S Y S T E M (< . E N T I T Y k e y s S Y S T E M " g u i k e y " >< . E N T I T Y c m p n S Y S T E M " g b l " >< . E N T I T Y s t a t e s S Y S T E M " g u i s t e " > ) >

& k e y s ;

< v a r c l a s s n a m e = n m e t y p e = ' c h a r 3 0 ' >< v a r c l a s s n a m e = i n i t y p e = ' c h a r 1 ' >< v a r c l a s s n a m e = a d d r t y p e = ' c h a r 3 5 ' >< v a r c l a s s n a m e = z i p t y p e = ' c h a r 7 ' >< v a r c l a s s n a m e = c h 2 5 t y p e = ' c h a r 2 5 ' >

< v a r c l a s s n a m e = y r s t y p e = ' c h a r 2 ' >< c h e c k l >

< c h e c k i T Y P E = N U M >< / c h e c k l >

< v a r c l a s s n a m e = s a l t y p e = ' c h a r 7 ' >< c h e c k l >

< c h e c k i T Y P E = N U M >< / c h e c k l >

< v a r c l a s s n a m e = s t e t y p e = ' c h a r 2 ' >< x l a t l f o r m a t = u p p e r >< / x l a t l >< c h e c k l >

< c h e c k i & s t a t e s ; >< / c h e c k l >

< v a r c l a s s n a m e = g a r d t y p e = ' c h a r 8 ' >< x l a t l f o r m a t = u p p e r >< / x l a t l >< c h e c k l m s g = g u i 2 0 1 >

< c h e c k i t y p e = v a l u e s p a r m 1 = e q p a r m 2 = " P O R C H B A C K Y A R D F A R M N O N E "< / c h e c k l >

< v a r c l a s s n a m e = y e s n o t y p e = ' c h a r 3 ' >< x l a t l f o r m a t = u p p e r >< / x l a t l >< c h e c k l >

< c h e c k i t y p e = v a l u e s p a r m 1 = e q p a r m 2 = " Y E S N O "< / c h e c k l >

< v a r c l a s s n a m e = n u m 1 0 t y p e = ' c h a r 2 ' >< c h e c k l >

< c h e c k i t y p e = r a n g e p a r m 1 = 0 p a r m 2 = 1 0< / c h e c k l >

SHARE Winter '99 46

Page 94: Panels

Sample DTL Source /Notes ISPF

The next foils contain the GML source code for the panel shown in the Scrollable Area section of this presentation.There are some minor differences between the two, such as indentations.

The <!DOCTYPE DM SYSTEM ( ) > statement is the first in the GML file, and it defines to ISPF that it is a GML filefor conversion. It also defines the ENTITY's that will be used for the file during the conversion process.

The &keys is an imbed file (shown later in the notes pages) which contains the entire keylist mapping definition,which will be included into the source file when the conversion is done.

The <VARCLASS> tag contains the name of "classes" of data, which will then be used to associate a variable toa class. This defines data to be character, numeric, DBCS, or mixed (DBCS and SBCS). It specifies the length, andoptionally specifies a default message to be displayed for type failures. You may also specify translates < X L A T L >for things such as FORMAT=UPPER, which will use CAPS(ON) for the field. Checks for certain values or ranges canalso be done in this area with the <CHECKL> and <CHECKI> tags.

SHARE Winter '99 46-1

Page 95: Panels

Sample DTL Source ... ISPF

< v a r l i s t >

< v a r d c l n a m e = l n a m e v a r c l a s s = n m e >< v a r d c l n a m e = f n a m e v a r c l a s s = n m e >< v a r d c l n a m e = m i v a r c l a s s = i n i >< v a r d c l n a m e = s a d d r v a r c l a s s = a d d r >< v a r d c l n a m e = a a d d r v a r c l a s s = a d d r >< v a r d c l n a m e = c a d d r v a r c l a s s = a d d r >< v a r d c l n a m e = p a d d r v a r c l a s s = s t e >< v a r d c l n a m e = p c o d e v a r c l a s s = z i p >< v a r d c l n a m e = o c c v a r c l a s s = a d d r >< v a r d c l n a m e = y r v a r c l a s s = y r s >< v a r d c l n a m e = i n c v a r c l a s s = s a l >< v a r d c l n a m e = g s z v a r c l a s s = g a r d >< v a r d c l n a m e = h o w h e a r v a r c l a s s = c h 2 5 >< v a r d c l n a m e = s i m s e r v v a r c l a s s = c h 2 5 >< v a r d c l n a m e = c a t v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = r e p v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = t i m e v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = g e n v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = s p e c v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = r e t p v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = c o m p v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = s u i t v a r c l a s s = n u m 1 0 >< v a r d c l n a m e = G F v a r c l a s s = y e s n o >< v a r d c l n a m e = G O v a r c l a s s = y e s n o >< v a r d c l n a m e = B B v a r c l a s s = y e s n o >

< / v a r l i s t >

SHARE Winter '99 47

Page 96: Panels

Sample DTL Source /Notes ISPF

The <VARLIST> and </VARLIST> define the start and end of the variable list. Inside you code your variabledeclarations.

The < V A R D C L > tag associates a variable to be used in the GML with the classes that were just defined.

The <VARCLASS> and < V A R D C L > tags ARE NOT REQUIRED for your conversion but it is an easy way to getcertain verification for variables done in the )PROC sections, and is also required for portability to the OS/2 DialogManager.

SHARE Winter '99 47-1

Page 97: Panels

Sample DTL Source ... ISPF

< P A N E L N A M E = S U R V E YK E Y L I S T = g u i 1H E L P = s u r v y hD E P T H = 2 4W I D T H = 7 6 >& c m p n ;

< i n f o >< P C O M P A C T > P r e s s < H P > P F 8 < / H P > t o g o f o r w a r d , < H P > P F 7 < / H P > t o g o b a c k ,< H P > P F 3 < / H P > t o e x i t< / i n f o >< a r e a d e p t h = 2 m a r g i n w = 2 e x t e n d = o n >< i n f o >< p c o m p a c t >T h a n k y o u f o r p a r t i c i p a t i n g i n t h i s s u r v e y . P l e a s e r e s t a s s u r e dt h a t t h e i n f o r m a t i o n y o u p r o v i d e w i l l r e m a i n < H P > s t r i c t l yc o n f i d e n t i a l < / h p > u n l e s s w e f e e l l i k e d i v u l g i n g i t .< / i n f o >< i n f o >< p > < h p > I n f o r m a t i o n a b o u t y o u < / h p >< / i n f o >< d i v i d e r >< D T A C O L P M T W I D T H = 2 3 e n t w i d t h = 3 1 >< D T A F L D D A T A V A R = l n a m e

U S A G E = i nr e q u i r e d = y e sP M T L O C = b e f o r e >L a s t N a m e

< / D T A F L D >< D T A F L D D A T A V A R = f n a m e

U S A G E = i nr e q u i r e d = y e sP M T L O C = b e f o r e >F i r s t N a m e

< D T A F L D D A T A V A R = M iU S A G E = i ne n t w i d t h = 1 >M i d d l e I n i t i a l

< D I V I D E R >< D T A F L D D A T A V A R = s a d d r

U S A G E = i nr e q u i r e d = y e se n t w i d t h = 3 5 >S t r e e t A d d r e s s

SHARE Winter '99 48

Page 98: Panels

Sample DTL Source /Notes ISPF

The < P A N E L > tag defines certain characteristics of the panel, such as the panel name (member name), a keylistif one is to be used when the panel is displayed, panel help if one is needed, width and depth. Other characteristicscan also be specified. For complete documentation of ALL DTL tags, see the ISPF Dialog Tag Language Guide andReference manual.

Other tags are then used, and most are very easy to understand what they will create. I will give a brief summaryof those tags used on this foil:

INFO - defines an information region, this is required for some tags to be nested under, such as the < P > tag.

P - defines a paragraph. The default is to format with a blank line prior to the paragraph text. However, usingthe COMPACT keyword will suppress that blank line.

HP - defines a highlighted phrase. This text will be displayed in turquoise (the default, it can be changed usingCUAATTR utility by the end-user), which stands out from the rest of the text.

AREA - defines a portion of the panel body, one or more of which can be scrollable. If the DEPTH attribute isused, it defines a scrollable area within your )BODY section, and all information defined within its' bounds areadded to an )AREA section.

DIVIDER - creates one or more divider lines, which can be blank or solid/dashed.

DTACOL - defines default parameters for DTAFLD's within it.

DTAFLD - defines an input and/or output field on the panel, along with the characteristics of that field.

SHARE Winter '99 48-1

Page 99: Panels

Sample DTL Source ... ISPF

< D T A F L D D A T A V A R = a a d d rU S A G E = i nr e q u i r e d = y e se n t w i d t h = 3 5 >A p a r t m e n t N u m b e r

< D T A F L D D A T A V A R = c a d d rU S A G E = i nr e q u i r e d = y e se n t w i d t h = 3 5 >C i t y

< D T A F L D D A T A V A R = p a d d rU S A G E = i nr e q u i r e d = y e sd e s w i d t h = 3 5e n t w i d t h = 2 >S t a t e o r P r o v i n c e< D T A F L D D > ( U s e 2 l e t t e r a b b r e v i a t i o n ) < / d t a f l d d >

< D T A F L D D A T A V A R = p c o d eU S A G E = i ne n t w i d t h = 7 >Z i p o r P o s t a l C o d e

< D I V I D E R >< D T A F L D D A T A V A R = o c c

U S A G E = i ne n t w i d t h = 3 5 >O c c u p a t i o n

< D T A F L D D A T A V A R = y rU S A G E = i ne n t w i d t h = 2 >N u m b e r o f y e a r s a t y o u r c u r r e n t j o b

< D T A F L D D A T A V A R = i n cU S A G E = i nr e q u i r e d = n od e s w i d t h = 3 5e n t w i d t h = 7 >A n n u a l i n c o m e< S O U R C E T Y P E = P R O C >

& G S Z = T R A N S ( T R U N C ( & G S Z , 1 ) P , P O R C H B , B A C K Y A R D F , F A R M N , N O N E * , ' ? '< / S O U R C E >< D T A F L D D > ( o p t i o n a l ) < / d t a f l d d >

< D T A F L D D A T A V A R = g s zU S A G E = i nd e s w i d t h = 2 9e n t w i d t h = 8 >S i z e o f y o u r g a r d e n< D T A F L D D > ( P o r c h , B a c k y a r d , F a r m , N o n e ) < / d t a f l d d >

< / D T A C O L >

SHARE Winter '99 49

Page 100: Panels

Sample DTL Source /Notes ISPF

Other tags on this foil:

DTAFLDD - Data field descriptor text

SOURCE - Defines panel processing statements

The <SOURCE> tag allows you to place panel logic statements directly into the processing sections of the panel,if you need additional logic that ISPF does not provide. A good example of this is if you wish to invoke the PANEXITstatement from within the )PROC section of the panel for a panel exit.

SHARE Winter '99 49-1

Page 101: Panels

Sample DTL Source ... ISPF

< d i v i d e r >< i n f o >< P > < h p > I n f o r m a t i o n a b o u t o u r s e r v i c e s < / h p >< / i n f o >< d i v i d e r >< D T A F L D D A T A V A R = h o w h e a r

U S A G E = i np m t w i d t h = 3 8e n t w i d t h = 2 6 >W h e r e d i d y o u h e a r a b o u t o u r s e r v i c e s ?

< D T A F L D D A T A V A R = s i m s e r vU S A G E = i np m t w i d t h = 3 8e n t w i d t h = 2 6 >W h a t s i m i l a r s e r v i c e s h a v e y o u u s e d ?

< i n f o >< L I N E S >P l e a s e r a t e t h e f o l l o w i n g c a t e g o r i e s o n a s c a l e o f 1 t o 1 0 .

1 & l t s y m ; ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 6 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ& g t s y m ; 1 0P o o r A v e r a g e E x c e l l e n t

P l e a s e u s e a 0 f o r ' N o t A p p l i c a b l e '

< / l i n e s >< / i n f o >< D T A C O L p m t w i d t h = 2 7 e n t w i d t h = 2 >< D T A F L D D A T A V A R = c a t

U S A G E = i nr e q u i r e d = y e s >C a t a l o g

< D T A F L D D A T A V A R = r e pU S A G E = i nr e q u i r e d = y e s >S a l e s r e p r e s e n t a t i v e s

< D T A F L D D A T A V A R = t i m eU S A G E = i nr e q u i r e d = y e s >T i m e t o p r o c e s s y o u r o r d e r

< D T A F L D D A T A V A R = g e nU S A G E = i nd e s w i d t h = 2 6r e q u i r e d = y e s >G e n e r a l m e r c h a n d i s e< d t a f l d d > ( G e n e r a l s e e d s a n d p l a n t s ) < / d t a f l d d >

SHARE Winter '99 50

Page 102: Panels

Sample DTL Source /Notes ISPF

Other tags on this foil:

LINES - unformatted text within an information region. The text is put is EXACTLY as you have it typed.

SHARE Winter '99 50-1

Page 103: Panels

Sample DTL Source ... ISPF

< D T A F L D D A T A V A R = s p e cU S A G E = i nd e s w i d t h = 2 6r e q u i r e d = y e s >S p e c i a l t y m e r c h a n d i s e< d t a f l d d > ( R a r e p l a n t s , t o o l s , e t c ) < / d t a f l d d >

< D T A F L D D A T A V A R = r e t pU S A G E = i nr e q u i r e d = y e s >R e t u r n P o l i c y

< D T A F L D D A T A V A R = c o m pU S A G E = i nr e q u i r e d = y e s >C o m p l a i n t D e p a r t m e n t

< D T A F L D D A T A V A R = s u i tU S A G E = i nr e q u i r e d = y e s >O u r L a w y e r s< S O U R C E T Y P E = P R O C >

& G F = T R A N S ( T R U N C ( & G F , 1 ) Y , Y E S N , N O * , ' ? '& G O = T R A N S ( T R U N C ( & G O , 1 ) Y , Y E S N , N O * , ' ? '& B B = T R A N S ( T R U N C ( & B B , 1 ) Y , Y E S N , N O * , ' ? '

< / S O U R C E >< / d t a c o l >< i n f o >< P > < h p > I n f o r m a t i o n a b o u t y o u r b u y i n g h a b i t s < / h p >< / i n f o >< d i v i d e r >< D T A F L D D A T A V A R = g f

U S A G E = i ne n t w i d t h = 3r e q u i r e d = y e s >D o y o u s u b s c r i b e t o o u r < h p > g a r d e n i n g f a s h i o n s c a t a l o g ? < / h p >

< D T A F L D D A T A V A R = g oU S A G E = i ne n t w i d t h = 3r e q u i r e d = y e s >D o y o u b u y g a r d e n < h p > s u p p l i e s f o r o t h e r p e o p l e ? < / h p >

< D T A F L D D A T A V A R = b bU S A G E = i ne n t w i d t h = 3r e q u i r e d = y e s >W o u l d y o u b e i n t e r e s t e d i n b u y i n g a < h p > r e a l l y b i g b r i d g e ? < / h p >

< / a r e a >< C M D A R E A >< / P A N E L >

SHARE Winter '99 51

Page 104: Panels

Sample DTL Source /Notes ISPF

Other tags on this foil:

CMDAREA - specifies your command line. You can specify a help panel name and your prompt text (the defaultis 'Command').

Following are the GML imbed files:

File GUIKEY:

< K E Y L N A M E = g u i 1 >< K E Y I K E Y = F 1 C M D = H e l p F K A = Y e s > H e l p< K E Y I K E Y = F 3 C M D = E x i t F K A = Y e s > E x i t< K E Y I K E Y = F 7 C M D = U p f K A = y e s > B k w d< K E Y I K E Y = F 8 C M D = D o w n F K A = y e s > F w d< K E Y I K E Y = F 1 2 C M D = C a n c e l F K A = Y e s > C a n c e l

< / K E Y L >

File GUISTE:

T Y P E = V A L U E S P A R M 1 = E QP A R M 2 = " A K A S H I G A N C S C N Y K Y Q C B C W A H I M I T X A L F L "

File GBL:

S U P E R S E E D Y S E E D C O M P A N Y

SHARE Winter '99 51-1

Page 105: Panels

Generated 'Panel' source ISPF

) P A N E L K E Y L I S T ( G U I 1 , G U I )) A T T R D E F A U L T ( _ + % ) F O R M A T ( M I X )³ T Y P E ( P T ). T Y P E ( F P )@ T Y P E ( N T )# T Y P E ( E T )$ T Y P E ( N E F ) P A D C ( _ ). T Y P E ( N E F ) C A P S ( O N ) P A D C ( _ )\ T Y P E ( D T ). T Y P E ( W A S L ) S K I P ( O N )/ A R E A ( S C R L ) E X T E N D ( O N )

) B O D Y W I N D O W ( 7 6 , 2 4 ) C M D ( Z C M D )³ S U P E R S E E D Y S E E D C O M P A N Y @@ C o m m a n d = = = > $ Z@@ P r e s s # P F 8 @ t o g o f o r w a r d , # P F 7 @ t o g o b a c k , # P F 3 @ t o e x i t @ @/ S A R E A 3 7 // /

SHARE Winter '99 52

Page 106: Panels

Generated 'Panel' source /Notes ISPF

The next foils are the edited source that was generated.

When the GML's are converted, all of the attribute bytes in the generated panel are hex codes. I have edited thesource and changed these hex codes into characters for the use in this presentation.

As you can see, we generated this panel using CUA Attribute types in the )ATTR section. This is an option on theconversion process. There are two TYPE(NEF) fields generated, since we declared a VARCLASS which also saidFORMAT=UPPER on an XLATL tag.

The scrollable area, seen here below the panel information line, matches to an )AREA section, shown on the nextfoil.

SHARE Winter '99 52-1

Page 107: Panels

Generated 'Panel' source ... ISPF

) A R E A S A R E A 3 7@ T h a n k y o u f o r p a r t i c i p a t i n g i n t h i s s u r v e y . P l e a s e r e s t a s s u r e d t h a t @ @@ @ t h e i n f o r m a t i o n y o u p r o v i d e w i l l r e m a i n # s t r i c t l y c o n f i d e n t i a l @ u n l e s s w e @ @@ @ f e e l l i k e d i v u l g i n g i t . @ @@@ # I n f o r m a t i o n a b o u t y o u @ @

.. L a s t N a m e . . . . . . $ Z @. F i r s t N a m e . . . . . . $ Z @. M i d d l e I n i t i a l . . . . $ Z @

.. S t r e e t A d d r e s s . . . . $ Z @. A p a r t m e n t N u m b e r . . . $ Z @. C i t y . . . . . . . . . $ Z @. S t a t e o r P r o v i n c e . . . . Z @ \ ( U s e 2 l e t t e r a b b r e v i a t i o n ) @. Z i p o r P o s t a l C o d e . . $ Z @

.. O c c u p a t i o n . . . . . . $ Z @. N u m b e r o f y e a r s a t y o u r. c u r r e n t j o b . . . . . . $ Z @. A n n u a l i n c o m e . . . . . $ Z @ \ ( o p t i o n a l ) @. S i z e o f y o u r g a r d e n . . . Z @ \ ( P o r c h , B a c k y a r d , F a r m , N o n e ) @

@@ # I n f o r m a t i o n a b o u t o u r s e r v i c e s @ @

.. W h e r e d i d y o u h e a r a b o u t o u r s e r v i c e s ? $ Z @. W h a t s i m i l a r s e r v i c e s h a v e y o u u s e d ? $ Z @

@@ P l e a s e r a t e t h e f o l l o w i n g c a t e g o r i e s o n a s c a l e o f 1 t o 1 0 . @ @@ 1 <ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 6 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ> 1 0 @ @@ P o o r A v e r a g e E x c e l l e n t @ @@ P l e a s e u s e a 0 f o r ' N o t A p p l i c a b l e ' @ @@ @

. C a t a l o g . . . . . . . . . . $ Z @

. S a l e s r e p r e s e n t a t i v e s . . . $ Z @

. T i m e t o p r o c e s s y o u r o r d e r $ Z @

. G e n e r a l m e r c h a n d i s e . . . . $ Z @ \ ( G e n e r a l s e e d s a n d p l a n t s ) @

. S p e c i a l t y m e r c h a n d i s e . . . $ Z @ \ ( R a r e p l a n t s , t o o l s , e t c ) @

. R e t u r n P o l i c y . . . . . . . $ Z @

. C o m p l a i n t D e p a r t m e n t . . . $ Z @

. O u r L a w y e r s . . . . . . . . $ Z @@@ # I n f o r m a t i o n a b o u t y o u r b u y i n g h a b i t s @ @

.. D o y o u s u b s c r i b e t o o u r # g a r d e n i n g f a s h i o n s c a t a l o g ? . . Z @. D o y o u b u y g a r d e n # s u p p l i e s f o r o t h e r p e o p l e ? . . Z @. W o u l d y o u b e i n t e r e s t e d i n b u y i n g a # r e a l l y b i g b r i d g e ? . . Z @

SHARE Winter '99 53

Page 108: Panels

Generated 'Panel' source /Notes ISPF

Here is the entire text of the scrollable area. You will notice it is very similar to the example we had earlier. Thereare some minor differences, but the text is very much the same.

SHARE Winter '99 53-1

Page 109: Panels

Generated 'Panel' source ... ISPF

) I N I T. Z V A R S = ' ( Z C M D L N A M E F N A M E M I S A D D R A A D D R C A D D R P A D D R P C O D E +

O C C Y R I N C G S Z H O W H E A R +S I M S E R V C A T R E P T I M E G E N S P E C R E T P C O M P S U I T G F G O B B ) '

. H E L P = S U R V Y H& Z C MD = ' '

) P R O CV E R ( & L N A M E , N O N B L A N K )V E R ( & F N A M E , N O N B L A N K )V E R ( & S A D D R , N O N B L A N K )V E R ( & A A D D R , N O N B L A N K )V E R ( & C A D D R , N O N B L A N K )V E R ( & P A D D RL I S T , A K , A S , H I , G A , N C , S C , N Y , K Y , Q C , B C , W A , H I , M I , T X , A L , F L )V E R ( & P A D D R , N O N B L A N K )V E R ( & Y R N U M )V E R ( & I N C N U M )& G S Z = T R A N S ( T R U N C ( & G S Z , 1 ) P , P O R C H B , B A C K Y A R D F , F A R M N , N O N E * , ' ? 'V E R ( & G S Z L I S T , P O R C H , B A C K Y A R D , F A R M , N O N E M S G = G U I 2 0 1 )V E R ( & C A T R A N G E , 0 , 1 0 )V E R ( & C A T , N O N B L A N K )V E R ( & R E P R A N G E , 0 , 1 0 )V E R ( & R E P , N O N B L A N K )V E R ( & T I M E R A N G E , 0 , 1 0 )V E R ( & T I M E , N O N B L A N K )V E R ( & G E N R A N G E , 0 , 1 0 )V E R ( & G E N , N O N B L A N K )V E R ( & S P E C R A N G E , 0 , 1 0 )V E R ( & S P E C , N O N B L A N K )V E R ( & R E T P R A N G E , 0 , 1 0 )V E R ( & R E T P , N O N B L A N K )V E R ( & C O M P R A N G E , 0 , 1 0 )V E R ( & C O M P , N O N B L A N K )V E R ( & S U I T R A N G E , 0 , 1 0 )V E R ( & S U I T , N O N B L A N K )& G F = T R A N S ( T R U N C ( & G F , 1 ) Y , Y E S N , N O * , ' ? '& G O = T R A N S ( T R U N C ( & G O , 1 ) Y , Y E S N , N O * , ' ? '& B B = T R A N S ( T R U N C ( & B B , 1 ) Y , Y E S N , N O * , ' ? 'V E R ( & G F L I S T , Y E S , N O )V E R ( & G F , N O N B L A N K )V E R ( & G O L I S T , Y E S , N O )V E R ( & G O , N O N B L A N K )V E R ( & B B L I S T , Y E S , N O )V E R ( & B B , N O N B L A N K )

) E N D

SHARE Winter '99 54

Page 110: Panels

Generated 'Panel' source /Notes ISPF

The processing sections are shown in this foil. Again, you will notice some slight differences, including the way thatthe conversion utility formats the VER statements onto different lines in some cases. It also generates multiple VERstatements for a single variable, such as a VER for NONBLANK, and a VER for the RANGE.

SHARE Winter '99 54-1

Page 111: Panels

DTL/'Old style' sample ISPF

 ÄS U P E R S E E D Y S E E D C O M P A N Y

P r e s s P F 8 t o g o f o r w a r d , P F 7 t o g o b a c k , P F 3 t o e x i tM o r e : +

T h a n k y o u f o r p a r t i c i p a t i n g i n t h i s s u r v e y . P l e a s e r e s t a s s u r e d t h a tt h e i n f o r m a t i o n y o u p r o v i d e w i l l r e m a i n s t r i c t l y c o n f i d e n t i a l u n l e s s w ef e e l l i k e d i v u l g i n g i t .

I n f o r m a t i o n a b o u t y o u

L a s t N a m e . . . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _F i r s t N a m e . . . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _M i d d l e I n i t i a l . . . . _

S t r e e t A d d r e s s . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _A p a r t m e n t N u m b e r . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _C i t y . . . . . . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _S t a t e o r P r o v i n c e . . . _ _ ( U s e 2 l e t t e r a b b r e v i a t i o n )Z i p o r P o s t a l C o d e . . _ _ _ _ _ _ _

O c c u p a t i o n . . . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _N u m b e r o f y e a r s a t y o u rc u r r e n t j o b . . . . . . _ _

C o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _. .

SHARE Winter '99 55

Page 112: Panels

DTL/'Old style' sample /Notes ISPF

This is the first display....I will not show all of them.

Again, the indentations are a little different, but the general use of the panel is the same.

SHARE Winter '99 55-1

Page 113: Panels

Dynamic areas in DTL ISPF

< . D O C T Y P E D M S Y S T E M ( ) >< v a r c l a s s n a m e = v j b t y p e = ' c h a r 3 ' >< v a r l i s t >< v a r d c l n a m e = j o b d v a r c l a s s = v j b >< / v a r l i s t >< P A N E L N A M E = c u a 2 j o b

K E Y L I S T = c u 2 sD E P T H = 1 0W I D T H = 3 5 >J o b S e l e c t i o n

< R E G I O N D I R = H O R I Z >< D T A F L D D A T A V A R = j o b d p m t w i d t h = 0 e n t w i d t h = 3 >< / d t a f l d >< D A n a m e = j o b e x t e n d = o f f s c r o l l = o n d e p t h = 6 w i d t h = 2 5 s h a d o w = j o b s h a d >< a t t r a t t r c h a r = @ T Y P E = C H A R C O L O R = Y E L L O W H I L I T E = U S C O R E >< a t t r a t t r c h a r = # T Y P E = D A T A O U T C O L O R = T U R Q >< / D A >

< / r e g i o n< C M D A R E A >< / P A N E L >< . ÄÄ C o m m e n t L i n e >

SHARE Winter '99 56

Page 114: Panels

Dynamic areas in DTL /Notes ISPF

This is a brief example of DTL to generate a dynamic area, including a shadow variable and attributes for DATAOUTand TYPE(CHAR) in the )ATTR section of the panel.

The dialog would have to set the variables 'job' and 'jobshad', which would contain the dynamic area string and its'associated shadow variable.

SHARE Winter '99 56-1

Page 115: Panels

ISPF

 ÄF i l e M a n a g e V i e w J o b D e s c r H e l p

- . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -! J o b S e l e c t i o n ! e l D a t a! !

E ! _ _ _ C O O P E R A T I V E ED U C ST U D E N T ! E m p l o y e e! J U N I O R PR O G R A M M E R !! A S S O C I A T E PR O G R A M M E R !

A ! S E N I O R AS S O C PR O G R A M M E R ! _ _ _ _ _ _ _ _ _ _ _! S T A F F PR O G R A M M E R ! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

T ! A D V I S O R Y P RO G R A M M E R !O ! !I ! C o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ !O ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 'S e c r e t a r y N a m e . . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _S e c r e t a r y P h o n e . . . . . _ _ _ _ _ _ _ _

E m e r g e n c y c o n t a c tN a m e . . . . . . . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _R e l a t i o n s h i p . . . . . . _ _ _ _ _ _ _ _ _ _H o m e P h o n e N u m b er . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _W o r k P h o n e N u m b er . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _

P e r f o r m a n c e D a t aC o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

. .

SHARE Winter '99 57

Page 116: Panels

/Notes ISPF

This is the display of the dynamic area panel, as shown within an existing application. As you can see, the datafieldis shown on the right side of the dynamic area. This is done by using a <REGION> tag, and defining it with aDIR=HORIZ for a horizontal region. This states that those elements defined should be placed horizontally acrossthe panel. They can be used in conjunction with vertical regions (<REGION DIR=VERT>) to set columns ofinformation horizontally across the panel.

The underlined characters are also shown in yellow, whereas the rest of the text is in turquoise.

SHARE Winter '99 57-1

Page 117: Panels

Tutorial panels in DTL ISPF

< . D O C T Y P E D M S Y S T E M ( ) >

< h e l p N A M E = c u a 2 h mK E Y L I S T = C U A 2 HD E P T H = 1 5W I D T H = 4 0 >H e l p f o r E m p l o y e e P e r s o n a l I n f o r m a t i o n

< a r e a d e p t h = 9 >< i n f o >< p > T h i s p a n e l d i s p l a y s t h e p e r s o n a l i n f o r m a t i o n a b o u t e a c h c u r r e n t e m p l o y e ea s w e l l a s a l l o w i n g a n e w e m p l o y e e t o b e c r e a t e d .< p > I n c l u d e d o n t h i s p a n e l i s i n f o r m a t i o n a b o u t t h e e m p l o y e e , s u c h a s t h e i rn a m e , a d d r e s s , a n d p h o n e n u m b e r , a s w e l l a s i n f o r m a t i o n a b o u t t h e e m p l o y e e sc u r r e n t p o s i t i o n .< p > W h e n e n t e r i n g a n e w e m p l o y e e t h e n a m e a n d < R P h e l p = c u a 2 h s n > s e r i a l n u m b e r < / R P >a r e c h a n g e d t o i n p u t f i e l d s t o a l l o w t h e s e t o b e e n t e r e d .< / i n f o >< / a r e a >

< / h e l p >

SHARE Winter '99 58

Page 118: Panels

Tutorial panels in DTL /Notes ISPF

This is an example of a tutorial panel, written using the Dialog Tag Language. You will notice that instead of a< P A N E L > tag, it uses a < H E L P > tag. This defines it as a tutorial, rather than an application panel.

Most elements are similar between what can be placed in an application panel and that which can be in a tutorialpanel. The tutorial panels can even have input and output fields and action bars. There are a few constructs whichare not available in tutorial panels, such as <LSTCOL> and <LSTFLD> tags, which are used to create )MODELlines for table displays.

One construct which IS allowed ONLY on tutorial panels are Reference phrases ( < R P > tags). Reference phraseslook like Highlighted Phrases ( < H P > tags), but associate a help panel with the word or phrase. The end-user canrequest help with their cursor on that word or phrase, and ISPF will display the associated help panel.

SHARE Winter '99 58-1

Page 119: Panels

Tutorial panels in DTL ... ISPF

 ÄF i l e M a n a g e V i e w J o b D e s c r H e l p

- . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - - - - - - - - - - - - -! H e l p f o r E m p l o y e e P e r s o n a l I n f o r m a t i o n ! t a! !

E ! M o r e : + ! p l o y e e S e r i a l # :! T h i s p a n e l d i s p l a y s t h e p e r s o n a l !! i n f o r m a t i o n a b o u t e a c h c u r r e n t ! M o r e : +

A ! e m p l o y e e a s w e l l a s a l l o w i n g a n e w ! _ _ _ _ _ _ _ _ _ _! e m p l o y e e t o b e c r e a t e d . ! _ _ _ _ _ _ _ _ _ _

T ! !O ! I n c l u d e d o n t h i s p a n e l i s i n f o r m a t i o n !I ! a b o u t t h e e m p l o y e e , s u c h a s t h e i r !O ! n a m e , a d d r e s s , a n d p h o n e n u m b e r , a s !S ! !S ! !

! !E ! - - - - - - C U R P A N E L = C U A 2 H M P R E V P A N E L !N ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' _ _ _ _ _ _R e l a t i o n s h i p . . . . . . _ _ _ _ _ _ _ _ _ _H o m e P h o n e N u m b er . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _

W o r k P h o n e N u m b er . . . . _ _ _ _ _ _ _ _ _ _ _ _ _ _

P e r f o r m a n c e D a t aC o m m a n d = = = > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

. .

SHARE Winter '99 59

Page 120: Panels

Tutorial panels in DTL /Notes ISPF

SHARE Winter '99 59-1

Page 121: Panels

Field Level Help ISPF

You can pop up a help panel when the cursor is in a fieldand HELP is requested.

) B O D YT h i s i s a f i e l d = = = > _ f l d n a m e +

) H E L PF I E L D ( f l d n a m e ) H E L P ( p a n e l n m e )

) E N D

Use )HELP section (last section).

SHARE Winter '99 60

Page 122: Panels

Field Level Help /Notes ISPF

ISPF provides facilities for field level help. Field level help is presented when the user places the cursor on a fieldand presses the HELP key. The field can by a type INPUT, or OUTPUT, or a dynamic area.

The field and its field level help panel are specified in the )HELP section, which is normally the last section in thepanel definition. You may specify the same panel for more than one field. Field level help panels are tutorial panelsand may have reference phrases within them.

Field level help comes up in a window, so you should use the WINDOW() parameter on the )BODY statement of thehelp panel.

SHARE Winter '99 60-1

Page 123: Panels

Some other constructs ISPF

Point & Shoot

ÄH Enables cursor sensitive selections

Sets a named variable to a value

ÄH Creates buttons in GUI

ÄH Displays in the 'Point and Shoot' color

TYPE(PS) is similar to type text

Attribute PAS(ON|OFF) on TYPE(INPUT) and TYPE(OUTPUT)

)PNTS section

ÄH Note that Point and Shoot in dynamic areas must behandled by the program.

SHARE Winter '99 61

Page 124: Panels

Some other constructs ... ISPF

)PNTS section) P N T S

F I E L D ( f i e l d ³Z P S x x y y y ) V A R ( v a r ) V A L ( v a l u e )

field Any named field

xx 00 for body section or 01 to 99 for number of the areain which field appears

yyy 001 to 999 for relative position of field within the)BODY or )AREA

var Name of variable to set when field is selected

value Value to assign to variable. May not use substitution.

SHARE Winter '99 62

Page 125: Panels

Some other constructs ... ISPF

Mnemonics

You can specify Mnemonics on pulldowns for the GUI interface.They have no effect on 3270 displays.

Unavailable Choices

You can cause a pull-down choice to be unavailable ('greyedout') if a given variable is one (1).

) A B C D E S C ( ' U t i l i t i e s ' ) M N E M ( 1 )P D C D E S C ( ' L i b r a r y ' ) U N A V A I L ( Z U T 1 ) M N E M ( 1 )

A C T I O N R U N ( I S R R O U T E ) P A R M ( ' U 1 ' )P D C D E S C ( ' D a t a s e t ' ) U N A V A I L ( Z U T 2 ) M N E M ( 1 )

A C T I O N R U N ( I S R R O U T E ) P A R M ( ' U 2 ' )P D C D E S C ( ' M o v e / C o p y ' ) U N A V A I L ( Z U T 3 ) M N E M ( 1 )

A C T I O N R U N ( I S R R O U T E ) P A R M ( ' U 3 ' )

UNAVAIL and/or MNEM must come before the ACTION keyword.

SHARE Winter '99 63

Page 126: Panels

New constructs sample ISPF

) A T T R D E F A U L T ( % + _ )@ T Y P E ( P S )# T Y P E ( O U T P U T ) P A S ( O N ) c a p s ( o f f )< T Y P E ( I N P U T ) P A S ( O N ) c a p s ( o f f ). t y p e ( A B )

t y p e ( A B s l )) A B C d e s c ( ' A B c h o i c e ' )

P D C D E S C ( ' R e s e t I n ' ) u n a v a i l ( u r 1 ) A C T I O N R U N ( R 1 )P D C D E S C ( ' R e s e t O u t ' ) u n a v a i l ( u r 2 ) A C T I O N R U N ( R 2 )

) A B C I N I T. z v a r s = s o m e t h i ni f ( & i n v a l = & Z ) & u r 1 = 1E l s e & u r 1 = 0i f ( & o u t v a l = & Z ) & u r 2 = 1E l s e & u r 2 = 0

) B O D Y+ . A B c h o i c e +

+ % P o i n t & S h o o t E x a m p l e +% O p t i o n = = = > _ z c m d ++

% 1 @ S e l e c t i o n 1 + % 3 @ S e l e c t i o n 3 +% 2 @ S e l e c t i o n 2 + % 4 @ S e l e c t i o n 4 +

I n p u t f i e l d b u t t o n ( < i n f l d + ) : & i n v a l +O u t p u t f i e l d b u t t o n ( # o u t f l d + ) : & o u t v a l +) I N I T

& i n f l d = ' P r e s s '& o u t f l d = ' P r e s s '

) R E I N I TR E F R E S H ( * )

) P R O Ci f ( & z c m d = ' R 1 ' )

& z c m d = & Z& i n v a l = & Z

i f ( & z c m d = ' R 2 ' )& z c m d = & Z& o u t v a l = & Z

& Z S E L = T R A N S ( T R U N C ( & z c m d , ' . ' )1 , ' C M D ( % S A Y S e l e c t i o n 1 w a s p r e s s e d . . . & z c m d ) '2 , ' C M D ( % S A Y S e l e c t i o n 2 w a s p r e s s e d . . . & z c m d ) '3 , ' C M D ( % S A Y S e l e c t i o n 3 w a s p r e s s e d . . . & z c m d ) '4 , ' C M D ( % S A Y S e l e c t i o n 4 w a s p r e s s e d . . . & z c m d ) '

' ' , ' '* , ' ? ' )

) P N T SF I E L D ( z p s 0 0 0 0 1 ) V A R ( z c m d ) V A L ( 1 )F I E L D ( z p s 0 0 0 0 2 ) V A R ( z c m d ) V A L ( 3 )F I E L D ( z p s 0 0 0 0 3 ) V A R ( z c m d ) V A L ( 2 )F I E L D ( z p s 0 0 0 0 4 ) V A R ( z c m d ) V A L ( 4 )F I E L D ( i n f l d ) V A R ( i n v a l ) V A L ( ' I n ' )F I E L D ( o u t f l d ) V A R ( o u t v a l ) V A L ( ' o u t ' )) E N D

SHARE Winter '99 64

Page 127: Panels

Panel Exits ISPF

What are they?

Panel exits allow you to perform extra data manipulation andverification in the )INIT, )REINIT, and/or )PROC section of a panel.

Input

Exit data Number passed to data

Panel Name Name of panel invoking the exit

Panel Section Panel area invoking the exitI )INITR )REINITP )PROC

Message id Message id to display if an error occurs(output)

Array Dim Number of variables passed

Varname Array of variable names

Varlen Array of variable lengths

Varval Contiguous storage containing variablevalues

SHARE Winter '99 65

Page 128: Panels

Panel Exits /Notes ISPF

Panel exits allow you to add additional logic to your panel which can be used to update variables, verify variables,and perform functions which regular ISPF panel language can not accomplish. For example, setting up variablesbefore a display, such as shadow variables, or variables based on constantly changing system values can be donein panel exits. If you want to verify a field based on different criteria, this can be done in a panel exit.

Panel exits receive as input individual variable names, lengths, and values, as well as a variable which can be usedto store data between invocations. The panel exit also receives an indicator of what panel is calling the exit, andwhat section of the panel the exit is being called from. It can be called from the )INIT, )REINIT, or )PROC sectionsof the panel.

Another example of using panel logic is command line checking or alteration. Aside from using the panel exit to dovariable verification, it can also be used to examine and preprocess the command line. For commands that maybe seen by your application, (not ones in the ISPF or application command table), you can examine the commandline during )PROC section processing, and alter it if you want to before control returns to the program that displayedthe panel.

SHARE Winter '99 65-1

Page 129: Panels

Panel Exits ... ISPF

Output

Returns a return code in Register 15:0 Successful operation8 'Verification' failed. Display message passed back

and redisplay panel.Other Severe error. ISPF fails the display.

Restrictions

Must be in a compiled language (not REXX)

Exit can not issue ISPF services

Can change passed variable VALUES, but NOT the lengthsof the variables.

Tip

Make sure variables passed in are padded to allow for anyupdates to be made to them. ISPF may backscan off blanksbefore passing value to the exit.

SHARE Winter '99 66

Page 130: Panels

Panel Exits /Notes ISPF

A panel exit has several methods of output.

A panel exit can return a return code in register 15. A zero means successful completion. An 8 means display areturned message id. Any other return code will be assumed by ISPF to indicate a severe error.

As mentioned, the exit can pass back a message id to display.

The exit can change the 'exdata' exit data word. This can be used as an anchor pointer to exit data.

Lastly, the exit can change the values of the variables that are passed into it. However: The exit must not changethe lengths of the variables passed to it.

Panel exits do not have access to ISPF services (ISPLINK, ISPEXEC).

Panel exits must be in a compiled language. Compiled REXX can not be used.

One thing to look out for: ISPF panel logic may strip trailing blanks off of variables before passing them to the panelexit. If you plan to update a variable, you may want to pad it with non-blank characters in the panel logic beforepassing it to the exit so that you can pass back a longer (non-blank) string than would have been passed in.

SHARE Winter '99 66-1

Page 131: Panels

Dynamic loading or Preloading ISPF

Your dialog can preload the exit before calling DISPLAY orSELECT, or it may have ISPF load the exit dynamically.

Ä Preload

P A N E X I T ( ( Z C M D , V A R 1 , V A R 2 ) , P G M , a d d r e s s , e x i t Äd a t a , M S G = m s g i d )

address is a variable name containing the address ofthe exit

Ä Dynamic load

P A N E X I T ( ( Z C M D , V A R 1 , V A R 2 ) , L O A D , m o d n a m e , e x i t Äd a t a , M S G = m s g i d )

modname is the actual name of the exit entry point.

The exit stays loaded for the entire select level.

SHARE Winter '99 67

Page 132: Panels

Dynamic loading or Preloading /Notes ISPF

ISPF will load your exit dynamically if you request it to. The exit is loaded when first used, and remains loaded untilthe current SELECT level completes. If an intervening SELECT level occurs between panel displays, the exit maybe reloaded.

SHARE Winter '99 67-1

Page 133: Panels

A Sample Panel Exit ISPF

This sample, written in PL/I is a panel exit for the Editor. Itcauses the phrase containing the cursor to be highlighted, thesame way browse highlights words. A phrase is any non-blankstring, delimited by blanks).

I copied panel ISREFR01 and made a few changes.

1. Added a shadow variable to the dynamic area.

2. Added W as a TYPE(CHAR) in the )ATTR section

3. Setup some variables to pass to the exit the )REINIT section.

4. Added a call to my exit (HILITE) in the )REINIT section.

SHARE Winter '99 68

Page 134: Panels

A Sample Panel Exit /Notes ISPF

The sample panel exit I am providing causes the editor to highlight the phrase containing the cursor in a mannersimilar to the way Browse highlights the cursor. This is done by using a modified copy of panel ISREFR01, thesupplied alternate (or user) panel for edit. I made the following changes to that panel:

1. I added a shadow variable (called SHADOW) to the )BODY of the panel. It is this shadow variable which willcause the highlighting to occur, since the character level attributes of the shadow variable supersede the defaulthighlighting of edit's dynamic area.

2. The )ATTR section was modified to add the character 'W' as an attribute character for the shadow variable. Forthe characters in edit's dynamic area which I want to highlight, I will add a 'W' to the corresponding position inthe shadow variable. The W is defined in this example as TYPE(CHAR) COLOR(WHITE) INTENS(HIGH).

3. In order for the exit to know where the cursor is, and to have a shadow variable to update, I set up somevariables before the exit is called. I used the fact that the editor sets up the ZWIDTH variable automatically totell ISPF the screen width to use. I used some built-in functions (.CURSOR, .CSRPOS) to get cursor position and,most importantly, I allocated some space for the shadow variable. I know that the shadow variable has to bethe same length as the ZDATA variable, and that I can not change the length of any variables. Therefore, I justassigned ZDATA to the shadow variable, to allocate the space, then the 1st thing the exit will do is to set all ofthe characters in the shadow variable to blanks.

4. I also added the actual call to the exit (which I call HILITE) to the )REINIT section. I used )REINIT because the 1sttime the screen is shown, the cursor is usually on the command line, so the exit is not necessary in the )INITsection. It is not needed in the )PROC section because no post-display processing is needed in this example.

(Notes continued on next page)

SHARE Winter '99 68-1

Page 135: Panels

Sample panel-exit panel ISPF

Alternate edit panelÄH May be copied to ISREDDE (primary edit panel)

 Ä) A T T R

_ T Y P E ( I N P U T ) C A P S ( O F F ) I N T E N S ( H I G H ) F O R M A T ( & M I X E D )! A R E A ( D Y N A M I C ) E X T E N D ( O N ) S C R O L L ( O N ) U S E R M O D ( 2 0 ). T Y P E ( O U T P U T ) I N T E N S ( H I G H ) P A D ( - )

0 1 T Y P E ( D A T A O U T ) I N T E N S ( L O W )0 2 T Y P E ( D A T A O U T ) I N T E N S ( H I G H )0 3 T Y P E ( D A T A O U T ) S K I P ( O N ) / * F O R T E X T E N T E R C M D . F I E L D * /0 4 T Y P E ( D A T A I N ) I N T E N S ( L O W ) C A P S ( O F F ) F O R M A T ( & M I X E D )0 5 T Y P E ( D A T A I N ) I N T E N S ( H I G H ) C A P S ( O F F ) F O R M A T ( & M I X E D )0 6 T Y P E ( D A T A I N ) I N T E N S ( L O W ) C A P S ( I N ) F O R M A T ( & M I X E D )0 7 T Y P E ( D A T A I N ) I N T E N S ( H I G H ) C A P S ( I N ) F O R M A T ( & M I X E D )0 8 T Y P E ( D A T A I N ) I N T E N S ( L O W ) F O R M A T ( D B C S )0 9 T Y P E ( D A T A I N ) I N T E N S ( L O W ) F O R M A T ( E B C D I C )0 A T Y P E ( D A T A I N ) I N T E N S ( L O W ) F O R M A T ( & M I X E D )2 0 T Y P E ( D A T A I N ) I N T E N S ( L O W ) C A P S ( I N ) F O R M A T ( & M I X E D )

W T Y P E ( C H A R ) C O L O R ( W H I T E ) I N T E N S ( H I G H )) B O D Y W I D T H ( & Z W I D T H ) E X P A N D ( / / )% E D I T - - - - - . Z T I T L E - - - - - - - - - - - - - - - - - - - / - / - - - - - - - - - - - - - - - - - - - - - % C O L U M N S . z c l . z c r % %% C O M M A N D = = = > _ Z C M D / / % S C R O L L = = = > _ z %! Z D A T A , S H A D O W - - - - - - - - - - - - - - - - - - - - - - - - / - / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !! / / !! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - / - / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - !) I N I T

. H E L P = I S R 2 0 0 0 0 / * D e f a u l t t u t o r i a l n a m e * /

. Z V A R S = ' Z S C E D ' / * S c r o l l a m o u n t v a r i a b l e n a m e * /& M I X E D = M I X / * S e t f o r m a t m i x * /I F ( & Z P D M I X = N ) / * I f e b c d i c m o d e r e q u e s t e d * /

& M I X E D = E B C D I C / * S e t f o r m a t e b c d i c * /

) R E I N I T& S H A D O W = & Z D A T A / * A l l o c a t e s p a c e f o r s h a d o w v a r i a b l e * /& F I E L D = . C U R S O R / * S a v e c u r s o r f i e l d n a m e * /& P O S I T = . C S R P O S / * S a v e o f f s e t i n t o f i e l d * /

/ * N O T E : 1 S t s h a d o w r e f e r e n c e i s * // * r e a l l y a r e f e r e n c e t o Z D A T A ' s d a t a . * // * P r o b l e m s m a y a r i s e u s i n g Z D A T A i t s e l f * /

P A N E X I T ( ( Z W I D T H , F I E L D , P O S I T , Z D A T A , S H A D O W ) , L O A D , H I L I T E )R E F R E S H ( Z C M D , Z S C E D , Z D A T A , Z T I T L E , Z C L , Z C R ). H E L P = I S R 2 0 0 0 0 / * D e f a u l t t u t o r i a l n a m e * /

) P R O CR E F R E S H ( Z C M D , Z S C E D , Z D A T A , Z T I T L E , Z C L , Z C R )& Z C U R S O R = . C U R S O R& Z C S R O F F = . C S R P O S& Z L V L I N E = L V L I N E ( Z D A T A )

) E N D. .

SHARE Winter '99 69

Page 136: Panels

Sample panel-exit panel /Notes ISPF

The sample code is PL/I. It will compile and work. I compiled it with the IBM OS PL/I Optimizing compiler Version2 Release 2 Mod level 1. In case you are not familiar with the terminology, a 'BASED' variable is a variable whoselocation in storage is determined (based on) another variable (a pointer).

I suggest that you try this exit to see how it works. If you don't include all of my comments, it will not take long atall to type in... Or I can send you a copy on diskette, or via IBMMAIL, INTERNET, or Bitnet.

SHARE Winter '99 69-1

Page 137: Panels

PL/I Panel Exit ISPF

Declarations

* p r o c e s s s y s t e m ( m v s ) o p t i m i z e ( t i m e ) ;h i l i t e :

p r o c ( e x d a t a , p a n n a m e , p a n s e c t , m s g i d , a r a y d i m , v a r n a m e , v a r l e n , v a r v a l )o p t i o n s ( m a i n n o e x e c o p s ) r e o r d e r ;

d e c l a r ee x d a t a f i x e d b i n ( 3 1 ) , / * N o t u s e d h e r e * /p a n n a m e c h a r ( 8 ) , / * P a n e l n a m e * /p a n s e c t c h a r ( 1 ) , / * P a n e l s e c t i o n * /m s g i d c h a r ( 8 ) , / * L a s t m e s s a g e i d * /a r a y d i m f i x e d b i n ( 3 1 ) , / * A r r a y d i m e n s i o n * /v a r n a m e c h a r ( 8 ) , / * V a r i a b l e n a m e s p a s s e d i n * /v a r l e n f i x e d b i n ( 3 1 ) , / * V a r i a b l e v a l u e l e n g t h s k l u d g e * /v a r v a l f i x e d b i n ( 3 1 ) ; / * S t r i n g o f v a l u e s * /

d e c l a r ev a r l e n _ a r r a y ( 5 ) f i x e d b i n ( 3 1 ) b a s e d ( a d d r ( v a r l e n ) ) , / * A r r a y o f

l e n g t h s * /z w i d t h _ p p t r , / * P o i n t e r t o w i d t h o f s c r e e n * /f i e l d _ p p t r , / * P o i n t e r t o f i e l d n a m e * /p o s i t _ p p t r , / * P o i n t e r t o c u r s o r p o s i t i o n * /z d a t a _ p p t r , / * P o i n t e r t o z d a t a d y n a m i c a r e a * /s h a d o w _ p p t r , / * P o i n t e r t o s h a d o w v a r i a b l e * /z w i d t h c h a r ( 3 ) b a s e d ( z w i d t h _ p ) , / * W i d t h o f s c r e e n * /f i e l d c h a r ( 5 ) b a s e d ( f i e l d _ p ) , / * C u r s o r f i e l d n a m e * /p o s i t c h a r ( 8 ) b a s e d ( p o s i t _ p ) , / * A n d p o s i t i o n i n f i e l d * /z d a t a c h a r ( 1 0 0 0 0 ) b a s e d ( z d a t a _ p ) , / * D y n a m i c a r e a ( e d i t d a t a ) * /s h a d o w c h a r ( 1 0 0 0 0 ) b a s e d ( s h a d o w _ p ) ; / * S h a d o w v a r i a b l e a r e a * /

d e c l a r ea f i x e d b i n ( 3 1 ) , / * I n d e x i n t o s h a d o w o r z d a t a * /c h a r s ( 1 0 0 0 0 ) c h a r ( 1 ) b a s e d , / * B a s e d a r r a y o f s i n g l e c h a r s * /r e a l p o s f i x e d b i n ( 3 1 ) , / * B i n a r y v e r s i o n o f v a r ' p o s i t ' * /w i d t h f i x e d b i n ( 3 1 ) , / * B i n a r y v e r s i o n i f v a r ' z w i d t h ' * /s t _ l i n e f i x e d b i n ( 3 1 ) ; / * S t a r t ( o r e n d ) o f l i n e i n z d a t a * /

SHARE Winter '99 70

Page 138: Panels

PL/I Panel Exit (2 of 2) ISPF

Logic

/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * G e t p o i n t e r s t o t h e v a l u e s o f e a c h p a s s e d i n v a r i a b l e * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /

z w i d t h _ p = a d d r ( v a r v a l ) ;f i e l d _ p = a d d r ( z w i d t h _ p Ä> c h a r s ( v a r l e n _ a r r a y ( 1 ) + 1 ) ) ;p o s i t _ p = a d d r ( f i e l d _ p Ä> c h a r s ( v a r l e n _ a r r a y ( 2 ) + 1 ) ) ;z d a t a _ p = a d d r ( p o s i t _ p Ä> c h a r s ( v a r l e n _ a r r a y ( 3 ) + 1 ) ) ;s h a d o w _ p = a d d r ( z d a t a _ p Ä> c h a r s ( v a r l e n _ a r r a y ( 4 ) + 1 ) ) ;

s u b s t r ( s h a d o w , 1 , v a r l e n _ a r r a y ( 5 ) ) = ' ' ; / * B l a n k s h a d o w v a r i a b l e * /i f f i e l d = ' Z D A T A ' t h e n / * I f c u r s o r i s i n Z D A T A * /

d o ;/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * G e t p o s i t i o n o f c u r s o r w i t h i n z d a t a f i e l d * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /

r e a l p o s = s u b s t r ( p o s i t , 1 , v a r l e n _ a r r a y ( 3 ) ) ; / * C o n v e r t t o b i n * /w i d t h = s u b s t r ( z w i d t h , 1 , v a r l e n _ a r r a y ( 1 ) ) ; / * C o n v e r t t o b i n * /s t _ l i n e = ( ( r e a l p o s Ä 1 ) / w i d t h ) * w i d t h + 8 ;

i f r e a l p o s > = s t _ l i n e t h e n / * I f c u r s o r i n d a t a a r e a * /d o ;

/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // * S c a n b a c k w a r d s a n d f o r w a r d s l o o k i n g f o r a b l a n k . * // * F o r e a c h n o n Äb l a n k c h a r a c t e r , p u t a ' W ' i n s h a d o w v a r . * // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /

d o a = r e a l p o s t o s t _ l i n e b y Ä 1 / * S c a n b a c k w a r d s * /w h i l e ( s u b s t r ( z d a t a , a , 1 ) . = ' ' ) ;

s u b s t r ( s h a d o w , a , 1 ) = ' W ' ; / * p u t c h a r i n s h a d o w * /e n d ;s t _ l i n e = s t _ l i n e + w i d t h Ä 9 ; / * c a l c u l a t e e n d o f l i n e * /s t _ l i n e = m i n ( s t _ l i n e , v a r l e n _ a r r a y ( 5 ) ) ; / * d o n ' t o v e r f l o w * /d o a = r e a l p o s t o s t _ l i n e w h i l e ( s u b s t r ( z d a t a , a , 1 ) . = ' ' ) ;

s u b s t r ( s h a d o w , a , 1 ) = ' W ' ; / * u p d a t e s h a d o w f o r f w d s c a n * /e n d ;

e n d ;e n d ;

e n d h i l i t e ;

SHARE Winter '99 71