ISPF Behind The Scenes
Marvin Knight
3039 Cornwallis Drive
Research Triangle Park, NC 27709
knightm@[Link]
ISPF Behind the Scenes - Session 2603
®
Understanding ISPF Dialogs* ®
Application Development Solutions
ISPF Initialization
ISPF task structure
SELECT service
LIBDEF
Debugging Tools
* This presentation assumes ISPF V4.2 or later
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Initialization ®
Application Development Solutions
Invoked from TSO as command processor
Expects a CPPL as input
Makes call to TSO routines
Command format
ISPF or PDF
PANEL(ISR@PRIM) NEWAPPL(ISR)
ISPSTART
PANEL(ISP@MSTR) NEWAPPL(ISP)
ISPF CMD/PGM/PANEL
Gets APPLID of ISP if none specified
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Initialization ®
Application Development Solutions
PROFILES
ISPSPROF
Read from ISPPROF DD
If not found then read from ISPTLIB and write to
ISPPROF
xxxPROF
Read from ISPPROF DD
If not found then read from ISPTLIB
If still not found then read ISPPROF member from
ISPTLIB
Write back to ISPPROF DD
The enqueues done creating default profiles are on the
first data set in the ISPTLIB concatenation
For batch jobs this can cause enqueue problems
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Initialization ®
Application Development Solutions
Screen initialization
Each screen is started using parms from product
initialization
START command can specify it's own CMD/PGM/PANEL
REXX environment initialized on each screen start
ISPF error panel will restart a screen
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Services ®
Application Development Solutions
All ISPF services are run from ISPTASK TCB
Interface
ISPLINK
ISPEXEC
ISPLINK parameters
Positional
To omit a parm and use default then code a blank
Note: An address starting with x'40' will be treated as an
omitted parameter.
Last address in parm list must have high order bit on if the address
list is a variable number of parms
Standard linkage conventions are observed
Keywords and names should be padded to the max length of 8
Numeric values are full word binary
Don't rely on coding constant. Compiler may not generate a full
word value.
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
TSO
TMP
Attach
ISPSTART ISPMAIN
Link
Attach szero=no
ISPTASK
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
POST
ISPMAIN
WAIT
ISPTASK ISPTASK
Display request
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
DISPLAY of Panel
Actual display is done by ISPMAIN task
with SVC 93 (PTUT/TGET)
ISPMAIN will normally be in wait waiting for user
to
press enter key
ISPTASK is in wait
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
SELECT CMD
ISPTASK
Attach szero=no
Post
CMD1 ISPLINK
Call
Wait
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
SELECT CMD invoking SELECT PGM
PGM1 ISPTASK
Attach szero=no
Post
CMD1 ISPLINK
Call Select pgm
Wait
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
SELECT CMD with LIBDEF of ISPLLIB
Wait
ISPTASK
Attach szero=no
Tasklib=libdef dcb
Post
CMD1 ISPLINK
Call
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Task Structure ®
Application Development Solutions
SELECT PGM with LIBDEF of ISPLLIB
SVC 6
ISPTASK PGM1
dcb=ISPLLIB
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF SELECT Service ®
Application Development Solutions
SELECT CMD
CLIST - Parsed and run by ISPF. ISPF is aware of TSO commands
and will do the ATTACH
REXX - ISPF attaches EXEC and REXX runs the exec
TSO commands are attached by REXX
SELECT PGM/CMD needs to be used to create
new function pool unlike clist processing.
SELECT is also needed for ISPTCM lookup
and ISPF exits to be invoked.
ISPF will pull from the data stack on end of the REXX exec
unless the BARRIER keyword is used.
LANG(CREX) - use for compiled REXX to get correct function pool
Commands
Attached as command processors under ISPTASK
IKJTBLS called to do authorization check.
IKJEFTSR is used to invoke authorized commands.
NEST keyword - Allows nesting and output trapping
STACK BARRIER = *
Default
STACK BARRIER=NONEST
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF SELECT Service ®
Application Development Solutions
SELECT PGM
LINK (SVC 06) macro used to invoke program
Authorization check done with call to IKJTBLS
LIBDEF only affects selected pgm
PARM - half word length followed by data
NEWAPPL
Opens the following ISPF tables
xxxxPROF
xxxxCMDS
Edit will open xxxxEDIT
LIBDEF must be done prior to SELECT for LIBDEF of ISPTLIB to
affect xxxxCMDS
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF SELECT Authorized Command ®
Application Development Solutions
TSO
TSO
TMP
Attach
ISPSTART ISPMAIN AUTHCMD
Link
Attach szero=no
ISPTASK IKJEFTSR
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF LIBDEF - ISPLLIB ®
Application Development Solutions
ISPLLIB
Used to pick up ISPF modules on product initialization
On invocation of ISPF it is used as TASKLIB to start an ISPF
screen
LIBDEF of ISPLLIB
SELECT PGM
DCB parm on LINK macro used to point to user load library
DCB parm only affect the module that LINK invokes
If EXCLDATA/EXCLLIBR used : LINK with DCB=libdef'd dcb
Otherwise BLDL is done on libdef'd DCB.
BLDL finds module: LINK with DCB=libdef'd dcb
BLDL doesn't find module: LINK with DCB=0
SELECT CMD
ATTACH of command is done with TSKLIB=libdef'd dcb
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
LIBDEF / ISPLLIB Example ®
Application Development Solutions
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF LIBDEF - ISPLLIB ®
Application Development Solutions
SELECT CMD invoking SELECT PGM
with LIBDEF of ISPLLIB
Link
PGM1 ISPTASK
dcb =
libdef'd
dcb
Attach by Select
Tasklib=libdef'd dcb
Post
CMD1 ISPLINK
Call Select pgm
Wait
Attach
by user cmd
CMD2 PGM2
Call
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF LIBDEF - ISPLLIB ®
Application Development Solutions
MVS Search order
Link DCB=0
JPA
Tasklib,Steplib,Joblib
LPA
Link list
Link DCB=libdef'd dcb
JPA
Specified dcb
LPA
Link list
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF SELECT - Variables ®
Application Development Solutions
SELECT PGM calling REXX exec without
using ISPF SELECT
shared profile
pool pool
function
variable
pgm1 flow pool
DISPLAY PANEL
REXX Rexx
EXEC function
pool
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF SELECT - Variables ®
Application Development Solutions
SELECT PGM calling REXX exec
using ISPF SELECT
shared profile
pgm1 variable function pool pool
flow pool
select cmd
REXX variable function
EXEC flow pool
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPF Debugging Tools ®
Application Development Solutions
ISRDDN
ISPVCALL
Dialog Test
Other
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISRDDN ®
Application Development Solutions
Scrollable list of allocated DD's and associated
data set names
Line commands
Edit
Browse/View
Free
Compress
Enqueue information
Information on data set
Primary commands
Find string
Locate ddname
RFIND
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISRDDN ®
Application Development Solutions
Primary commands (continued)
MEMBER name [ddstring]
ONLY ddstring
EXCLUDE ddstring
RESET
COUNT [ddstring]
CLIST
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
ISPVCALL ®
Application Development Solutions
Produces trace with the following
System and session information
Cached panels
ISPF configuration table values
Allocated DD's
LIBDEF status
A legend
Usage tips
Module trace information
ISPLINK calls
ISPEXEC calls
ENQ info
MSG changes
SVC99 list
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
Dialog Test ®
Application Development Solutions
Trace Dialog service calls
Trace variables
Breakpoint services
List variables
Display panels and/or messages
View/modify ISPF tables
Run ISPF services
Browse ISPF log
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98
Other Debugging tools ®
Application Development Solutions
Other
ISPF parms
TEST / TESTX / TRACE / TRACEX
List service - Dialog can use this to write out
lines to the ISPF list data set
Log service - Write message to ISPF log data set
ENVIRON command
TPUT/TGET trace
Read Partition Query buffer
Enable dump
© COPYRIGHT IBM CORPORATION 1998 IBM SOFTWARE MRK 8/98