TSO command
A command you type at READY to make the system do something at once.
Also written TSO commands
Why it matters. Listing, copying and submitting are all TSO commands. Many of your first tasks use them.
See it
- LISTUSER
- The command. What to do.
- KYLE
- The operand. What to do it to.
Syntax
LISTDS 'dataset.name' [MEMBERS] [STATUS] [HISTORY] [LABEL]
- 'dataset.name'
- The dataset. Put it in quotes for a full name.
- MEMBERS
- List the members of a library.
- STATUS
- Show whether the dataset is in use.
- HISTORY
- Show when it was created and last used.
- LABEL
- Show the label details (tape and some disk datasets).
Try it LISTDS
- 1
Show the details of the customer file.
LISTDS 'ZBANK.DATA.CUSTOMER' - 2
Now list the members of the DEV.JCL library.
LISTDS 'ZBANK.DEV.JCL' MEMBERS - 3
Try the first file again without the quotes.
LISTDS ZBANK.DATA.CUSTOMER
Remember
- A TSO command does one thing right now.
- Put dataset names in quotes, or TSO adds your user ID in front.
- In ISPF, put the word TSO before it: TSO LISTDS.
The usual mistake
LISTDS ZBANK.DATA.CUSTOMER
Without quotes, TSO puts your user ID in front of the name, so it looks for a file that isn't there.
LISTDS 'ZBANK.DATA.CUSTOMER'
On real z/OS
The quote rule works the same: TSO adds your prefix to a name with no quotes. On real z/OS the prefix is your user ID unless you change it with PROFILE PREFIX, and PROFILE NOPREFIX turns it off. MF/OS keeps the user ID as the prefix.
Where can I practise TSO command?
Right here, at ZedBank. You take a junior job at a simulated bank and use TSO command in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- TSOTime Sharing Option: the interactive login environment on z/OS, where you get a command prompt and a session of your own.
- ISPFThe full-screen, menu-driven workbench most people use to do their day-to-day work on z/OS.
- REXXA readable scripting language used across the mainframe for automation, tooling and quick one-off tasks.
- SubmitHanding JCL to the system to be run, which queues it as a job and gives it a job number.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.