<?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: Data step first.variable equivalent in Proc SQL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720382#M223165</link>
    <description>&lt;P&gt;Thank you Chris for commenting -- they help me to understand the whole thing here. Really appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. It is very &lt;STRONG&gt;expensive&lt;/STRONG&gt; as shown by the the note in the log. Sorting and remerging of the data may be needed.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I don't see any big problems with remerging info in the log. Can you advise what do you mean by&amp;nbsp;&lt;STRONG&gt;expensive&lt;/STRONG&gt;&amp;nbsp;? (they sound like problematic )&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Function &lt;STRONG&gt;monotonic&lt;/STRONG&gt;(0 is not production is should not be used in &lt;STRONG&gt;production&lt;/STRONG&gt; jobs, as mentioned.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I understand&amp;nbsp;monotonic() is not documented and thank you for restate and suggest that it should not be used in production.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is just my exploration in replacing data steps as we might need shift current work and using &lt;STRONG&gt;DBT&lt;/STRONG&gt; in the future.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The record selected by the HAVING clause can vary from one run to the next as SQL can process data in any &lt;STRONG&gt;order&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I thought as long as the &lt;STRONG&gt;input data is properly sorted&lt;/STRONG&gt;, we would expect to get the data as wanted.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I have tested different order combination of the source data, it looks like it produces what is targeted.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;4. For all these reasons, and as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; mentioned, you should use the right tool, which here is the data step.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;No problems at all, I am using data step in most cases. As mentioned earlier, it is just an &lt;STRONG&gt;exploration&lt;/STRONG&gt; in preparation moving to DBT.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;After all, would love to hear any suggestions, ideas, experience, that any one would love to share in migrating current SAS code to DBT ...&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2021 02:16:07 GMT</pubDate>
    <dc:creator>Suzy_Cat</dc:creator>
    <dc:date>2021-02-19T02:16:07Z</dc:date>
    <item>
      <title>Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720106#M223039</link>
      <description>&lt;P&gt;Hi wonderful helpers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me to get the&amp;nbsp;equivalent Proc SQL code to achieve what&amp;nbsp; first.variable can get in data steps?&lt;/P&gt;
&lt;P&gt;The idea is to only take the first record for each PID (no matter how many obs, and how they been sorted) using Proc SQL code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="have.PNG" style="width: 347px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54868iA37F1194029AD8CF/image-dimensions/347x156?v=v2" width="347" height="156" role="button" title="have.PNG" alt="have.PNG" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 359px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54869i322FF838523FDC2F/image-dimensions/359x111?v=v2" width="359" height="111" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the sample code to generate the datasets to play:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;    
   infile datalines;  
   input PID $1-7 code $8 +1 date date9.; 
   datalines;          
AAAACd	1	13Aug2012
AAAACd	3	13Aug2012&lt;BR /&gt;AAAACd	5	13Aug2012
bbbbbd	1	14Dec2018
bbbbbd	2	14Dec2018
ggggec	0	23Apr2012
ggggec	4	23Apr2012
;                          

data have;
set have;
format date date9.;
run;

data want;
set have;
if first.PID;
by pid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 05:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720106#M223039</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-18T05:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720107#M223040</link>
      <description>&lt;P&gt;Afaik there is no equivalent to first.variable in proc sql, due to the nature of the procedure. And this has been discussed already, please use the search-function.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 05:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720107#M223040</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-02-18T05:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720122#M223046</link>
      <description>&lt;P&gt;SQL is not suited to handling data in order.&lt;/P&gt;
&lt;P&gt;SQL actually does not guarantee that a query will read the data in any given order.&lt;/P&gt;
&lt;P&gt;One way around this is to use (very costly in terms of performance) window functions. Sadly &lt;A href="https://communities.sas.com/t5/SASware-Ballot-Ideas/Add-window-functions-in-SAS-SQL/idi-p/462556" target="_self"&gt;SAS still does not support&lt;/A&gt; this non-ANSI-compliant feature.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 07:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720122#M223046</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-18T07:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720124#M223047</link>
      <description>&lt;P&gt;If you have a criterium identifying the "first" observation within the group, you can use it with GROUP BY in a HAVING clause::&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table cwant as
  select *
  from have
  group by pid
  having code = min(code)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but that won't work in your case, as code is of type character, so the MIN function can't be used.&lt;/P&gt;
&lt;P&gt;So we come back to Maxim 14: Use the Right Tool, which means the data step for this task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: I correct myself. MAX() and MIN() do work on character variables in SAS SQL, so this code creates your wanted result:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;    
input PID $ code $ date :date9.;
format date yymmdd10.;
datalines;          
AAAACd  1 13Aug2012
AAAACd  3 13Aug2012
AAAACd  5 13Aug2012
bbbbbd  1 14Dec2018
bbbbbd  2 14Dec2018
ggggec  0 23Apr2012
ggggec  4 23Apr2012
;                          

proc sql;
create table want as
  select *
  from have
  group by pid
  having code = min(code)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that, with large datasets, you will be MUCH better off with the data step in terms of performance. Up to orders of magnitude.&lt;/P&gt;
&lt;P&gt;So it still boils down to Maxim 14.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 11:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720124#M223047</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-22T11:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720290#M223121</link>
      <description>&lt;P&gt;I hate doing this in PROC SQL but here.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table want(drop=n) as 
  select *, monotonic() as n
    from have
    group by PID
    having (calculated n) = min(calculated n)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Know that&amp;nbsp;&lt;CODE class=" language-sas"&gt;monotonic&lt;/CODE&gt;&amp;nbsp;is considered experimental and undocumented and may not be supported in the future by SAS. Also know such SQL queries will give the following note in the SAS log.&amp;nbsp; If you are using a having clause with aggregation functions you will, in general, be doing two passes on your data, which can be slow if your data is big.&lt;/P&gt;
