<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Does _LAST_ and &amp;amp;SYSLAST always means the same value? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946786#M370745</link>
    <description>&lt;P&gt;Generally I'm not a fan of _LAST_ or &amp;amp;SYSLAST, and I think it was a bad language design decision to have a PROC step default to reading _LAST_ if no dataset is specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's part of the language so it's not going to change, but I would avoid relying on either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, I think they really might be the same thing.&amp;nbsp; I just noticed that if you assign a value the the macro variable SYSLAST, the value will be used by _LAST_, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let syslast=sashelp.class ;

proc print data=_last_(obs=3) ;
run ;

%let syslast=sashelp.shoes ;

proc print data=_last_(obs=3) ;
run ;

options _last_=sashelp.prdsale ;
%put &amp;amp;syslast ;

proc print ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2024 12:09:46 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2024-10-09T12:09:46Z</dc:date>
    <item>
      <title>Does _LAST_ and &amp;SYSLAST always means the same value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946768#M370743</link>
      <description>I am going to write some macro and want to know which one is more robuster.</description>
      <pubDate>Wed, 09 Oct 2024 07:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946768#M370743</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2024-10-09T07:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Does _LAST_ and &amp;SYSLAST always means the same value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946769#M370744</link>
      <description>&lt;P&gt;According to the documentation, they will deliver the same value. With %SYSLAST, take care of macro timing rules and the trailing blanks.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 08:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946769#M370744</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-10-09T08:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Does _LAST_ and &amp;SYSLAST always means the same value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946786#M370745</link>
      <description>&lt;P&gt;Generally I'm not a fan of _LAST_ or &amp;amp;SYSLAST, and I think it was a bad language design decision to have a PROC step default to reading _LAST_ if no dataset is specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's part of the language so it's not going to change, but I would avoid relying on either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, I think they really might be the same thing.&amp;nbsp; I just noticed that if you assign a value the the macro variable SYSLAST, the value will be used by _LAST_, e.g.:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let syslast=sashelp.class ;

proc print data=_last_(obs=3) ;
run ;

%let syslast=sashelp.shoes ;

proc print data=_last_(obs=3) ;
run ;

options _last_=sashelp.prdsale ;
%put &amp;amp;syslast ;

proc print ;
run ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 12:09:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946786#M370745</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-10-09T12:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Does _LAST_ and &amp;SYSLAST always means the same value?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946810#M370747</link>
      <description>&lt;P&gt;They will both reference the same dataset, if that is what you meant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But they aren't the same thing at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_LAST_ is a keyword you can use in places where SAS syntax expects a dataset name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SYSLAST is a macro variable.&amp;nbsp; You can use it anywhere you would use a macro variable.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 16:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Does-LAST-and-amp-SYSLAST-always-means-the-same-value/m-p/946810#M370747</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-10-09T16:36:42Z</dc:date>
    </item>
  </channel>
</rss>

