<?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: Syntax error for the first.variables? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373254#M276184</link>
    <description>&lt;P&gt;Still don't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: BY variables are not properly sorted on data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;Names=state_id_9 num=9 name3=state_id first.name3=1 LAST.name3=0 _ERROR_=1 _N_=4&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: There were 5 observations read from the data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.TRANSLIST1 may be incomplete. When this step was stopped there were 3&lt;/P&gt;&lt;P&gt;observations and 3 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK.TRANSLIST1 was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2017 13:12:13 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2017-07-05T13:12:13Z</dc:date>
    <item>
      <title>Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373224#M276178</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Hello:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;I would like to create a varlist base on the first observation of name3.&amp;nbsp; I got syntax error.&amp;nbsp; Please let me know where I have did wrong, thanks.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; Names:&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;$100.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;dx_1&lt;/P&gt;&lt;P&gt;dx_10&lt;/P&gt;&lt;P&gt;dx_80&lt;/P&gt;&lt;P&gt;state_id_5&lt;/P&gt;&lt;P&gt;state_id_9&lt;/P&gt;&lt;P&gt;if_mg_hk_4&lt;/P&gt;&lt;P&gt;if_mg_hk_12&lt;/P&gt;&lt;P&gt;if_mg_hk_30&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; translist1; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test1; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;num=compress(names,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'_'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'A'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;name3=cats(prxchange(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'s/\_\d+//'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,compress(names)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;SQL&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;Select&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; first.name3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;into&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; tranlist3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FROM&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; translist1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;-----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 79&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, ',', -, /, &amp;lt;, &amp;lt;=,&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, FROM, GE, GET, GT, GTT, LE, LET,&lt;/P&gt;&lt;P&gt;LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.&lt;/P&gt;&lt;P&gt;ERROR 79-322: Expecting a :.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:15:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373224#M276178</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-05T12:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373230#M276179</link>
      <description>&lt;P&gt;First.variable and Last.variable are datastep constructs not SQL. &amp;nbsp;SQL has no concept of first or last, or by group processing. &amp;nbsp;Do your processing in a datastep:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set translist1;
  by name3;
  if first.name3 then call symput('tranlist3',name3);
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373230#M276179</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-05T12:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373234#M276180</link>
      <description>&lt;P&gt;Just out of curiosity:&lt;/P&gt;
&lt;P&gt;from where did you get the idea that&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc SQL;
Select where first.name3 ......&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;could work at all?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373234#M276180</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-05T12:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373235#M276181</link>
      <description>&lt;P&gt;I could be wrong about this, but I'm interpreting your question slightly differently.&amp;nbsp; If you are looking to get a subset of all the possible NAME3 values (excluding duplicates), it could be done this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table translist3 as&lt;/P&gt;
&lt;P&gt;select distinct name3 from translist1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That creates a data set.&amp;nbsp; If you are looking to get a macro variable instead, it would look a bit different:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select distinct name3 into : translist3 separated by ' ' from translist1;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373235#M276181</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-05T12:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373238#M276182</link>
      <description>&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Hi, RW9:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;I use call symput based on your suggestion.&amp;nbsp; However I still got an error message.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; translist1; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test1; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;num=cats(compress(names,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'_'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'A'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;)); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;name3=cats(prxchange(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'s/\_\d+//'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,compress(names)));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; first.name3 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;call&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'tranlist3'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,name3);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Variable first.name3 is uninitialized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:38:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373238#M276182</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-05T12:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373244#M276183</link>
      <description>&lt;P&gt;Actually, looking further you can't do that as your creating names3. &amp;nbsp;What exactly is it your trying to achieve, post test data and required output. &amp;nbsp;Would be simpler than trying to code round each connotation you haven't presented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Missing the&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;  by name3;&lt;/PRE&gt;
&lt;P&gt;Line. &amp;nbsp;First and last is a flag created in the data based on the by group(s).&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 12:51:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373244#M276183</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-05T12:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373254#M276184</link>
      <description>&lt;P&gt;Still don't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: BY variables are not properly sorted on data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;Names=state_id_9 num=9 name3=state_id first.name3=1 LAST.name3=0 _ERROR_=1 _N_=4&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: There were 5 observations read from the data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.TRANSLIST1 may be incomplete. When this step was stopped there were 3&lt;/P&gt;&lt;P&gt;observations and 3 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK.TRANSLIST1 was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373254#M276184</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-05T13:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373258#M276185</link>
      <description>&lt;P&gt;Using by group processing requires that the dataset(s) are sorted by the variables named in the by statement. That's it.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:15:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373258#M276185</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-05T13:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373259#M276186</link>
      <description>&lt;P&gt;102 proc sort data=translist1; by name3; run;&lt;/P&gt;&lt;P&gt;NOTE: There were 5 observations read from the data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TRANSLIST1 has 5 observations and 3 variables.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;103 data translist1;&lt;/P&gt;&lt;P&gt;104 set translist1;&lt;/P&gt;&lt;P&gt;105 if first.name3 then call symput('tranlist3',name3);&lt;/P&gt;&lt;P&gt;106 run;&lt;/P&gt;&lt;P&gt;NOTE: Variable first.name3 is uninitialized.&lt;/P&gt;&lt;P&gt;NOTE: There were 5 observations read from the data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.TRANSLIST1 has 5 observations and 3 variables.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373259#M276186</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-05T13:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373262#M276187</link>
      <description>&lt;P&gt;Where is the by line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;103 data translist1;&lt;/P&gt;
&lt;P&gt;104 set translist1;&lt;/P&gt;
&lt;P&gt;105 if first.name3 then call symput('tranlist3',name3);&lt;/P&gt;
&lt;P&gt;106 run;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373262#M276187</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-07-05T13:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373266#M276188</link>
      <description>&lt;P&gt;129 data translist1;&lt;/P&gt;&lt;P&gt;130 set translist1;&lt;/P&gt;&lt;P&gt;131 if first.name3 then call symput('tranlist3',name3); by name3;&lt;/P&gt;&lt;P&gt;132 run;&lt;/P&gt;&lt;P&gt;ERROR: BY variables are not properly sorted on data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;Names=state_id_9 num=9 name3=state_id first.name3=1 LAST.name3=0 _ERROR_=1 _N_=4&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: There were 5 observations read from the data set WORK.TRANSLIST1.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.TRANSLIST1 may be incomplete. When this step was stopped there were 3&lt;/P&gt;&lt;P&gt;observations and 3 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK.TRANSLIST1 was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;real time 0.01 seconds&lt;/P&gt;&lt;P&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373266#M276188</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-05T13:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373267#M276189</link>
      <description>&lt;P&gt;SORT, THEN USE "BY" !!!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373267#M276189</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-05T13:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error for the first.variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373268#M276190</link>
      <description>&lt;P&gt;I got it, I need to proc sort name3 first.&amp;nbsp; Then use by name3 on the data step.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:31:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Syntax-error-for-the-first-variables/m-p/373268#M276190</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-05T13:31:58Z</dc:date>
    </item>
  </channel>
</rss>

