<?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: Can someone help me in Finding the syntax mistakes in my code in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839773#M36380</link>
    <description>&lt;P&gt;Please post your SAS log. That will tell you where you have syntax errors.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 19:39:08 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-10-20T19:39:08Z</dc:date>
    <item>
      <title>Can someone help me in Finding the syntax mistakes in my code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839771#M36379</link>
      <description>&lt;P&gt;Libname mylib 'C:\STA575\SASData';&lt;BR /&gt;options nodate numberno;&lt;BR /&gt;proc print data=sashelp.prdsal2 nobs headers;&lt;BR /&gt;where country=Mexico;&lt;BR /&gt;var country year predict actual;&lt;BR /&gt;by country;&lt;BR /&gt;sum predict actual;&lt;BR /&gt;label predict='Predicted Sales' actual='Actual Sales';&lt;BR /&gt;title 'Predicted versus Actual Sales'&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 19:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839771#M36379</guid>
      <dc:creator>kumaabi</dc:creator>
      <dc:date>2022-10-20T19:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me in Finding the syntax mistakes in my code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839773#M36380</link>
      <description>&lt;P&gt;Please post your SAS log. That will tell you where you have syntax errors.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 19:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839773#M36380</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-10-20T19:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me in Finding the syntax mistakes in my code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839774#M36381</link>
      <description>&lt;P&gt;One error is probably here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where country=Mexico;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which should say&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where country='Mexico';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I don't think there is a NOBS or a HEADERS option in PROC PRINT.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;There may be other errors. From now on, when you get errors in your code, you need to show us the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this DATA step or PROC. You need to copy the log as text and paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 19:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839774#M36381</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-10-20T19:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me in Finding the syntax mistakes in my code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839775#M36382</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Libname mylib 'C:\STA575\SASData';
options nodate &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;numberno&lt;/STRONG&gt;&lt;/FONT&gt;;
proc print data=sashelp.prdsal2 &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;nobs&lt;/STRONG&gt; &lt;STRONG&gt;headers&lt;/STRONG&gt;&lt;/FONT&gt;;
where country=&lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;Mexico&lt;/STRONG&gt;&lt;/FONT&gt;;
var country year predict actual;
by country;
sum predict actual;
label predict='Predicted Sales' actual='Actual Sales';
title 'Predicted versus Actual Sales'
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should get you started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Relevant links:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n17dcq1elcvpvkn1pkecj41cva6j.htm#n01z40i5i01yxwn1gqq89vsuli8x" target="_self"&gt;PROC PRINT documentation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lesysoptsref/p1tmgku1vq7pwqn1iqioeflxgec1.htm#p1tmgku1vq7pwqn1iqioeflxgec1-p0d0jd0zl1wbrtn1k6zaai1d8ckh" target="_self"&gt;SAS Options list&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 19:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839775#M36382</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-20T19:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me in Finding the syntax mistakes in my code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839776#M36383</link>
      <description>&lt;P&gt;Try to run it and look at the error messages (if any) that SAS generates.&lt;/P&gt;
&lt;P&gt;Click SPOILER to expand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;1659  options nodate numberno;
                     --------
                     13
1660  proc print data=sashelp.prdsal2 nobs headers;
                                      ---- -------
                                      1    22
                                           202
ERROR 13-12: Unrecognized SAS option name NUMBERNO.
WARNING 1-322: Assuming the symbol NOOBS was misspelled as nobs.
ERROR 22-322: Syntax error, expecting one of the following: ;, BLANKLINE, CONTENTS, DATA, DOUBLE, GRANDTOTAL_LABEL, GRANDTOT_LABEL,
              GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL, HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT, STYLE,
              SUMLABEL, UNIFORM, WIDTH.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
1661  where country=Mexico;
ERROR: Variable Mexico is not on file SASHELP.PRDSAL2.
1662  var country year predict actual;
1663  by country;
1664  sum predict actual;
1665  label predict='Predicted Sales' actual='Actual Sales';
1666  title 'Predicted versus Actual Sales'
1667  run;
WARNING: The TITLE statement is ambiguous due to invalid options or unquoted text.
1668
1669  run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;
&lt;P&gt;I don't think there is an option named NUMBERNO.&amp;nbsp; There is an option named NUMBER which you can turn off by using NONUMBER (or NUMBER=0).&lt;BR /&gt;&lt;BR /&gt;PROC PRINT does not have a NOBS option. Did you mean NOOBS?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;PROC PRINT does not have a HEADERS option. Did you mean LABEL? Or perhaps SPLIT?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Does the dataset have a variable named COUNTRY and one another variable named MEXICO?&amp;nbsp; And if it does what does it mean when they both contain the same value?&amp;nbsp; Perhaps you wanted to instead check if the variable named COUNTRY as equal to the text string MEXICO?&amp;nbsp; If so then you need to&amp;nbsp; enclose the text literal in quotes so SAS knows it is not the name of a variable.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Do you actually want to the string run as part of the TITLE?&amp;nbsp; If so then I would remove the line break and add an actual RUN statement to finish the PROC step.&amp;nbsp; If not then make sure to end the TITLE statement with a semicolon.&lt;/P&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 19:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-someone-help-me-in-Finding-the-syntax-mistakes-in-my-code/m-p/839776#M36383</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-20T19:47:17Z</dc:date>
    </item>
  </channel>
</rss>

