Macro Functions in UNIX Environments


The following functions have operating environment dependencies:

%SCAN

  • searches for a word that is specified by its position in a string. The form of the %SCAN function is

    • %SCAN ( argument , n ,< delimiters >);

  • On ASCII systems, the default delimiters are

     blank .< ( + & ! $ * ) ; ^ - / , % 

% SYSGET

  • returns the character string that is the value of the environment variable passed as the argument. Both UNIX and SAS environment variables can be translated using the %SYSGET function. A warning message is printed if the global variable does not exist. The form of the %SYSGET function is

    • %SYSGET ( environment-variable );

    For example, the following code writes the value of the HOME environment variable to the SAS log:

     %let var1=%sysget(HOME);   %put &var1; 



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