The TSO is the classic z/OS interactive remote shell, developed for mainframes, accessable via a client terminal software. It is used for:
listing and editing data sets
launching JCL
launching REXX
launching ISPF
sending commands to the MVS part of the z/OS
The TSO can be accessed via Command Prompt or VSCode terminal of the client. In case of Powershell launch CMD within. It will work only if the profile settings JSON contains the correct data for TSO and general settings.
On the client terminal the Zowe Command Line Interface (Zowe CLI) maintains the connection between the local terminal and the remote shell.
TSO creates an Address Space (AS) rendered to the remote shell with dynamic memory, processor and storage resources managed by the system by the need.
FIGURE OF TSO LAYERS:
Communication with the TSO can happen in two versions:
single-step mode
AS command
A one-time command will open a temporary Address Space in a remote shell, execute the command, send back the message to the terminal, then close the remote shell. The sequential commands are separated as for every command another remote shell is opened then closed.
The -ssm switch marks the single-step mode, forces Zowe to send the parts of the command as one and to keep it as native command. It is advised to always use it.
In case of one-time command, the Zowe CLI can close the connection with a time-out. In case of longer runtime it is strongly advised to collect the messages in a log file and check the output in another time later.
EXAMPLE FOR SINGLE-STEP COMMAND:
In case of AS command, the TSO will keep the remote shell and the appearing variables in it until:
a closing command arrives
Zowe CLI time-out
Because the time-out will lose the connection with the specific AS, the sequental commands from the terminal will not run, or can not run in the same AS with the same temporal data, especially when the commands should be chained for shared variables. It is strongly advised not to use AS for longer runtime or keep the shared variables in physical files instead of in the memory.
When starting up the AS, the returning message will contain the Address Space key (ASkey) with which all later commands must be sent so the TSO will know into which shell the command must be fed.
The --data which marks that the parameter after the switch contains the command which must be sent to TSO. It is advised to always use it.
EXAMPLE FOR OPENING AND CLOSING AN ADDRESS SPACE:
TSO commands:
listcat, listds, listalc (list data set)
edit 'DATASET' (edit data set)
submit 'DATASET(JCLMEMBER)' (execute JCL)
exec 'DATASET(REXXMEMBER)' (execute Rexx)
ispf (launch ISPF)