Macro Statements in UNIX Environments


The arguments that can be entered with the following statements depend on the operating environment:

%SYSEXEC

  • executes UNIX commands. It is similar to the X statement described in "Executing Operating System Commands from Your SAS Session" on page 13. The %SYSEXEC statement enables you to execute operating environment commands immediately and, if necessary, determine whether they executed successfully by examining the value of the automatic macro variable SYSRC. You can use the %SYSEXEC statement inside a macro or in open code. The form of the %SYSEXEC statement is as follows , where command can be any UNIX command:

    • %SYSEXEC < command >;

    For example, the following code writes the status of the default printer to your UNIX shell:

     %sysexec lpstat; 

    Entering %SYSEXEC without a UNIX command starts a new shell, except under the X Interface to SAS. See "Executing Operating System Commands from Your SAS Session" on page 13 for details.




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net