X Statement: UNIX

Issues an operating environment command from within a SAS session.
Valid in: anywhere
UNIX specifics: valid operating system command
See: X Statement in SAS Statements: Reference

Syntax

X <'operating-system-command'> ;

Optional Argument

operating-system-command
specifies the UNIX command. If you specify only one UNIX command, you do not need to enclose it in quotation marks. Also, if you are running SAS from the Korn shell, you cannot use aliases.

Details

The X statement issues a UNIX command from within a SAS session. SAS executes the X statement immediately.
Neither the X statement nor the %SYSEXEC macro program statement is intended for use during the execution of a DATA step. The CALL SYSTEM routine, however, can be executed within a DATA step. For an example, see CALL SYSTEM Routine: UNIX.
Note: The X statement is not supported without arguments under the X Window System.