I was involved in something similar a few years ago and it
resulted in ISPF more correctly reporting "terminal" dimensions -
such as line length and number of lines on a display.
Of course, now that I haven't touched this for 4(?) years, I
don't remember the variable names.
So problem 1 was I asked for the MOD info for the terminal
because a MOD2 was not large enough and I'd need to tell the OP
to set to the correct MOD#. Problem was, ISPF did not update
config changes!!).
Second problem was, the MOD# didn't change when the user selected
some option to change the terminal size while using our tool (I
would test that from time to time). So I remember that ISPF did
take an APAR for the one but I don't think they did for the
second -- I've slept several times since then.
Don't know if any of that helps or just muddies the water as it
were.
Regards,
Steve Thompson
On 6/17/2026 7:48 PM, Paul Feller wrote:
For item #2 you could try the following variables.
&SYSLTERM and &SYSWTERM
Last Updated: 2026-04-29
&SYSLTERM provides the number of lines available for applications on your terminal
screen. &SYSWTERM provides the width of the screen.
&SYSLTERM and &SYSWTERM can be used when a CLIST reformats the screen using Session
Manager commands. For example, a CLIST called HORZNTL splits the terminal screen horizontally
based on the number of lines on the screen and its width. The following section of HORZNTL
substitutes the control variables in the Session Manager commands that define the windows for
the reformatted screen. By using &SYSLTERM and &SYSWTERM instead of explicit screen
positions, HORZNTL makes optimal use of the space available on a given screen.
I believe they are considered to be part of the TSO/E CLIST world but you can
use them in REXX.
I've used them in REXX execs like the following.
/* REXX */
Say '-------------------------------------------------------'
SAY 'Current Date/Time -' DATE('W') '--' DATE() '--' TIME() ;
Say ' '
Say 'User ID --------' SYSVAR(SYSUID)
Say ' '
Say 'Terminal -------' SYSVAR(SYSTERMID)
Say 'Terminal size --' SYSVAR(SYSLTERM) SYSVAR(SYSWTERM)
Say 'TSO logon proc -' SYSVAR(SYSPROC)
Say 'LPAR name ------' MVSVAR('SYSNAME')
Say 'Hardware Name --' MVSVAR('SYMDEF','HRDWNAME')
Say 'Sysplex name ---' MVSVAR('SYSPLEX')
Say 'JES2 Node Name -' SYSVAR(SYSNODE) '-' SYSVAR(SYSJES)
Say 'z/OS level -----' MVSVAR('SYSOPSYS')
Say '-------------------------------------------------------'
EXIT
Paul
-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of
Charles Mills
Sent: Wednesday, June 17, 2026 05:16 PM
To: [email protected]
Subject: Two TSO terminal I/O from Rexx questions
1. If one were writing a Rexx exec to run in an interactive TSO environment,
what would be the best way to clear the screen and make the next SAY write to
the first line of the screen? Calling out to a user-written assembler routine
that used the STLINENO macro? Or ... ?
2. From a Rexx exec running in interactive TSO, what would be the best way to
determine the number of lines on the terminal? Basically the number of SAYs
that one could do before the user received a *** prompt?
Any related considerations?
Thanks,
Charles
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN