How to Run TSO Commands Correctly

Time-sharing option (TSO) the real purpose is it is a session (environment) where you can create your commands, and you can execute them. On top of that you can run pre-defined commands.


Syntax to run the TSO command.

command-name operand [operand] … 

The supported scripting languages are CLIST, and REXX.

  • CLIST – Command List
  • REXX

TSO commands help to increase the developer’s productivity. Unlike TSO, the ISPF is an interactive utility. The takeaway is you can write a script using any of the languages (CLIST, and REXX), and you call that script from the TSO session.

How to use SMCOPY TSO command?


In this example the SMCOPY – copies dataset of TEST1 to another dataset TEST2.

Precisely, SMCOPY is a predefined command. In TSO, you can use that command. The SMCOPY is part of the TSO commands list.

REXX Script

You can create your scripts and execute them in the TSO environment.

Sample Syntax to run REXX script.

EXEC ‘userid.rexx.exec(timegame)’ exec

Here the timegame is a member of REXX script, which is present in the USER-ID. REXX.EXEC dataset. Here is the guide for IBM REXX.

TSO is time-consuming, and everything is manual. So ISPF utility is developed to increase productivity.

Keep Reading

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.