&lt;PRE&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Feb 2021 18:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720290#M223121</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-02-18T18:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720314#M223128</link>
      <description>&lt;P&gt;Thank you Chris, for explaining&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 20:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720314#M223128</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-18T20:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720315#M223129</link>
      <description>Thought of this solution too. It is the closest to get there. &lt;BR /&gt;&lt;BR /&gt;If there is no certain criterium identifying the "first" observation within the group, then in order to keep whatever the order is, an extra step required to create a column to hold the order info for PID.</description>
      <pubDate>Thu, 18 Feb 2021 20:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720315#M223129</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-18T20:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720317#M223130</link>
      <description>Hey Phil,&lt;BR /&gt;&lt;BR /&gt;This is exactly what I wanted to achieve!!&lt;BR /&gt;Learnt how to use monotonic() !!&lt;BR /&gt;Amazing! Perfact!!&lt;BR /&gt;&lt;BR /&gt;It does the magic!</description>
      <pubDate>Thu, 18 Feb 2021 20:31:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720317#M223130</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-18T20:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720320#M223132</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for chipping in your knowledge and your wonderful thoughts!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Found this place really cool to learn and grow.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case anyone is interested, here is some very useful info for &lt;STRONG&gt;monotonic:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/MONOTONIC-function-in-PROC-SQL/ta-p/475752" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/MONOTONIC-function-in-PROC-SQL/ta-p/475752&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 20:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720320#M223132</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-18T20:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720372#M223157</link>
      <description>&lt;P&gt;Note the many limitations of your chosen solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. It is very expensive as shown by the the note in the log. Sorting and remerging of the data may be needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Function monotonic(0 is not production is should not be used in production jobs, as mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The record selected by the HAVING clause c&lt;SPAN style="font-family: inherit;"&gt;an vary from one run to the next as SQL can process data in any order.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. For all these reasons, and as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;mentioned, you should use the right tool, which here is the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 01:15:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720372#M223157</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-19T01:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720382#M223165</link>
      <description>&lt;P&gt;Thank you Chris for commenting -- they help me to understand the whole thing here. Really appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. It is very &lt;STRONG&gt;expensive&lt;/STRONG&gt; as shown by the the note in the log. Sorting and remerging of the data may be needed.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I don't see any big problems with remerging info in the log. Can you advise what do you mean by&amp;nbsp;&lt;STRONG&gt;expensive&lt;/STRONG&gt;&amp;nbsp;? (they sound like problematic )&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Function &lt;STRONG&gt;monotonic&lt;/STRONG&gt;(0 is not production is should not be used in &lt;STRONG&gt;production&lt;/STRONG&gt; jobs, as mentioned.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I understand&amp;nbsp;monotonic() is not documented and thank you for restate and suggest that it should not be used in production.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This is just my exploration in replacing data steps as we might need shift current work and using &lt;STRONG&gt;DBT&lt;/STRONG&gt; in the future.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The record selected by the HAVING clause can vary from one run to the next as SQL can process data in any &lt;STRONG&gt;order&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I thought as long as the &lt;STRONG&gt;input data is properly sorted&lt;/STRONG&gt;, we would expect to get the data as wanted.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I have tested different order combination of the source data, it looks like it produces what is targeted.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;4. For all these reasons, and as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; mentioned, you should use the right tool, which here is the data step.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;No problems at all, I am using data step in most cases. As mentioned earlier, it is just an &lt;STRONG&gt;exploration&lt;/STRONG&gt; in preparation moving to DBT.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;After all, would love to hear any suggestions, ideas, experience, that any one would love to share in migrating current SAS code to DBT ...&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 02:16:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720382#M223165</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-19T02:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720386#M223168</link>
      <description>&lt;P&gt;1. The log could show notes regarding remerging the data, and using threaded sorts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;This is expensive in term of resources. Instead of reading and writing the data sequentially, the whole table is&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp;fully sorted and reprocessed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&amp;nbsp; The real time doubles in my small example. The CPU time quadruples.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Because threads can be used, the order of the data will change depending on how threads synchronise. Using options &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lesysoptsref&amp;amp;docsetTarget=p0cvg7xpfvfyn4n1rnp64gu91poh.htm&amp;amp;locale=en" target="_self"&gt;NOTHREADS&lt;/A&gt;&amp;nbsp;prevents that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Also when sorting occurs with no full information on the sort order (which data comes first in each BY group?), the order in each BY group can change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This is prevented by option &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lesysoptsref&amp;amp;docsetTarget=n0rc82l3yk2pa9n1xetjcre5ve5e.htm&amp;amp;locale=en" target="_self"&gt;SORTEQUALS&lt;/A&gt; for proc sort. I don't think this option controls proc sql.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See here:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;30 data T; do I=1 to 1e7; output; output; end; run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: Compression was disabled for data set WORK.T because compression overhead would increase the size of the data set.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The data set WORK.T has 20000000 observations and 1 variables.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: DATA statement used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;real time 0.71 seconds&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;cpu time 0.71 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#3366FF"&gt;31 data T1; set T; by I; if first.I; run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NOTE: Compression was disabled for data set WORK.T1 because compression overhead would increase the size of the data set.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: There were 20000000 observations read from the data set WORK.T.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The data set WORK.T1 has &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;10000000&lt;/STRONG&gt; &lt;/FONT&gt;observations and 1 variables.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: DATA statement used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;real time 2.27 seconds&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;cpu time 2.26 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;32 proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;32 ! create table T2 as select monotonic() as M, I from T group by I having M=min(M);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;NOTE: SAS threaded sort was used.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: Compressing data set WORK.T2 increased size by 58.33 percent. &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Compressed is 114 pages; un-compressed would require 72 pages.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: Table WORK.T2 created, with &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;579164&lt;/STRONG&gt; &lt;/FONT&gt;rows and 2 columns.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;32 ! quit;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;real time 5.32 seconds&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;cpu time 10.06 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;33 proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#0000FF"&gt;33 ! create table T3 as select monotonic() as M, I from T having M=min(M);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: Compressing data set WORK.T3 increased size by 100.00 percent. &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Compressed is 2 pages; un-compressed would require 1 pages.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: Table WORK.T3 created, with 1 rows and 2 columns.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;33 ! quit;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;real time 5.37 seconds&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;cpu time 5.37 seconds&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, i just noticed the volumes &lt;STRONG&gt;are not&lt;/STRONG&gt; as expected. This SQL solution may not even do what you think it does.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The random-order issue can be seen here:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc sql; create table T4 as select monotonic() as M, I from T order by I; quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;which yields:&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.T4" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="r header" scope="col"&gt;M&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;I&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;6&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;5&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 03:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720386#M223168</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-19T03:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720715#M223278</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for taking time helping me understand the underlying problem here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tested each step as described, and found the result really scary as it totally not what expected. I can not figure out why there are some records not being selected &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Test; do I=1 to 1e7; output; output; end; run;

data Test_first; set Test; by I; if first.I; run;

proc sql;
	create table Test_monotonic as 
	select  I, monotonic() as M
	from test 
	group by I 
	having M=min(M)
	order by i,M
;Quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Suzy_Cat_0-1613897107438.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54992i74A3E5CA36875CA9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Suzy_Cat_0-1613897107438.png" alt="Suzy_Cat_0-1613897107438.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 08:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720715#M223278</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-21T08:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720716#M223279</link>
      <description>&lt;P&gt;the log shows&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Compression was disabled for data set WORK.TEST_MONOTONIC because compression overhead would increase the size of the data 
      set.
NOTE: Table WORK.TEST_MONOTONIC created, with 627507 rows and 2 columns.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Feb 2021 08:46:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720716#M223279</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-21T08:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720783#M223308</link>
      <description>&lt;P&gt;Well it looks like monotonic() confuses the hell out of proc SQL.&lt;/P&gt;
&lt;P&gt;The result is different depending on whether another variable is added or not.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;data TEST; do I=1 to 1e7; &lt;FONT color="#FF0000"&gt;N+1;&lt;/FONT&gt; output; &lt;FONT color="#FF0000"&gt;N+1;&lt;/FONT&gt; output; end; run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;31 proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;32 create table&lt;FONT color="#000000"&gt; &lt;FONT face="courier new,courier"&gt;TEST_MONOTONIC2 &lt;/FONT&gt;as se&lt;/FONT&gt;lect *, &lt;FONT color="#FF0000"&gt;min(N),&lt;/FONT&gt; min(M) as a from(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;33 select I, &lt;FONT color="#FF0000"&gt;N&lt;/FONT&gt;, monotonic() as M&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;34 from TEST )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;35 group by I&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;36 /* having M=min(M)*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;37 order by I, M&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;38 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: The query requires remerging summary statistics back with the original data.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: SAS threaded sort was used.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;NOTE: Table WORK.TEST_MONOTONIC2 created, with 20000000 rows and 5 columns.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;41 proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;42 create ta&lt;FONT color="#000000"&gt;ble &lt;FONT face="courier new,courier"&gt;TEST_MONOTONIC3 &lt;/FONT&gt;as s&lt;/FONT&gt;elect *, min(M) as a from(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;43 select I, monotonic() as M&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;44 from TEST )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;45 group by I&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;46 /* having M=min(M)*/&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;47 order by I, M&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;48 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NOTE: SAS threaded sort was used.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#FF0000"&gt;NOTE: Table WORK.TEST_MONOTONIC3 created, with 10000000 rows and 3 columns.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;We can't even call this a defect as the function is unsupported.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;This is why staying away&amp;nbsp;from non-production features&amp;nbsp;is advised: T&lt;/FONT&gt;&lt;FONT color="#000000"&gt;hey have not been fully tested. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Heck even some new production features escape into production while still hiding &lt;EM&gt;behaviours&lt;/EM&gt; from the QA process.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Plus really, one of the strengths of the SAS language is that it allows leveraging sorted tables for best performance. Make use of that.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 21:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720783#M223308</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-21T21:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720887#M223351</link>
      <description>&lt;P&gt;As was shown, MONOTONIC() is unreliable when used in conjunction with a HAVING clause.&lt;/P&gt;
&lt;P&gt;By splitting the SQL into two steps, it works, but just look at this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Test;
do I=1 to 1e7;
output;
output;
end;
run;

data Test_first;
set Test;
by I;
if first.I;
run;

proc sql;
create table Test_monotonic as 
  select I, monotonic() as M
  from test 
;
create table test_m2 as
  select i, m
  from test_monotonic
  group by i
  having m = min(m)
  order by i, m
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;PRE&gt; 73         data Test;
 74         do I=1 to 1e7;
 75         output;
 76         output;
 77         end;
 78         run;
 
 NOTE: The data set WORK.TEST has 20000000 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           0.78 seconds
       cpu time            0.65 seconds
       
 
 79         
 80         data Test_first;
 81         set Test;
 82         by I;
 83         if first.I;
 84         run;
 
 NOTE: There were 20000000 observations read from the data set WORK.TEST.
 NOTE: The data set WORK.TEST_FIRST has 10000000 observations and 1 variables.
 NOTE:  Verwendet wurde: DATA statement - (Gesamtverarbeitungszeit):
       real time           2.05 seconds
       cpu time            1.92 seconds
       
 
 85         
 86         proc sql;
 87         create table Test_monotonic as
 88           select I, monotonic() as M
 89           from test
 90         ;
 NOTE: Table WORK.TEST_MONOTONIC created, with 20000000 rows and 2 columns.
 
 91         create table test_m2 as
 92           select i, m
 93           from test_monotonic
 94           group by i
 95           having m = min(m)
 96           order by i, m
 97         ;
 NOTE: The query requires remerging summary statistics back with the original data.
 NOTE: Table WORK.TEST_M2 created, with 10000000 rows and 2 columns.
 
 98         quit;
 NOTE:  Verwendet wurde: PROZEDUR SQL - (Gesamtverarbeitungszeit):
       real time           27.45 seconds
       cpu time            22.22 seconds
&lt;/PRE&gt;
&lt;P&gt;As I added to my other post, SQL quickly deteriorates to performance worse by order of magnitudes.&lt;/P&gt;
&lt;P&gt;Forcing SQL to do something that it is not designed to do is not a good idea.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, if you do something similar in explicit passthrough to a database, the results might be different, as dedicated DB systems have much more powerful optimization.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 12:00:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/720887#M223351</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-02-22T12:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721026#M223396</link>
      <description>&lt;P&gt;Hi Kurt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is such a thorough exploration.&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Your in-depth knowledge that helps&amp;nbsp;us learn and grow.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Much appreciated!!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 19:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721026#M223396</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-22T19:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721115#M223438</link>
      <description>&lt;P&gt;You probably should remove the chosen answer to your question&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/293494"&gt;@Suzy_Cat&lt;/a&gt;&amp;nbsp;as this might mislead future readers.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 22:31:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721115#M223438</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-02-22T22:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721119#M223440</link>
      <description>will do - not sure if i could though</description>
      <pubDate>Mon, 22 Feb 2021 22:53:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721119#M223440</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-22T22:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: Data step first.variable equivalent in Proc SQL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721121#M223441</link>
      <description>Hi Chris, I cant find any option that I can change the flag for solution?</description>
      <pubDate>Mon, 22 Feb 2021 22:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-step-first-variable-equivalent-in-Proc-SQL/m-p/721121#M223441</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2021-02-22T22:57:11Z</dc:date>
    </item>
  </channel>
</rss>

