Many times, individual TSO/ISPF users might have a need to know certain specific values related to either the system they are running on or their own TSO session. Additionally, internal ISPF settings, tables and defaults might need to be examined.
This article will discuss two methods of acquiring system/session level data. The first method is to use the handy ISPVCALL trace tool. The second method uses a simple, fall-through REXX EXEC that does nothing but use the MVSVAR and SYSVAR built-in functions to display values of global variables.
Both methods are valid, easy to use and will provide the needed views into low-level values and settings.
ISPVCALL
Written by the great Doug Nadel, ISPVCALL provides many interesting details about a TSO/ISPF session. I like to invoke it from ISPF Option 6. Executing it is as simple as entering: ISPVCALL STATUS from the Command line at Option 6.
Here’s what the initial display looks like:
As you can see, there are many detailed fields displayed. On this initial screen, the displayed values are mostly system software release levels and other single-valued data items. This screen might be all you ever need to view if all you are interested in are release levels and other global z/OS settings and values.
However, by scrolling forward in the CALL.TRACE file, you will be able to see a stunning array of values, settings and other parameters that apply to your active TSO/ISPF session.
Even if you don’t fully grasp the meanings of all of the information being displayed, it is nice to know that you DO have the means of answering some of your own questions about the internals of your environment.
SAYSYS REXX
For a number of years now, REXX programmers have been making use of the MVSVAR and SYSVAR built-in functions (BIFs). These particular BIFs are about as easy to use and understand as you’ll ever see.
Their syntax is:
MVSVAR(“variable”)
or
SYSVAR(“variable”)
The only thing that is even remotely tricky about using them is knowing which named variables to use with MVSVAR and which to use with SYSVAR.
/* REXX */
Say ‘Sysplex Name………..’ Mvsvar(“SYSPLEX”)
Say ‘System Name…………’ Mvsvar(“SYSNAME”)
Say ‘OS Version………….’ Mvsvar(“SYSOPSYS”)
Say ‘MVS Version…………’ Mvsvar(“SYSMVS”)
Say ‘DFP Level…………..’ Mvsvar(“SYSDFP”)
Say ‘SMS?……………….’ Mvsvar(“SYSSMS”)
Say ‘SMF Name……………’ Mvsvar(“SYSSMFID”)
Say ‘System Clone-ID……..’ Mvsvar(“SYSCLONE”)
Say ‘JES Version…………’ Sysvar(“SYSJES”)
Say ‘JES Nodename………..’ Sysvar(“SYSNODE”)
Say ‘HSM Version…………’ Sysvar(“SYSHSM”)
Say ‘RACF Version………..’ Sysvar(“SYSLRACF”)
Say ‘TSO/E Version……….’ Sysvar(“SYSTSOE”)
Say ‘ ‘
Say ‘-For TSO User’
Sysvar(“SYSUID”) ‘ prefix set to’ Sysvar(“SYSPREF”)
Say ‘ Executing in………’ Sysvar(“SYSENV”)
Say ‘ Using LOGON Proc…..’ Sysvar(“SYSPROC”)
Say ‘ Terminal-ID……….’ Strip(Sysvar(“SYSTERMID”),’L’)
Say ‘ Terminal Lines…….’ Strip(Sysvar(“SYSLTERM”),’L’)
Say ‘ Screen Width………’ Strip(Sysvar(“SYSWTERM”),’L’)
Say ‘ ISPF?…………….’ Sysvar(“SYSISPF”)
Say ‘ CPU Time Used……..’ Strip(Sysvar(“SYSCPU”),’L’)
Say ‘ SRM Time Used……..’ Strip(Sysvar(“SYSSRV”),’L’)
Exit
To use SAYSYS simply add it to a PDS in either the SYSPROC or SYSEXEC concatenation at your installation. Once in place, invoke it as:
Command ===> TSO SAYSYS
Here’s what the output of the SAYSYS EXEC looks like:
One of the niftier things that a REXX programmer can do with MVSVAR and SYSVAR values is to query them in order to take an appropriate action. For example, if a REXX EXEC is being written to run in both line-mode TSO AND full screen ISPF, the programmer could code something like this to determine how their REXX was running:
If Sysvar(“SYSISPF”) = “ACTIVE” Then
Say “Yup, ISPF baby!”
Conclusion
So there you have it. Two methods for peeking into the guts of your environment. One, ISPVCALL, is all pre-written and ready to use. Two, SAYSYS, also pre-written but open to your own experimentation and programming.
A final thought: Use MVS/Quick-Ref® to search for MVSVAR and SYSVAR to see the large number of values that are available to you as “variables” in the MVSVAR / SYSVAR BIFs.
Jim Moore is editor emeritus of The TSO Times and writes TSO/ISPF code in REXX, Assembler, COBOL and even CLIST!