Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 4: TSO Commands


TSO- TSO Commands

This page collects the TSO commands you will reach for every day: checking and changing your session profile, controlling the terminal, sending messages to other users, getting help, running CLISTs and REXX execs, and scheduling a command with WHEN.

The PROFILE command

  • PROFILE displays and changes your TSO session options, such as message handling and prefix behavior.
  • PROFILE with no operands shows the current settings.
  • PROFILE PREFIX(userid) sets the default high-level qualifier used when you omit quotes.
READY
PROFILE
IKJ56688I NO MESSAGE(S) OR PROMPT(S) RECEIVED
CHAR(0) LINE(0) PROMPT INTERCOM NOPAUSE MSGID MODE WTPMSG
NORECOVER PREFIX(FSS094) PLANGUAGE(ENU) SLANGUAGE(ENU)
READY
PROFILE PREFIX(FSS094)

The TERMINAL command

  • TERMINAL controls how TSO talks to your screen: line length, prompt characters and message display.
  • Common operands are LINESIZE, PROMPT, and MSGID (shows message numbers).
READY
TERMINAL LINESIZE(160)
READY
TERMINAL MSGID PROMPT

The SEND command

  • SEND writes a message to another logged-on TSO user or to the system operator.
  • USER(userid) names the recipient. LOGON saves the message if the user is not logged on.
  • OPERATOR(n) routes the message to a console operator instead of a user.
READY
SEND 'BACKUP YOUR DATA SETS' USER(TS0001)
READY
SEND 'MEETING AT 3 PM' USER(TS0002) LOGON
READY
SEND 'PLEASE MOUNT TAPE 123456' OPERATOR(2)

The HELP command

  • HELP shows the syntax and operands of any TSO command.
  • HELP commandname FUNCTION lists what the command does; OPERANDS lists each operand in detail.
  • Press Enter to page through long help text, or PF3 to exit.
READY
HELP ALLOCATE
READY
HELP DELETE OPERANDS

The WHEN command

  • WHEN runs a command automatically when a condition becomes true, typically a time of day.
  • The command to run is given in single quotes.
  • Use it to remind yourself or to kick off work at a fixed time.
READY
WHEN TIME(15:00) 'SEND ''TIME TO LOG OFF'' USER(FSS094)'
READY
WHEN TIME(08:30) 'EXEC ''FSS094.REXX.EXEC(MORNING)'' '

The LISTBC command

  • LISTBC redisplays the broadcast messages shown at logon.
  • MSGNOW shows messages that arrived since logon.
READY
LISTBC
READY
LISTBC MSGNOW

The EXEC command

  • EXEC runs a CLIST or REXX program stored in a PDS member.
  • The PDS must be allocated to SYSPROC (CLIST) or SYSEXEC (REXX), or given as a fully quoted name.
  • Pass parameters after the member name; they arrive as positional arguments in the program.
READY
EXEC 'FSS094.REXX.EXEC(HELLO)'
READY
EXEC 'FSS094.CLIST.LIB(DAILY)' 'FSS094.JCL.CNTL'

The TIME command

  • TIME shows the current date and time from the system clock.
  • Handy in CLISTs and REXX execs for timestamping log lines.
READY
TIME
IKJ56650I TIME-14:22:33 PM. CPU-00:00:03 SERVICE-12345 SESSION-02:15:42 OCTOBER 8, 2026





© copyright mainframebug.com
Privacy Policy
MainframeBug Assistant