<?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: ERROR 22-322: Syntax error   I am new to SAS. Would someone help me with this error? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597996#M172386</link>
    <description>&lt;P&gt;Thank You Very Much!&lt;/P&gt;</description>
    <pubDate>Sun, 20 Oct 2019 19:28:20 GMT</pubDate>
    <dc:creator>jmanning29</dc:creator>
    <dc:date>2019-10-20T19:28:20Z</dc:date>
    <item>
      <title>ERROR 22-322: Syntax error   I am new to SAS. Would someone help me with this error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597994#M172384</link>
      <description>&lt;DIV&gt;&lt;DIV class="sasSource"&gt;I am new to SAS. Would someone help me with this error?&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;72&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasSource"&gt;73 proc print data=/** Import an XLSX file. **/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;74&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;75 PROC IMPORT DATAFILE="/folders/myfolders/U2_A1FBStockPrice.xlsx"&lt;/DIV&gt;&lt;DIV class="sasError"&gt;______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;22&lt;/DIV&gt;&lt;DIV class="sasError"&gt;76&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, BLANKLINE, CONTENTS, DATA, DOUBLE, GRANDTOTAL_LABEL,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;GRANDTOT_LABEL, GRAND_LABEL, GTOTAL_LABEL, GTOT_LABEL, HEADING, LABEL, N, NOOBS, NOSUMLABEL, OBS, ROUND, ROWS, SPLIT,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;STYLE, SUMLABEL, UNIFORM, WIDTH.&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 OUT=WORK.FB_StockPrice&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;77 DBMS=XLSX&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 REPLACE;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 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.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 /** Print the results. **/&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;82&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;83 PROC PRINT DATA=WORK.B_StockPrice; RUN;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: File WORK.B_STOCKPRICE.DATA does not exist.&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.00 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;84&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;85 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;97&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 19:09:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597994#M172384</guid>
      <dc:creator>jmanning29</dc:creator>
      <dc:date>2019-10-20T19:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error   I am new to SAS. Would someone help me with this error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597995#M172385</link>
      <description>&lt;P&gt;This is the cause of your problem. You've partly commented a line and what is left isn't a valid SAS statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=/** Import an XLSX file. **/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Either remove the line entirely or change it so the whole line is a comment:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/** proc print data= Import an XLSX file. **/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Oct 2019 19:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597995#M172385</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-20T19:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error   I am new to SAS. Would someone help me with this error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597996#M172386</link>
      <description>&lt;P&gt;Thank You Very Much!&lt;/P&gt;</description>
      <pubDate>Sun, 20 Oct 2019 19:28:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/597996#M172386</guid>
      <dc:creator>jmanning29</dc:creator>
      <dc:date>2019-10-20T19:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error   I am new to SAS. Would someone help me with this error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/598157#M172458</link>
      <description>&lt;P&gt;It helps to post log results or code into code box opened on the forum using the {I} icon to preserve formatting.&lt;/P&gt;
&lt;P&gt;Such as:&lt;/P&gt;
&lt;PRE&gt;14   proc print data=/** Import an XLSX file. **/
15
16   PROC IMPORT DATAFILE="/folders/myfolders/U2_A1FBStockPrice.xlsx"
          ------
          22
          76
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 76-322: Syntax error, statement will be ignored.
17      OUT=WORK.FB_StockPrice
18      DBMS=XLSX
19      REPLACE;
20   RUN;

&lt;/PRE&gt;
&lt;P&gt;Now it is possible to see that the diagnostics indicate the proximate error is the word IMPORT. Which is not an option for PROC PRINT which is what the "expected" elements are: Proc Print options. The code was attempting to Print the dataset Proc due to the reasons pointed out by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 15:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-I-am-new-to-SAS-Would-someone-help-me/m-p/598157#M172458</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-10-21T15:12:49Z</dc:date>
    </item>
  </channel>
</rss>

