Format
tsocmd TSO_command
Description
tsocmd runs
a TSO/E command from the shell using the TSO/E terminal monitor program
(IKJEFT01). Unlike the tso command, the tsocmd command
can be used to issue authorized TSO/E commands. (For more information
about the tso command, see tso — Run a TSO/E command from the shell). Because the TSO/E TMP is run in a separate
address space and process from the tsocmd command,
TSO/E commands that are issued do not affect the environment that
the tsocmd is issued from.
See z/OS TSO/E Programming Servicesz/OS TSO/E Programming Services for
more information about the TSO/E TMP.
Usage notes
- The BPXWRFT=YES environment variable can be set to cause file
descriptors to be inherited by the TSO command processor. When it
is set, file descriptors 10-99 are inherited.
Examples
- To issue the authorized RACF® command
RDEFINE, issue:
tsocmd "RDEFINE FACILITY BPX.FILEATTR.PROGCTL UACC(NONE)"
Quotation
marks are used around the command to avoid shell parsing.
- To use OGET to copy from a file in your current directory to an MVS™ data set, issue:
tsocmd "oget hello.c 'source.c(hello)'"
Quotation
marks are used around the command to avoid shell parsing.
- The examples in the tso command also
apply to tsocmd where one replaces the string
'tso -t' with the string 'tsocmd'.
See the examples in the tso command section
(Examples) for more information.
Environment variables
Depending on the
tsocmd command
being issued, you might need to perform allocations or other customization
for the TSO/E environment. Those tasks can be specified using environment
variables. You can use the following environment variables:
- BPXWRFD
- Specifying
YES in a REXX program before the TSO process is started causes the
TSO process to inherit open file descriptors 10 through 99.
- SYSEXEC
- Specifies
the allocation specification for the SYSEXEC DD name. If the TSOALLOC variable
is set, this variable is not automatically used.
- SYSPROC
- Specifies
the allocation specification for the SYSPROC DD name. If the TSOALLOC variable
is set, this variable is not automatically used.
- TSOALLOC
- Specifies
the names of the environment variables that contain allocation specifications.
The names are separated by colons. Case is respected; lowercase letters
are treated as lowercase. The names of the environment variables also
correspond to the name of the DD name to be allocated. The DD name
is always treated as uppercase but the variable name can be specified
in mixed case to avoid possible conflict with similar environment
variable names.
The HOLD attribute is supported for SYSOUT allocation
in the BPXWDYN text interface and TSOALLOC environment variable.
- TSOPROFILE
- Resets
the profile with the arguments that you specify when running the TSO/E
command. (The specified arguments replace the default values.) For
example, to set the TSO prefix and to turn off message IDs, issue:
export TSOPROFILE="prefix(wjs) nomsgid"
The
value of this variable is passed to the TSO/E PROFILE command as is.
If the PROFILE command fails, the requested command is not run. The
output from the PROFILE command is sent to stdout along with the PROFILE
command that was issued.
An allocation specification can be either a
list of cataloged data set names separated by colons or a data set
allocation request. If a list of data set names is used, lowercase
letters are treated as uppercase and the data set names must be fully
qualified.
Specify a request for data set allocation by beginning
the specification with the keyword alloc followed
by keywords or keyword-value pairs in a format similar to the TSO/E
ALLOCATE command. Keys are separated by blanks. A complete listing
of keys can be found in z/OS Using REXX and z/OS UNIX System Services.
You can also refer to the list of keys in the tso command
description in tso.
Exit values
- 0
- The TSO/E command was successful.
- 1-254
- The TSO/E command ended in an error with the listed return code.
- 255
- The TSO/E command ended with an unexpected error, the TSO/E command
return code is outside the range 0-254, no command was entered, an
error occurred when processing an environment variable, or the command
was not found.
Localization
The tsocmd command
is not sensitive to a user's locale. It is up to the user to provide
input that is acceptable to TSO/E.
Usage notes