[sas-users] Name of last data set -- created versus used
david.d.chapman at census.gov
david.d.chapman at census.gov
Mon Sep 19 12:14:11 EDT 2011
I checked these options _last_ and macro variables &syslast and &sysdsn
and they give the last file created not the last file used. See the
example below.
268 data USED ;
269 do i=1 to 2;
270 x=3;output;
271 end;
272 run;
NOTE: The data set WORK.USED has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
273
274 data LAST ;
275 do g=1 to 2;
276 y=3;output;
277 end;
278 run;
NOTE: The data set WORK.LAST has 2 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
279 PROC PRINT DATA=USED ;RUN;
NOTE: There were 2 observations read from the data set WORK.USED.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
280 PROC OPTIONS OPTION =_LAST_;
281 RUN;
SAS (r) Proprietary Software Release 9.2 TS2M3
_LAST_=WORK.LAST Last SAS data set created
NOTE: PROCEDURE OPTIONS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
282 %PUT &SYSLAST &SYSDSN;
WORK.LAST WORK LAST
283 RUN;
David D. Chapman
Chief, Quality Assurance Staff
Economic Planning and Coordination Division
U.S. Census Bureau - Economic Statistics
Office: 301-763-6535
Cell: 703-498-5782
E-mail: david.d.chapman at census.gov
Connect with us:
From:
david.d.chapman at census.gov
To:
sas-users list for SAS Users Group <sas-users at lists.census.gov>
Cc:
sas-users at lists.census.gov, sas-users-bounces at lists.census.gov
Date:
09/19/2011 12:01 PM
Subject:
Re: [sas-users] Name of last data set
Sent by:
sas-users-bounces at lists.census.gov
These two macro variables give the name of the last sas dataset created.
It may not always give the last datasets used?
SYSLAST Automatic Macro Variable
Contains the name of the SAS data file created most recently.
Type:
Automatic macro variable (read and write)
See also:
SYSDSN Automatic Macro Variable
SYSDSN Automatic Macro Variable
Contains the libref and name of the most recently created SAS data set.
Type:
Automatic macro variable (read and write)
See also:
SYSLAST Automatic Macro Variable
David D. Chapman
Chief, Quality Assurance Staff
Economic Planning and Coordination Division
U.S. Census Bureau - Economic Statistics
Office: 301-763-6535
Cell: 703-498-5782
E-mail: david.d.chapman at census.gov
Connect with us:
From:
catherine.d.buffington at census.gov
To:
sas-users at lists.census.gov
Date:
09/19/2011 11:36 AM
Subject:
[sas-users] Name of last data set
Sent by:
sas-users-bounces at lists.census.gov
hi,
By default most procs (all? irrelevant) will use the name of the last
dataset you've used if you don't specify one.
I need to know if there is an environmental/macro variable that stores
this that can be used elsewhere in my code.
Thanks!
Cathy Buffington
Center for Economic Studies
US Census Bureau
_______________________________________________
sas-users mailing list
sas-users at lists.census.gov
http://lists.census.gov/mailman/listinfo/sas-users
_______________________________________________
sas-users mailing list
sas-users at lists.census.gov
http://lists.census.gov/mailman/listinfo/sas-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4056 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0002.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 660 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0008.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 646 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0009.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1177 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0010.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 654 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0011.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4056 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0003.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 660 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0012.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 646 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0013.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1177 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0014.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 654 bytes
Desc: not available
URL: <http://lists.census.gov/pipermail/sas-users/attachments/20110919/c54f0a23/attachment-0015.gif>
More information about the sas-users
mailing list