Previous Page | Next Page

Windows and Commands in z/OS Environments

X Command: z/OS



Enables you to enter an operating environment command without ending your SAS session.
z/OS specifics: portable version of the TSO command

Syntax
Details
Using the X Statement to Issue UNIX System Services Commands
Restrictions in SAS Software Support for UNIX System Services

Syntax

X <command>


Details

The X and TSO commands are identical, with one exception: under an operating environment other than z/OS, the TSO command has no effect, whereas the X command is always processed. See TSO Command: z/OS for more information.


Using the X Statement to Issue UNIX System Services Commands

To start the UNIX System Services shell, issue the following X statement:

x omvs;

Note:   UNIX System Services commands are case sensitive.  [cautionend]

You can also use the X statement to issue any of three UNIX System Services commands:

x cd directory;

changes the current working directory to directory. If directory is omitted, the current working directory is changed to the working directory that was initially assigned to your login name.

x umask mask;

changes the current file-mode creation mask value to mask. According to UNIX conventions, mask is a one- to three-digit octal number. The file-mode creation mask modifies the file mode of new files. Each 1 bit in the file-mode creation mask causes the corresponding permission bit in the file mode to be disabled. If a bit is 0 in the mask, the corresponding file-mode bit can be enabled. For UNIX System Services files that are created by SAS, the file mode for new files is "-rw-rw-rw-"; however, this mode is modified by the current file-mode creation mask. For example, x umask 022 ensures that each newly created file can be written to only by its owner. (For detailed information about the file-mode creation mask, see your IBM documentation.)

The new value is displayed in the SAS log. If mask is not specified, the current value is simply displayed in the SAS log; the current file-mode creation mask value remains unchanged.

x pwd;

displays your current working directory in the SAS log.

Aside from these three commands, it is not possible to issue UNIX System Services commands with the X command. However, you can use the PIPE access method of the FILENAME statement or function to invoke a USS command and send input to the command or read its output. See Piping Data between SAS and UNIX System Services Commands for more information.

To issue a TSO command or CLIST that has the same name as one of the case-sensitive commands (a CLIST named CD, for example), either enter the command using uppercase characters, or use the TSO: prefix and enclose the command in quotation marks, as in the following examples:

x CD option1 option2 ...;
x 'tso:cd option1 option2 ...';


Restrictions in SAS Software Support for UNIX System Services

It is not possible to run SAS under the UNIX System Services shell. However, you can run the shell after you initialize SAS by using the x omvs; statement or by using x bpxbatch sh [unix command]; to run a UNIX shell command.

Previous Page | Next Page | Top of Page