Sunteți pe pagina 1din 48

Legac-e Education

ISPF Dialog

Management Workshop
Legac-e Education
ISPF Dialogue Management Workshop

Module Title

1 TSO/E & ISPF Overview

2 ISPF Panels

3 ISPF Services

4 File Tailoring

5 ISPF Tables

6 Library Management Services

7 Case Study - Workshop

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

All Legac-e Education course documentation is


designed to complement the course, and is not
intended to be used as stand alone reference
material by those who have not attended the
course.

This course is designed and produced by KMS-IT


Limited.

If you require more information about our Legac-e


Education’s services, please contact:

Legac-e Education
228 Abbeydale Road South,
Dore,
Sheffield,
South Yorkshire,
UK. SL17 3LA

Telephone (National) 0114 262 0933


Telephone (International) +44 114 262 0933

E-mail courses@legac-e.co.uk

Website www.legac-e.co.uk
Legac-e Education

Module 1 – TSO/E & ISPF Overview

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

© Copyright Legac-e Education 2003, 2006


Legac-e Education
Module 2 - ISPF Panels

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

© Copyright Legac-e Education 2003, 2005, 2006


Legac-e Education

Topic Page

Messages _________________________________________________________50
HELP Panels ______________________________________________________52

© Copyright Legac-e Education 2002, 2005


Legac-e Education
Module 3 -ISPF Services

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

© Copyright Legac-e Education 2003, 2005, 2006


Legac-e Education
Module 4 - File Tailoring

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

© Copyright Legac-e Education 2003, 2005, 2006


Legac-e Education
Module 5 - ISPF Tables

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

© Copyright Legac-e Education 2003, 2005, 2006


Legac-e Education
Module 6 - Library Management

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

© Copyright Legac-e Education 2006


Legac-e Education

Module 1

TSO/E & ISPF Overview

© Copyright Legac-e Education 2003, 2006


Legac-e Education

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 is designed to improve user productivity by providing interactive


dialogues.

• ISPF is the dialogue manager for interactive applications. It controls the


display of ISPF screens (panels).

In addition to panel display it has facilities for data validation, defining


menu structures, processing and displaying table data, and processing
skeleton files.

• ISPF/PDF is a set of predefined panels and dialogues that help with the
development of further dialogues and applications.

The ISPF environment allows interface to other programming languages such


as APL2, Assembler, C, CLIST, COBOL, EXEC2, Fortran, Pascal, PL/1 and
REXX, which means that any of these languages can be used to construct
dialogues.

REXX, the designated SAA Procedures Language, is the one which this
course focuses on for the delivery of practical assignments.

The IBM manuals detailing ISPF usage are:

z/OS V1.R2.0 - V1.R3.0 ISPF Dialog Developer's SC34-4821


Guide and Reference
z/OS V1.R2.0 - V1.R3.0 ISPF Services Guide SC34-4819
z/OS V1.R2.0 - V1.R3.0 ISPF User's Guide SC34-4822
Volume 1

Chapter 1 – TSO/E & ISPF Overview Page 1-1


Legac-e Education

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.

As well as menus, functions can be included. A function may be written in


any of the following languages; APL, Assembler, C, CLIST, COBOL, Fortran,
Pascal, PL/1 or REXX. (As stated earlier this course will focus on the
ISPF/REXX relationship.) Whilst CLIST procedures may well be found, REXX
should be the modern replacement for these.

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.

The ISPSTART command is used to invoke an application, and either the


RETURN command or the END command from the primary option menu, can
be used to terminate the application. An application may call many panels and
execs during its existence.

Page 1-2 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

ISPF Hierarchy

Menu

Function Menu Function Menu

Function Function

Copyright © Legac-e Education, 2003, 2006 6

Chapter 1 – TSO/E & ISPF Overview Page 1-3


Legac-e Education

ISPF Variables

ISPF uses ‘variable pools’ to store variable data which is to be stored across
functions or sessions.

There are three pools, defined as follows:

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

This is accessible across functions. Any variables defined in a selection


panel are automatically stored in the shared pool. These variables are
accessible to all panels within the same ISPF application.

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.

Page 1-4 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

ISPF Variable Pools

Shared
Pool

Menu

EXEC EXEC
Display
Function Function

Function Function
Pool Pool
Copyright © Legac-e Education, 2003, 2006 7

Chapter 1 – TSO/E & ISPF Overview Page 1-5


Legac-e Education

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

This service provides the ability to store and retrieve variables.

Display service

This service displays panels and messages.

Table service

This service provides the ability to create, store, fetch and manipulate tables.

File tailoring service

This service provides the ability to tailor predefined skeleton files, typically
JCL, to the user’s requirements.

Graphic service

This service provides an interface with GDDM for graphical displays.

Page 1-6 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

ISPF Services

• Variables

• Display

• Tables

• File tailoring

• Graphics

Copyright © Legac-e Education, 2003, 2006 8

Chapter 1 – TSO/E & ISPF Overview Page 1-7


Legac-e Education

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:

DD name Description RECFM LRECL BLKSIZE


ISPPLIB Panel Library FB 80 3120
ISPMLIB Message Library FB 80 3120
ISPSLIB Skeleton Library FB 80 3120
ISPTLIB Table Input Library FB 80 3120
ISPTABL* Table Output Library FB 80 (note)
ISPFILE* File Tailoring Output FB/VB 255 Max (note)
ISPILIB* Image Input Library FB 80 (note)
ISPLLIB* Function Link Library U
ISPPROF User Profile Library FB 80 (note)
SYSEXEC REXX Function Library FB 80 (note)
SYSPROC CLIST Function Library FB 80 (note)

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.

Page 1-8 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

ISPF Libraries

Types DSNAME

Panel userid.ISPF.PLIB
Message userid.ISPF.MLIB
Table userid.ISPF.TLIB*
Skeleton userid.ISPF.SLIB
Profile userid.ISPF.ISPPROF

Copyright © Legac-e Education, 2003, 2006 9

Chapter 1 – TSO/E & ISPF Overview Page 1-9


Legac-e Education

Establishing Libraries – TSO LOGON

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.

Page 1-10 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

Establishing Libraries – TSO LOGON

• Libraries for part of a standard concatenation

• Libraries available to all Users of the same


LOGON procedure.

• Libraries automatically available when using PF2

• Maintenance issues for personal stuff


Example

//ISPPLIB DD DSN=IDMSTU1.ISPF.PLIB,DISP=SHR
// DD DSN=ADCD.Z16.ISPPLIB,DISP=SHR
Copyright © Legac-e Education, 2003, 2006 10

Chapter 1 – TSO/E & ISPF Overview Page 1-11


Legac-e Education

ISPF Startup

ISPF applications will generally be created to run within an existing ISPF


environment, however there may be a requirement to invoke an application
specific environment from the TSO READY prompt or directly via the TSO
LOGON command line.

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.

The basic format of ISPSTART (and ISPF or PDF) is:

PANEL(panel-name)
ISPSTART CMD(cmd-name)
PGM(pgm-name)

Where:

panel-name specifies the name of the first menu.

cmd-name specifies a REXX exec that is to be invoked as the


first dialogue function.

pgm-name specifies a program name that is to be invoked as


the first dialogue function.

There are other parameters applicable to IPSTART, ISPF and PDF.

Page 1-12 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

Starting ISPF

ISPSTART CMD(ename)

ISPSTART PANEL(pname)

Example

/* REXX - Start up an ISPF dialogue */


Address TSO
"ALLOC FI(ISPPLIB) DA('REXSTU1.ISPF.PLIB') SHR REUSE"
/* Other Allocations would appear here */
"ISPSTART PANEL(KMSP0001)"
Copyright © Legac-e Education, 2003, 2006 11

Chapter 1 – TSO/E & ISPF Overview Page 1-13


Legac-e Education

LIBDEF Command

The LIBDEF command permits the dynamic assignment of ISPF libraries


thus allowing application specific libraries which are not tied to TSO LOGON
procedures.

LIBDEF is session specific, and does not carry across:

• LOGOFF
• Session switch (PF2)

The syntax of the LIBDEF command is illustrated opposite.

Lib-type A value matching the appropriate library ddname.


DATASET Indicates that ID contains a list of catalogued data set
names.
EXCLDATA Indicates the same as DATASET, but is only valid
with ISPLLIB library type.
LIBRARY Indicates that ID specifies a ddname.
EXCLLIBR* Indicates the same as LIBRARY, but is only valid with
ISPLLIB library type.
ID(dsn_list) Lists up to 15 data sets which form the library
concatenation.
ID(lib_name) Specifies the ddname of a previous allocation. (This
option implies either TSO ALLOC has been used or
the data set is already available via the LOGON
procedure.)
COND Don’t allocate is an application level library already
exists.
UNCOND Allocate anyway, which is the default.
STACK Saves existing allocations to a stack before allocating
this request.
STKADD Only used with DATASET option and adds the data
set to the exist concatenation.

