X Command

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

Syntax

X <command>

Details

Overview of the X Command

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. For more information, see TSO Command.

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.
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. For more information, see Piping Data between SAS and UNIX System Services Commands.
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 ...';