Automatic Macro Variables |
Type: | Automatic macro variable (read and write) |
See also: | SYSLAST Automatic Macro Variable |
Details | |
Comparisons | |
Example | |
Comparing Values Produced by SYSDSN and SYSLAST |
Details |
The libref and data set name are displayed in two left-aligned fields. If no SAS data set has been created in the current program, SYSDSN returns eight blanks followed by _NULL_ followed by two more blanks.
Note: The macro processor always stores the value of SYSDSN in unquoted form. To quote the resolved value of SYSDSN, use the %SUPERQ macro quoting function.
Comparisons |
Assigning a value to SYSDSN is the same as specifying a value for the _LAST_= system option.
The value of SYSLAST is often more useful than SYSDSN because the value of SYSLAST is formatted so that you can insert a reference to it directly into SAS code in place of a data set name.
Example |
Create a data set WORK.TEST and then enter the following statements:
%put Sysdsn produces: *&sysdsn*; %put Syslast produces: *&syslast*;
When these statements execute, the following lines are written to the SAS log:
Sysdsn produces: *WORK TEST * Syslast produces: *WORK.TEST *
When the libref or data set name contain fewer than eight characters, SYSDSN maintains the blanks for the unused characters. SYSDSN does not display a period between the libref and data set name fields.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.