|

Enabling a TSO Logon Exec
for Your Users
By Lionel Dyck
How many times have your users come to you, or perhaps you yourself
have had the need, to customize the data sets allocated by a TSO
LOGON Proc?
Wouldn’t you like to have the ability to create a LOGON
CLIST or EXEC that would be executed automatically every time you,
or your users, LOGON to TSO?
Well you can and it is very easy.
First, in your TSO LOGON Proc change the execute statement by
adding a PARM:
PARM='EXEC ''hlq.clist(tsologon)'''
Where hlq.clist is the name of a system library that contains
CLISTs or REXX EXECs and tsologon is the name of a simple CLIST
that will test for the existence of a LOGON CLIST or REXX EXEC.
If one exists, then it will execute it. The reason the EXEC command
is used with the fully qualified data set name and member is that
this allows you to have the tsologon member reside in your SYSEXEC
library and be executed from there without causing the SYSEXEC
concatenation to be opened. This is useful in case the user wants
to reallocate the SYSEXEC concatenation to add their own unique
libraries.
Another reason to use the EXEC in the PARM is that this allows
you to have a minimal TSO LOGON Proc which will significantly speed
up your TSO Logons and then within the tsologon CLIST you can dynamically
allocate the libraries that are required. In testing years ago
it was found that this technique is faster and uses fewer system
resources than having the libraries in the Proc. I have not seen
any validation or re-validation of this since the early 1990s.
However, the added flexibility outweighs, in my humble opinion,
any potential extra overhead if indeed there is any.
Here is a simple example of the tsologon CLIST:
PROC 0
SET &DSN = '&SYSUID..LOGON.CLIST'
IF &SYSDSN(&DSN) = OK +
THEN EXEC &DSN
ELSE ISPF |
What this simple CLIST does is:
- Set a variable to the name of the desired sequential data
set. In this case LOGON.CLIST with a high level qualifier of
the active
TSO user's user-id (&SYSUID).
- If the data set exists then execute it
- Otherwise invoke ISPF
Within the LOGON.CLIST your users can now reallocate any existing
allocation by using the TSO ALLOC command or using one of the concatenation
commands available on the CBT Tape (http://www.cbttape.org and
look for CONCAT or KONCAT). These concatenation commands allow
an existing allocation to be altered provided that it has not already
been opened. As mentioned earlier, the explicit long form of EXEC
is used in the PARM statement to ensure that SYSEXEC is not opened
in case a user might want to reorder it.
The additional library can be added either in front of existing
allocations or after giving the user flexibility to override any
existing allocations with their own versions of libraries. This
is useful for testing new releases or products.
To improve upon the tsologon process you can add in the allocation
of the users ISPF Profile data set. This allows more flexibility
in allocating the profile in that you can use the TSO PREFIX (which
you cannot do in static JCL) or the Userid. Here is an example
of an enhanced tsologon CLIST:
PROC 0
SET &PROF = '&SYSPREF..ISPF.PROFILE'
IF &SYSDSN(&PROF) NE OK +
THEN DO
WRITE *** ALLOCATING NEW &PROF
ALLOC F(ISPC) DS(&PROF) NEW SPA(15,15) +
DIR(42) TRACKS RECFM(F B) LRECL(80) +
DSORG(PO)
FREE F(ISPC)
END
ALLOC F(ISPPROF) DS(&PROF) SHR REUSE
ALLOC F(ISPTABL) DS(&PROF) SHR REUSE
KONCAT ISPTLIB &PROF BEFORE
SET &DSN = '&SYSUID..LOGON.CLIST'
IF &SYSDSN(&DSN) = OK +
THEN EXEC &DSN
ELSE ISPF |
This enhanced tsologon CLIST will:
- Set the &PROF variable to the data set name that you
use for your ISPF PROFILE library.
- Test if the ISPF PROFILE library exists.
- If not then allocate it NEW.
- Then allocate it to the ISPPROF DD.
- And allocate it to the ISPTABL DD to be used as a personal
ISPF Table library.
- Use the KONCAT command to add this library to the
head of the ISPTLIB concatenation (where existing tables
are
opened).
- Then the original code to test for a users LOGON.CLIST
As you can see, there is a lot of additional flexibility that
can be gained by using this technique to allocate data sets early
in the TSO LOGON process. Both the installation and the user gain
additional capabilities.
This article is one in a series that will address issues related
to different aspects of working with TSO/ISPF. To make this series
more 'user friendly' we solicit ideas from you, our readers, on
topics that would be of interest to you. Please send your ideas
to jbmoore@tsotimes.com.
|