Chapter Contents

Previous

Next
SYSTEM

SYSTEM



Issues an operating environment command during a SAS session

Category: Special


Syntax
Arguments
Comparisons
Example
See Also

Syntax

SYSTEM(command)

Arguments

command

Operating Environment Information:   See the SAS documentation for your operating environment for information on what you can specify.  [cautionend]


Comparisons

The SYSTEM function is similar to the X statement, the X command, and the CALL SYSTEM routine. In most cases, the X statement, X command, or %SYSEXEC macro statement are preferable because they require less overhead. However, the SYSTEM function can be executed conditionally, and accepts expressions as arguments. The X statement is a global statement and executes as a DATA step is being compiled, regardless of whether SAS encounters a conditional statement.


Example

Execute the host command TIMEDATA if the macro variable SYSDAY is Friday.

data _null_;
   if "&sysday"="Friday" then do;
      rc=system("timedata");
   end;
   else rc=system("errorck");
run;

See Also

CALL Routine:

CALL SYSTEM

Statement:

X


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.