<?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: SAS ERROR in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697368#M25391</link>
    <description>&lt;P&gt;Here's the most important link for your future SAS life:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=pgmsashome&amp;amp;docsetTarget=home.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;SAS 9.4 Programming Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There you can find (among a galaxy of other things) all procedures, and the statements that are valid in each.&lt;/P&gt;
&lt;P&gt;Some DATA step statements (like WHERE) can also be used in PROC steps, but SET is not among them. SET is data step only. And not necessary here, as the input dataset for PROC PRINT is already defined by the DATA= option.&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2020 19:56:52 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-11-07T19:56:52Z</dc:date>
    <item>
      <title>SAS ERROR</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697363#M25389</link>
      <description>&lt;P&gt;I am new to&amp;nbsp; SAS and learning with videos.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I written this code but SAS returns a mistake. what is the problem here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE&lt;/P&gt;&lt;P&gt;proc print data = sashelp.heart;&lt;BR /&gt;set sashelp.heart;&lt;BR /&gt;where chol Status = "High";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log message&lt;/P&gt;&lt;DIV class="sasError"&gt;ERROR: Syntax error while parsing WHERE clause.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, (, *, **, +, -, /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, AND, EQ, GE, GT, LE,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;LT, NE, OR, ^=, |, ||, ~=.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;76 run;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.01 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;90&lt;/DIV&gt;</description>
      <pubDate>Sat, 07 Nov 2020 19:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697363#M25389</guid>
      <dc:creator>Moses_Lutaaya</dc:creator>
      <dc:date>2020-11-07T19:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697366#M25390</link>
      <description>&lt;P&gt;You are mixing two tools:&lt;/P&gt;
&lt;P&gt;1) Data Step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data &amp;lt;output_dat_set&amp;gt;;
   set &amp;lt;input_data_set&amp;gt;;
         /* any more sas statements and functions */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;2) Executing a procedure like PROC PRINT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=&amp;lt;input_data_set&amp;gt; &amp;lt;more options&amp;gt;;
   var &amp;lt;list order of variables to print &amp;gt;;
   /* more statement for proc print&amp;gt;;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;3) Look for sas documentation of each procedure or statement keyword or function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Luck.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 19:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697366#M25390</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-11-07T19:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697368#M25391</link>
      <description>&lt;P&gt;Here's the most important link for your future SAS life:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=pgmsashome&amp;amp;docsetTarget=home.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;SAS 9.4 Programming Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There you can find (among a galaxy of other things) all procedures, and the statements that are valid in each.&lt;/P&gt;
&lt;P&gt;Some DATA step statements (like WHERE) can also be used in PROC steps, but SET is not among them. SET is data step only. And not necessary here, as the input dataset for PROC PRINT is already defined by the DATA= option.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 19:56:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697368#M25391</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-07T19:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS ERROR</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697386#M25393</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; In addition to the other excellent suggestions, my suggestion is that you run a PROC CONTENTS to make sure you are spelling the variable names correctly when you use them. For example:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1604798935231.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51498i6F0E8595C4ABF819/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1604798935231.png" alt="Cynthia_sas_0-1604798935231.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Notice that variables like Weight_Status and Chol_Status have underscores in the variable name (not spaces).&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 01:29:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-ERROR/m-p/697386#M25393</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-11-08T01:29:49Z</dc:date>
    </item>
  </channel>
</rss>

