I found an interesting ISPF extension which I wanted to try out. But I could not find any documentation on how to install it. As usual I found out even more interesting stuff trying to document it.
Logging on to TSO.
When you logon to TSO you specify a procedure such as ISPFPROC. This procedure is in the SYS1.PROCLIB concatenation. A user can have a default procedure specified in the RACF TSO segment. A user is given access to the RACF CLASS TSOPROC. (So you use a command like RDEFINE TSOPROC NEWPROC UACC(READ) )
This procedure allocates the datasets used by TSO and ISPF, for example ISPPLIB, ISPMLIB, ISPLLIB,ISPEXEC, SYSEXEC, SYSOUT.
If you are authorised you can create your own TSO procedure, and add your application’s data sets to the JCL. Most systems do not allow this.
When this JCL is executed you can pass parameters to it, for example
//ISPFPROC EXEC PGM=IKJEFT01,REGION=0M,DYNAMNBR=200,
will cause the ISPFCL exec or clist to be executed. This is usually in the SYS1.CLIST concatenation. You can specify PARM=’EXEC ”SYS1.CLIST(SPFALLOC)”’ and specify a data set.
You can use this
- To write a message to users
- Allocate additional data sets,
- Check the existence of a profile, and execute it.
User specific processing
With the clist specified in the PARM statement you can have code like
/* rexx */
userid = userid()
zl =”‘”userid”.ZLOGON.CLIST'” /* so we get ‘colin.zlogon.clist’ */
if SYSDSN(zl) = “OK” then exec zlogon /* the userid.. and .clist default’ */
For my userid this would check to see if COLIN.ZLOGON.CLIST exists, and if so, it executes it.
Within this data sets you can have user specific processing, for example
/* Rexx */
say "in colin.zlogon.clist"
"LIBDEF ISPLLIB DATASET ID('COLIN.ISPF.ISPLLIB') STACK"
"LIBDEF ISPMLIB DATASET ID('COLIN.CUCI.ISPMLIB') STACK"
"LIBDEF ISPPLIB DATASET ID('COLIN.CUCI.ISPPLIB') STACK"
"LIBDEF ISPTLIB DATASET ID('COLIN.CUCI.ISPTLIB') STACK"
address tso "ALTLIB ACTIVATE APPLICATION(CLIST)
This will add the datasets to the specified library, for example adds the panel library COLIN.CUCI.ISPPLIB to ISPPLIB.
You can use “LIBDEF ISPPLIB” to “pop” the definitions back to what they were before the call.
Running your own application
If you have your own panel or application you want to use, you could use the following to set up the libraries and display Mypanel
address ispexec "LIBDEF ISPLLIB DATASET ID('COLIN.ISPF.ISPLLIB') STACK" "LIBDEF ISPMLIB DATASET ID('COLIN.CUCI.ISPMLIB') STACK" "LIBDEF ISPPLIB DATASET ID('COLIN.CUCI.ISPPLIB') STACK" "LIBDEF ISPTLIB DATASET ID('COLIN.CUCI.ISPTLIB') STACK" address tso "ALTLIB ACTIVATE APPLICATION(CLIST) DATASET('COLIN.CUCI.EXEC') " "SELECT PANEL(Mypanel ) NEWAPPL(MYA) PASSLIB" /* afterwards reset things back */ address tso "ALTLIB DEACTIVATE APPLICATION(CLIST)" "LIBDEF ISPLLIB" "LIBDEF ISPPLIB" "LIBDEF ISPMLIB" "LIBDEF ISPTLIB"
What has been libdef-ed?
You can use the TSO command ISPLIBD to display the data sets that have been libdef-ed for the logical screen. Note each logical screen can have its own libdef statements – depending on the set up. See here for a description.