<?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, expecting one of the following: in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240800#M44495</link>
    <description>&lt;P&gt;method and covtest &amp;nbsp;options are for proc mixed and proc glimmix. REML stands for Restricted maximum likelihood (a method for paramter estimates) and covtest for covariace test.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Dec 2015 14:18:42 GMT</pubDate>
    <dc:creator>SAS_inquisitive</dc:creator>
    <dc:date>2015-12-24T14:18:42Z</dc:date>
    <item>
      <title>ERROR 22-322: Syntax error, expecting one of the following:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240777#M44483</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Everyone&lt;/P&gt;&lt;P&gt;I ran the folllowing code and it generated syntax error, which should be missing a symbol. However I have double check the code and I can not figure out which is missing? Please provide me some clues and any help will be much appreciated. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#############&lt;/P&gt;&lt;P&gt;The following is the code in editor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA Shattering;&lt;BR /&gt;INFILE "C:\PHD\GWAS\Shattering.csv" DELIMITER="," FIRSTOBS=2;&lt;BR /&gt;INPUT PI $ code $ location $ shatearly shatlate;&lt;BR /&gt;&lt;BR /&gt;proc glm data=Shattering method=REML covtest;&lt;BR /&gt;class code location;&lt;BR /&gt;model shatearly = code location;&lt;BR /&gt;lsmeans code;&lt;BR /&gt;&lt;BR /&gt;proc glm data=Shattering method=REML covtest;&lt;BR /&gt;class code location;&lt;BR /&gt;model shatlate = code location;&lt;BR /&gt;lsmeans code;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;###################&lt;/P&gt;&lt;P&gt;The following is the error in log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;127 proc glm data=Shattering method=REML covtest;&lt;BR /&gt;------&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, DATA, MANOVA,&lt;BR /&gt;MULTIPASS, NAMELEN, NOPRINT, ORDER, OUTSTAT, PLOTS.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;128 class code location;&lt;BR /&gt;129 model shatearly = code location;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2015 08:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240777#M44483</guid>
      <dc:creator>grace</dc:creator>
      <dc:date>2015-12-24T08:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error, expecting one of the following:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240783#M44486</link>
      <description>&lt;P&gt;Well, I can't really tell which of the GLM's this is refering too, why do you have two of the exact same code? &amp;nbsp;Also note that it would be advisable to follow some sort of good programming practice, your code is unecessarily hard to read, for example:&lt;/P&gt;
&lt;PRE&gt;data Shattering;
  infile "C:\PHD\GWAS\Shattering.csv" delimiter="," firstobs=2;
  input pi $ code $ location $ shatearly shatlate;
run;

proc glm data=shattering;
  class code location;
  model shatearly = code location;
  lsmeans code;
quit;

proc glm data=shattering;
  class code location;
  model shatlate = code location;
  lsmeans code;
quit;&lt;/PRE&gt;
&lt;P&gt;However, there is also some problem with your proc glm call, I find nowhere an option method=, which is why your getting this error.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#glm_toc.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#glm_toc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Remove the extra options on the gl as above and the code works.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2015 10:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240783#M44486</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-12-24T10:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error, expecting one of the following:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240784#M44487</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;127 proc glm data=Shattering method=REML covtest;&lt;BR /&gt;------&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, DATA, MANOVA,&lt;BR /&gt;MULTIPASS, NAMELEN, NOPRINT, ORDER, OUTSTAT, PLOTS.&lt;BR /&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;BR /&gt;128 class code location;&lt;BR /&gt;129 model shatearly = code location;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;NOTE: The previous statement has been deleted.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As stated in the log,&amp;nbsp;&lt;SPAN&gt;covtest is not valid option statment for PROC GLM. &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_glm_sect008.htm" target="_self"&gt;PROC GLM Statement&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also method is not valid too.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2015 10:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240784#M44487</guid>
      <dc:creator>mohamed_zaki</dc:creator>
      <dc:date>2015-12-24T10:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322: Syntax error, expecting one of the following:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240800#M44495</link>
      <description>&lt;P&gt;method and covtest &amp;nbsp;options are for proc mixed and proc glimmix. REML stands for Restricted maximum likelihood (a method for paramter estimates) and covtest for covariace test.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2015 14:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-Syntax-error-expecting-one-of-the-following/m-p/240800#M44495</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2015-12-24T14:18:42Z</dc:date>
    </item>
  </channel>
</rss>