Page 1-14 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

LIBDEF

ISPEXEC “LIBDEF lib_type


[ DATASET|EXCLDATA|LIBRARY|EXCLLIBR ]
[ ID(dsn-list) | ID(lib_name) ]
[ COND|UNCOND|STACK|STLADD ] ”

Example

Address ISPEXEC
"LIBDEF ISPMLIB DATASET ID('"USERID()".ISPF.MLIB')"

Copyright © Legac-e Education, 2003, 2006 12

Chapter 1 – TSO/E & ISPF Overview Page 1-15


Legac-e Education

Establishing Libraries - LIBDEF

The LIBRARY and EXCLLIBR options of LIBDEF are only relevant to the
ISPLLIB library type.

ISPLLIB defines a program load library and is only applicable if writing


functions in languages other than CLIST or REXX, so is not discussed further.

The illustration on the previous page provides an example of a LIBDEF using


the DATASET attribute, and the illustration opposite demonstrates the
LIBRARY attribute.

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.

Page 1-16 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

Establishing Libraries - LIBDEF


Example

Address ISPEXEC "LIBDEF ISPTLIB LIBRARY ID(MYTLIB)"

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

Copyright © Legac-e Education, 2003, 2006 13

Chapter 1 – TSO/E & ISPF Overview Page 1-17


Legac-e Education

LIBDEF Display Utility

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.

Page 1-18 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

LIBDEF Display Utility


