Documente Academic
Documente Profesional
Documente Cultură
ISPF Dialog
Management Workshop
Legac-e Education
ISPF Dialogue Management Workshop
Module Title
2 ISPF Panels
3 ISPF Services
4 File Tailoring
5 ISPF Tables
8 COBOL Solutions
9 REXX Solution
Index
Legac-e Education
ISPF Dialogue Management Workshop
Objectives
At the completion of this course, delegates will have a working knowledge of
ISPF/DM within a TSO/E environment.
All delegates will be able to:
• Initiate ISPF
• Allocate their own libraries dynamically
• Construct Menus and Panels
• Use the various ISPF Services
• Perform file tailoring.
• Create and maintain tables
• Test Panels and Functions
• Use Library Management Services
Legac-e Education
ISPF Dialogue Management Workshop
Course documentation
Legac-e Education
228 Abbeydale Road South,
Dore,
Sheffield,
South Yorkshire,
UK. SL17 3LA
E-mail courses@legac-e.co.uk
Website www.legac-e.co.uk
Legac-e Education
Topics Page
Introduction ________________________________________________________1
ISPF Structure______________________________________________________2
ISPF Variables _________________________________________________________ 4
Function pool ________________________________________________________________4
Shared pool _________________________________________________________________4
Profile pool __________________________________________________________________4
ISPF Services __________________________________________________________ 6
Variable service ______________________________________________________________6
Display service_______________________________________________________________6
Table service ________________________________________________________________6
File tailoring service __________________________________________________________6
Graphic service ______________________________________________________________6
Libraries_______________________________________________________________ 8
Establishing Libraries – TSO LOGON ___________________________________ 10
ISPF Startup_______________________________________________________12
LIBDEF Command _________________________________________________14
Establishing Libraries - LIBDEF ________________________________________ 16
LIBDEF Display Utility _________________________________________________ 18
TSO ALTLIB _______________________________________________________20
SYSUEXEC – User level________________________________________________ 20
Application Level______________________________________________________ 22
Testing ___________________________________________________________24
TEST _________________________________________________________________ 24
TESTX________________________________________________________________ 24
TRACE _______________________________________________________________ 24
TRACEX ______________________________________________________________ 24
Topics Page
Introduction ________________________________________________________1
Main Panel Components ____________________________________________2
)ATTR panel segment___________________________________________________ 2
Default attribute characters _____________________________________________ 2
Assigning field attribute characters______________________________________________4
Main attribute keywords ________________________________________________ 6
TYPE attribute _______________________________________________________________8
INTENS attribute ____________________________________________________________10
CAPS attribute ______________________________________________________________10
JUST attribute ______________________________________________________________12
PAD attribute _______________________________________________________________12
SKIP attribute_______________________________________________________________14
COLOR attribute ____________________________________________________________16
HILITE attribute _____________________________________________________________16
)BODY panel segment______________________________________________18
Screen Standards _____________________________________________________ 18
)BODY keywords ______________________________________________________ 20
EXPAND option _____________________________________________________________22
)INIT Segment _____________________________________________________24
)REINIT Segment __________________________________________________24
)PROC panel segment______________________________________________26
Assignment statements________________________________________________ 26
Built-in Functions _____________________________________________________ 28
TRUNC Buiilt-in Function _____________________________________________________30
TRANS Built-in Function _____________________________________________________32
PFK Built-in Function ________________________________________________________34
Panel definition statements ____________________________________________ 36
VER statement______________________________________________________________36
VGET Statement ____________________________________________________________38
VPUT Statement ____________________________________________________________38
Decision making – IF Statement _______________________________________________40
GOTO Statement ___________________________________________________________42
EXIT statement _____________________________________________________________42
Panel variables________________________________________________________ 44
&ZSEL variable _____________________________________________________________44
Control Variables____________________________________________________________46
ZVARS Variable ____________________________________________________________48
Topic Page
Messages _________________________________________________________50
HELP Panels ______________________________________________________52
Topics Page
Introduction ________________________________________________________1
Host Environments _________________________________________________2
REXX Address instruction ______________________________________________ 2
Invoking in other languages_____________________________________________ 4
Services used within this workshop__________________________________6
BROWSE Service ______________________________________________________ 8
CONTROL Service_____________________________________________________ 10
DISPLAY Service ______________________________________________________ 12
EDIT Service __________________________________________________________ 14
SELECT Service_______________________________________________________ 16
VGET / VPUT Services _________________________________________________ 18
Topics Page
Introduction ________________________________________________________1
Service overview ___________________________________________________2
FTOPEN Service ____________________________________________________4
FTCLOSE Service __________________________________________________6
FTINCL Service _____________________________________________________8
File tailoring control statements ____________________________________10
Conditional selection __________________________________________________ 12
Handling character conflicts ___________________________________________ 14
Nesting files __________________________________________________________ 16
Variable assignments__________________________________________________ 18
Topics Page
Introduction ________________________________________________________1
What are ISPF Tables _______________________________________________2
Positioning with a table _____________________________________________4
Creating a table - TBCREATE ________________________________________6
Open an existing table – TBOPEN____________________________________8
Add a row to a table - TBADD _______________________________________10
Delete a row - TBDELETE __________________________________________12
Read an existing row - TBGET ______________________________________14
Update an existing row - TBPUT ____________________________________16
TBMOD ___________________________________________________________18
Displaying a table - TBDISPL _______________________________________20
Panel definition for tables______________________________________________ 22
Obtaining information about a table - TBQUERY _____________________24
Search a table - TBSCAN ___________________________________________26
Positioning within a table __________________________________________28
Locate top - TBTOP ___________________________________________________ 28
Locate bottom - TBBOTTOM ___________________________________________ 28
Skipping rows - TBSKIP _______________________________________________ 30
Sorting a table - TBSORT___________________________________________32
Disposing of a table________________________________________________34
TBEND _______________________________________________________________ 34
TBSAVE ______________________________________________________________ 34
TBCLOSE_____________________________________________________________ 36
Tables and File Tailoring ___________________________________________38
Topics Page
Introduction ________________________________________________________1
Overview of relationships ___________________________________________2
Initialisation - LMINIT _______________________________________________4
LMINIT with ISPF data sets______________________________________________ 4
LMINIT with non-ISPF data sets _________________________________________ 6
LMINIT – using DDNAME rather than DSNAME ___________________________ 6
Open a data set – LMOPEN __________________________________________8
File processing overview ___________________________________________10
Read a record - LMGET ________________________________________________ 12
Write a record - LMPUT ________________________________________________ 14
Find a member - LMMFIND _____________________________________________ 16
Add a new member - LMMADD _________________________________________ 18
Replace an existing member - LMMREP_________________________________ 20
Close a data set - LMCLOSE ________________________________________22
Release a data set - LMFREE _______________________________________24
Library maintenance overview ______________________________________26
Delete a member - LMMDEL ____________________________________________ 28
Rename a member - LMMREN __________________________________________ 30
Utility Services ____________________________________________________32
Overview _____________________________________________________________ 32
Copy operations - LMCOPY ____________________________________________ 34
Move operations - LMMOVE____________________________________________ 38
Printing files ______________________________________________________40
File management overview _________________________________________42
Delete a data set - LMERASE ___________________________________________ 44
Rename a data set - LMRENAME _______________________________________ 46
Appendix A – LM Return Codes_____________________________________48
Appendix B – LMMFIND Directory statistics _________________________53
Module 1
Introduction
The Interactive System Productivity Facility (ISPF) has two main components
Program Development Facility (ISPF/PDF) and Dialogue Management
(ISPF/DM). These IBM program product components execute in the OS/390
TSO/E, z/OS TSO/E, VM/CMS or VSE/ICCF environments. This course only
relates to the OS/390 and z/OS versions of ISPF/DM.
• ISPF/PDF is a set of predefined panels and dialogues that help with the
development of further dialogues and applications.
REXX, the designated SAA Procedures Language, is the one which this
course focuses on for the delivery of practical assignments.
ISPF Structure
ISPF applications are built around a menu structure. Menus and panels are
arranged hierarchically. A menu is also known as a selection panel.
Starting with a primary option menu, data is entered and processed by the
menu, with control being passed either to a lower level menu (or panel), or a
function. A menu or function can select a lower level menu or function, which
establishes the hierarchy.
When a function terminates, control returns to the menu or function that called
it. In the case of menus, the END command returns control to the previous
function or menu.
ISPF Hierarchy
Menu
Function Function
ISPF Variables
ISPF uses ‘variable pools’ to store variable data which is to be stored across
functions or sessions.
Function pool
This is created when a function (e.g. a REXX exec) is invoked. All variables
are accessible by the function. The pool is deleted when the function
terminates. In this sense, dialogue variables are REXX variables (and vice
versa) as they are using the same pool.
Shared pool
REXX execs called within the application are allowed to reference these
variables using the ISPF VPUT and VGET services.
Profile pool
This is accessible across ISPF sessions and across logon sessions. As with
the shared pool, reference to these variables is made using the ISPF VPUT
and VGET services.
Note that when the Function is coded in APL, CLIST, or REXX, procedure
variables are automatically treated as dialogue variables. This is not so if the
Function is coded in any other programming language in a TSO/E
environment and additional services are required to pass information between
the Function and the Panels.
Shared
Pool
Menu
EXEC EXEC
Display
Function Function
Function Function
Pool Pool
Copyright © Legac-e Education, 2003, 2006 7
ISPF Services
ISPF provides services to allow control of the flow of the dialog, the data
displayed and the data created. These services are:
Variable service
Display service
Table service
This service provides the ability to create, store, fetch and manipulate tables.
This service provides the ability to tailor predefined skeleton files, typically
JCL, to the user’s requirements.
Graphic service
ISPF Services
• Variables
• Display
• Tables
• File tailoring
• Graphics
Libraries
ISPF uses libraries, partitioned data sets (either PDS or PDSE types) for
storing panels, messages, tables, skeletons and profile variables.
The DD names and data set attributes (taken from ISPF User's Guide Volume
1) are as follows:
NOTE - The block sizes in the above table may be determined by the
application, provided that it is a multiple of 80.
Files marked with an asterisk* are optional. Their presence is required if the
application makes use of the associated services or functions.
The actual data set names of the system libraries are determined by the
installation, though a common convention is shown opposite.
ISPF Libraries
Types DSNAME
Panel userid.ISPF.PLIB
Message userid.ISPF.MLIB
Table userid.ISPF.TLIB*
Skeleton userid.ISPF.SLIB
Profile userid.ISPF.ISPPROF
To allow ISPF/PDF to be invoked the IBM supplied libraries are defined within
the TSO LOGON procedure along with any additional libraries required for
other applications.
//*******************************************************************
//* *
//* ISPF ALLOCATE FOR REXX AND ISPF/DM COURSES *
//* *
//*******************************************************************
//ISPFDM EXEC PGM=IKJEFT01,REGION=0M,DYNAMNBR=175,
// PARM='%ISPFKM'
//STEPLIB DD DISP=SHR,DSN=USER.LINKLIB
//SYSUADS DD DISP=SHR,DSN=SYS1.UADS,UNIT=3390,VOL=SER=Z6RES1
//SYSLBC DD DISP=SHR,DSN=SYS1.BRODCAST,UNIT=3390,VOL=SER=Z6SYS1
//SYSPROC DD DISP=SHR,DSN=USER.CLIST,UNIT=3390,VOL=SER=Z6SYS1
// DD DISP=SHR,DSN=ADCD.Z16.CLIST,UNIT=3390,VOL=SER=Z6RES1
. . . . . . .
//SYSEXEC DD DISP=SHR,DSN=USER.REXX.EXEC
// DD DISP=SHR,DSN=&SYSUID..REXX.EXEC
. . . . . . .
//SYSHELP DD DISP=SHR,DSN=SYS1.HELP,UNIT=3390,VOL=SER=Z6RES1
// DD DISP=SHR,DSN=ISP.SISPHELP,UNIT=3390,VOL=SER=Z6RES1
. . . . . . .
//ISPMLIB DD DISP=SHR,DSN=&SYSUID..ISPF.MLIB
// DD DISP=SHR,DSN=USER.ISPMLIB,UNIT=3390,VOL=SER=Z6SYS1
// DD DISP=SHR,DSN=ISP.SISPMENU,UNIT=3390,VOL=SER=Z6RES1
. . . . . . .
//ISPEXEC DD DISP=SHR,DSN=ISP.SISPEXEC,UNIT=3390,VOL=SER=Z6RES1
. . . . . . .
//ISPLLIB DD DISP=SHR,DSN=GDDM.SADMMOD,UNIT=3390,VOL=SER=Z6RES2
. . . . . . .
//ISPPLIB DD DISP=SHR,DSN=USER.ISPPLIB,UNIT=3390,VOL=SER=Z6SYS1
// DD DISP=SHR,DSN=&SYSUID..ISPF.PLIB
. . . . . . .
//ISPSLIB DD DISP=SHR,DSN=&SYSUID..ISPF.SLIB
// DD DISP=SHR,DSN=USER.ISPSLIB,UNIT=3390,VOL=SER=Z6SYS1
. . . . . . .
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU,UNIT=3390,VOL=SER=Z6RES1
. . . . . . .
This ensures that the libraries are available to all users of this particular TSO
LOGON procedure, but probably restricts maintenance activity.
//ISPPLIB DD DSN=IDMSTU1.ISPF.PLIB,DISP=SHR
// DD DSN=ADCD.Z16.ISPPLIB,DISP=SHR
Copyright © Legac-e Education, 2003, 2006 10
ISPF Startup
In z/OS, ISPF is invoked using the either the ISPF, PDF or ISPSTART
commands. We will focus on the IPSTART command may be issued from:
• a TSO terminal
• within a CLIST or REXX exec
• during TSO logon processing.
PANEL(panel-name)
ISPSTART CMD(cmd-name)
PGM(pgm-name)
Where:
Starting ISPF
ISPSTART CMD(ename)
ISPSTART PANEL(pname)
Example
LIBDEF Command
• LOGOFF
• Session switch (PF2)
LIBDEF
Example
Address ISPEXEC
"LIBDEF ISPMLIB DATASET ID('"USERID()".ISPF.MLIB')"
The LIBRARY and EXCLLIBR options of LIBDEF are only relevant to the
ISPLLIB library type.
Return Codes
0- Normal completion
4- May occur when removing an application library definition as it
indicates the library of this type does not exist.
8- May occur when COND is used and the application library type
already exists.
12 - ISPPROF was specified with either EXCLDATA or EXCLLIBR and this
is an invalid specification.
16 - Can mean one of:
a) ddname not allocated when using ID(lib_name) form
b) dsname is invalid when using ID(dsn_list) form
20 - Severe error
Warning
A 0 return code may be given for a generic library type even if the library does
not exist. This situation can occur because there is no allocation verification
until the library is referenced during either File Tailoring or Table Processing.
alloc_tlib:
status = SYSDSN("'"||USERID()||".ISPF.TLIB'")
Select
When status = 'DATASET NOT FOUND' Then
"ALLOC DA('"USERID()".ISPF.TLIB') DDNAME(MYTLIB) SPACE(1)",
"LRECL(120) UNIT(SYSDA) DIR(44) CYLINDERS RECFM(F B)",
"BLKSIZE(27960) DSNTYPE(LIBRARY) NEW CATALOG"
When status = 'OK' Then
"ALLOC DA('"USERID()".ISPF.TLIB') DDNAME(MYTLIB) SHR"
Otherwise
Say 'Cannot allocate' USERID()||'.ISPF.TLIB'
Exit 16
A utility program is provided to display the both the active and stacked
LIBDEF definitions for the current logical screen.
Note the term current logical screen as the LIBDEF definitions may be
different in each split screen (PF2) scenario.
To view the LIBDEF definitions simply type ISPLIBD on the command line and
press enter.
TSO ALTLIB
There are three ways to use ALTLIB, at the Application, System or User
levels. Here the focus will be on Application and User rather than System.
Parameter Meaning
ACT This is an abbreviation of ACTIVATE.
It indicates that the library(s) associated with SYSUEXEC is
to be included in the search chain when locating REXX
EXECs.
DEACT an abbreviation of DEACTIVATE has the opposite
effect.
USER(EXEC) This indicates operation at the User Level and provides the
link to SYSUEXEC.
The EXEC in brackets indicates that REXX rather than
CLISTS are being used.
Note that if * is coded instead of EXEC it implies the use of
both CLIST and REXX, which also implies the need for
SYSUPROC.
Example
There are more parameters to the ALTLIB command than are covered in
these notes.
Application Level
The use of Application Level EXECs requires more parameters on the ALTLIB
command as rather than being tied to SYSUEXEC, it provides the flexibility to
use either a specific data set or ddname.
Using a data set rather than a ddname avoids the need for a TSO ALLOC
statement.
Parameter Meaning
APPLICATION This indicates that the library(s) defined by either the
DATASET or FILE parameters are to be included in the
search chain when locating REXX EXECs.
DATASET This parameter is used to provide up to 15 data set
names which form the REXX EXEC library concatenation.
If more than 15 libraries are required use a combination of
the FILE parameter and TSO ALLOC command.
All libraries must be catalogued and have the same
RECFM.
FILE An alternative to DATASET, especially when more than
15 data sets are required in the library concatenation.
This will specify the DDNAME of a previously issued TSO
ALLOC command or the DDNAME of a DD statement
within the TSO LOGON procedure.
Return Codes
0- Normal completion
4- No alternate library, of this type, exists to be deactivated .
8- May occur when COND is used and the application library type
already exists.
10 - No REXX Language processor environment found.
16 - Specified DDNAMe was not previously allocated.
20 - Severe error
Example
Testing
There are four additional parameters to the ISPSTART command. These are:
TEST
Will re-fetch panels and messages from the library each time they are used
instead of re-using the copy in virtual storage. Additionally, screen prints
include line numbers.
TESTX
Operates as TEST mode, but any messages written to the ISPF log data set
are also displayed on the terminal.
TRACE
Operates the same as TEST mode, but it also writes a record of each service
call from a REXX exec to the ISPF log file.
TRACEX
Operates as TRACE mode, but any messages written to the ISPF log data set
are also displayed on the terminal.
The REXX TRACE settings are all valid during testing, and are often the most
effective way of debugging ISPF applications.
• ISPSTART
– TEST
– TESTX
– TRACE
– TRACEX
Item Page
TBEND Service 5-34
TBGET Service 5-14
TBMOD Service 5-18
TBOPEN Service 5-8
TBPUT Service 5-16
TBQUERY Service 5-24
TBSAVE Service 5-34
TBSCAN Service 5-26
TBSKIP Service 5-30
TBSORT Service 5-32
TBTOP Service 5-28
TRANS Built-in function 2-32
TRUNC Built-in function 2-30
TSO ALTLIB 1-20
TYPE 2-8
VER Built-in function 2-36
2-38,
VGET Service 3-18
2-38,
VPUT Service 3-18
ZSEL 2-44
ZVARS 2-48
Legac-e Education