The SYSTEM function
is similar to the X (or TSO) statement, the X (or TSO) command, the
CALL SYSTEM (or CALL TSO) routine, and the %SYSEXEC (or %TSO) macro
statement.
This function returns
the operating environment return code after the command, CLIST, or
REXX exec is executed.
SAS executes the SYSTEM
function immediately. Under
z/OS, TSO is an alias for the SYSTEM function.
On other operating environments, the TSO function has no effect,
whereas the SYSTEM function is always processed.
You can use the SYSTEM
function to perform the following tasks:
-
-
execute CLISTs or REXX execs.
-
use the TSOEXEC command to issue
authorized commands, such as the following example:
system('TSOEXEC ALTDSD ...')
-
issue the following UNIX System
Services shell commands:
cd
,
pwd
,
and
umask
. The shell command names
must be specified in lowercase.
You cannot use the SYSTEM
function to perform the following tasks:
-
issue the TSO commands LOGON and
LOGOFF.
-
execute CLISTs that include the
TSO ATTN statement.
-
issue authorized commands, such
as some RACF commands.