EDIT USER.REXX.EXEC(ALLOCISP) - 01.02 Columns 00001
Command ===> ISPLIBD Scroll ===
****** ***************************** Top of Data ***********************
000001 /* REXX Routine to allocate individual students ISPF/DM library
000002 msg = MSG('OFF')
000003 Call alloc_mlib
000004 Call alloc_slib
000005 Call alloc_plib
000006 Call alloc_tlib
000007 Call alloc_exec
000022 "FREE F(DD1,DD2,DD3,DD4)"
000023 Address ISPEXEC
000024 "LIBDEF ISPMLIB DATASET ID('"USERID()".ISPF.MLIB')"
000025 "LIBDEF ISPPLIB DATASET ID('"USERID()".ISPF.PLIB')"
000026 "LIBDEF ISPSLIB DATASET ID('"USERID()".ISPF.SLIB')"
000027 "LIBDEF ISPTLIB DATASET ID('"USERID()".ISPF.TLIB')"
000030 "LIBDEF ISPTABL DATASET ID('"USERID()".ISPF.TLIB')"
000040 Address TSO "ALTLIB ACTIVATE USER(EXEC)"
Copyright © Legac-e Education, 2003, 2006 14

Chapter 1 – TSO/E & ISPF Overview Page 1-19


Legac-e Education

TSO ALTLIB

Whereas the ISPF LIBDEF command allows dynamic assignment of ISPF


libraries it does not cater for dynamic allocation of CLIST or REXX libraries,
which is done with the TSO ALTLIB command.

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.

SYSUEXEC – User level

This is possible the easiest to code as evidenced opposite.

It does require the REXX EXEC library(s) to be allocated to DDNAME


SYSUEXEC prior to execution of the ALTLIB command.

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

"ALLOC DA('"USERID()".REXX.EXEC') FI(SYSUEXEC) SHR"


"ALTLIB ACTIVATE USER(EXEC)"

Page 1-20 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

TSO ALTLIB – Using SYSUEXEC

Activating a User Definition

“ALTLIB ACT USER(EXEC)”

De-activating a User Definition

“ALTLIB DEACT USER(EXEC)”

Copyright © Legac-e Education, 2003, 2006 15

There are more parameters to the ALTLIB command than are covered in
these notes.

Chapter 1 – TSO/E & ISPF Overview Page 1-21


Legac-e Education

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

Page 1-22 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

TSO ALTLIB – Using Application Level

Activating a User Definition

“ALTLIB ACT APPLICATION(EXEC)


DATASET(‘dsn_list’)
FILE(ddname) ”

De-activating a User Definition

“ALTLIB DEACT APPLICATION(EXEC)”

Copyright © Legac-e Education, 2003, 2006 16

Example

Address TSO "ALTLIB ACTIVATE APPLICATION(EXEC)",


"DATASET('"USERID()".REXX.EXEC')"

Chapter 1 – TSO/E & ISPF Overview Page 1-23


Legac-e Education

Testing

There are four additional parameters to the ISPSTART command. These are:

• TEST use TEST mode.

• TESTX use extended TEST mode.

• TRACE use TRACE mode.

• TRACEX use extended TRACE mode.

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.

If ISPF/PDF is available with the Dialogue Test options installed, then


consider using this facility rather than those described above.

The REXX TRACE settings are all valid during testing, and are often the most
effective way of debugging ISPF applications.

Page 1-24 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

Testing and Debugging

• ISPSTART
– TEST
– TESTX
– TRACE
– TRACEX

• ISPF/PDF dialog testing facility

• REXX Trace facilities

Copyright © Legac-e Education, 2003, 2006 17

Chapter 1 – TSO/E & ISPF Overview Page 1-25


Legac-e Education

This page reserved.

Page 1-26 Chapter 1 – TSO/E & ISPF Overview


Legac-e Education

ISPF Dialog Manager Workshop


Index

Item Page Item Page


.ATTR 2.47 BROWSE Service 3-8
.CURSOR 2-46 CAPS 2-10
.HELP 2-46 COLOUR 2-16
.MSG 2-46 Command line 2-18
.PFKEY 2.47 CONTROL Service 3-10
.RESP 2.46 Create a Panel 2-1
)ATTR 2-2 Create a skeleton 4-1
)BLANK 4-10 Create a Table 5-6
)BODY 2-18 CRP definition 5-4
)CM 4-10 Decision making 2-40
)DEFAULT 4-14 Delete a table row 5-12
)DOT 5-38 Display a table 5-20
)END 2-53 DISPLAY Service 3-12
)ENDDOT 5-39 Document list 1-1
)ENDSEL 4-12 EDIT Service 3-14
)IM 4-16 ELSE 2-40
)INIT 2-24 EXIT 2-42
)MODEL 5-22 EXPAND 2-22
)PROC 2-26 File Tailoring 4-1
)REINIT 2-24 FTCLOSE service 4-6
)SEL 4-12 FTINCL Service 4-8
)SET 4-18 FTOPEN Service 4-4
Add a row to a table 5-10 Function pool 1-4
ALTLIB 1-20 GOTO 2-42
Address - Rexx Instruction 3-3 HELP Panels 2-52
Assignment statements 2-26 HILITE 2-16
Legac-e Education

ISPF Dialog Manager Workshop


Index Continued

Item Page Item Page


HOST Environments 3-2 LMOPEN 6-8
INTENS 2-10 LMPRINT 6-40
IF 2-40 LMPUT 6-14
ISPF Data Sets 1-8 LMRENAME 6-46
ISPF Hierarchy 1-2 LONG Message 2-18
ISPF Libraries 1-8 Manual list 1-1
ISPF Start 1-12 Messages members 2-50
ISPF Variable Pools 1-4 Open an existing table 5-8
ISPLIBD Command 1-18 PAD 2-12
JUST 2-12 PFK Built-in function 2-34
LIBDEF 1-14 Profile pool 1-4
List of Manuals 1-1 SCROLL value 2-18
LM Return Codes 6-48 SELECT Service 3-16
LMCLOSE 6-22 Shared pool 1-4
LMCOPY 6-34 SHORT Message 2-18
LMERASE 6-44 SKIP 2-14
LMFREE 6-24 Starting ISPF 1-12
LMGET 6-12 SYSUEXEC 1-20
LMINIT 6-4 Table Handling 5-1
LMMADD 6-18 Testing 1-24
LMMDEL 6-28 TBADD Service 5-10
LMMFIND 6-16 TBBOTTOM Service 5-28
LMMFIND Statistics 6-53 TBCLOSE Service 5-36
LMMOVE 6-38 TBCREATE Service 5-6
LMMREN 6-30 TBDELETE Service 5-12
LMMREP 6-20 TBDISPL Service 5-20
Legac-e Education

ISPF Dialog Manager Workshop


Index Continued

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

ISPF Dialog Manager Workshop

This page reserved

S-ar putea să vă placă și