SASMSTORE= System Option
Identifies the libref of a SAS library with a catalog that contains, or will contain, stored compiled SAS
macros.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Syntax
SASMSTORE=libref
Required Argument
libref
specifies the libref of a SAS library that contains, or will contain, a catalog of stored
compiled SAS macros. This libref cannot be Work.
SERROR System Option
Specifies whether the macro processor issues a warning message when a macro variable reference does
not match a macro variable.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Alias: SERR | NOSERR
Default: SERROR
Syntax
SERROR | NOSERROR
Required Arguments
SERROR
issues a warning message when the macro processor cannot match a macro variable
reference to an existing macro variable.
NOSERROR
issues no warning messages when the macro processor cannot match a macro
variable reference to an existing macro variable.
384 Chapter 20 System Options for Macros
Details
Several conditions can occur that prevent a macro variable reference from resolving.
These conditions appear when one or more of the following is true:
the name in a macro variable reference is misspelled.
the variable is referenced before being defined.
the program contains an ampersand ( &) followed by a string, without intervening
blanks between the ampersand and the string. For example:
if x&y then do;
if buyer="Smith&Jones, Inc." then do;
If your program uses a text string containing ampersands and you want to suppress the
warnings, specify NOSERROR.
SYMBOLGEN System Option
Specifies whether the results of resolving macro variable references are written to the SAS log for
debugging.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
LOGCONTROL
Type: System option
Alias: SGEN | NOSGEN
Default: NOSYMBOLGEN
See: “The SAS Log” in SAS Language Reference: Concepts
Syntax
SYMBOLGEN | NOSYMBOLGEN
Required Arguments
SYMBOLGEN
displays the results of resolving macro variable references. This option is useful for
debugging.
NOSYMBOLGEN
does not display results of resolving macro variable references.
Details
SYMBOLGEN displays the results in this form:
SYMBOLGEN: Macro variable name resolves to value
SYMBOLGEN also indicates when a double ampersand (&&) resolves to a single
ampersand (&).
SYMBOLGEN System Option 385
Example: Tracing Resolution of Macro Variable
References
In this example, SYMBOLGEN traces the resolution of macro variable references when
the macros MKTITLE and RUNPLOT execute:
%macro mktitle(proc,data);
title "%upcase(&proc) of %upcase(&data)";
%mend mktitle;
%macro runplot(ds);
%if %sysprod(graph)=1 %then
%do;
%mktitle (gplot,&ds)
proc gplot data=&ds;
plot style*price
/ haxis=0 to 150000 by 50000;
run;
quit;
%end;
%else
%do;
%mktitle (plot,&ds)
proc plot data=&ds;
plot style*price;
run;
quit;
%end;
%mend runplot;
%runplot(Sasuser.Houses)
When this program executes, this SYMBOLGEN output is written to the SAS log:
SYMBOLGEN: Macro variable DS resolves to sasuser.houses
SYMBOLGEN: Macro variable PROC resolves to gplot
SYMBOLGEN: Macro variable DATA resolves to sasuser.houses
SYMBOLGEN: Macro variable DS resolves to sasuser.houses
SYSPARM= System Option
Specifies a character string that can be passed to SAS programs.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
Type: System option
Syntax
SYSPARM='character-string'
Required Argument
character-string
is a character string, enclosed in quotation marks, with a maximum length of 200.
386 Chapter 20 System Options for Macros
Details
The character string specified can be accessed in a SAS DATA step by the SYSPARM()
function or anywhere in a SAS program by using the automatic macro variable reference
&SYSPARM.
Operating Environment Information
The syntax shown here applies to the OPTIONS statement. At invocation, on the
command line, or in a configuration file, the syntax is host specific. For more
information, see the SAS documentation for your operating environment.
Example: Passing a User Identification to a Program
This example uses the SYSPARM option to pass a user identification to a program.
options sysparm='usr1';
data a;
length z $100;
if sysparm()='usr1' then z="&sysparm";
run;
SYSPARM= System Option 387
388 Chapter 20 System Options for Macros
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset