Chapter Contents

Previous

Next
SYSLAST

SYSLAST



Contains the name of the SAS data file created most recently

Type: Automatic macro variable (read and write)
See also: SYSDSN


Details
Comparisons
Examples
Example 1: Comparing Values Produced by SYSLAST and SYSDSN


Details

The name is stored in the form libref.dataset. You can insert a reference to SYSLAST directly into SAS code in place of a data set name. If no SAS data set has been created in the current program, the value of SYSLAST is _NULL_, with no leading or trailing blanks.


Comparisons


Examples

Example 1: Comparing Values Produced by SYSLAST and SYSDSN

Create the data set FIRSTLIB.SALESRPT and then enter the following statments:

%put Sysdsn produces:  *&sysdsn*;
%put Syslast produces: *&syslast*;

Executing these statements writes this to the SAS log:

Sysdsn produces:  *FIRSTLIBSALESRPT*
Syslast produces: *FIRSTLIB.SALESRPT*

The name stored in SYSLAST contains the period between the libref and data set name.


Chapter Contents

Previous

Next

Top of Page

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