<?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 Why am I getting &amp;quot;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted..etc&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672429#M202104</link>
    <description>&lt;P&gt;I am not sure why I am getting this error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input start_date :date11.;

a=' 23:59:59 ';
b=put(start_date, yymmddd10.);
result=cat(b,a);
put result $char.;

datalines;
31MAY2020
;
run;

data _null_;
valueStmt=cats('write values "RequestTime" "',&amp;amp;result,'";');
put valueStmt;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;24 data have;&lt;BR /&gt;25 input start_date :date11.;&lt;BR /&gt;26&lt;BR /&gt;27 a=' 23:59:59 ';&lt;BR /&gt;28 b=put(start_date, yymmddd10.);&lt;BR /&gt;29 result=cat(b,a);&lt;BR /&gt;30 put result $char.;&lt;BR /&gt;31&lt;BR /&gt;32 datalines;&lt;/P&gt;&lt;P&gt;2020-05-31 23:59:59&lt;BR /&gt;NOTE: The data set WORK.HAVE has 1 observations and 4 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;BR /&gt;&lt;BR /&gt;34 ;&lt;/P&gt;&lt;P&gt;35 run;&lt;BR /&gt;36&lt;BR /&gt;37 data _null_;&lt;BR /&gt;38 set have;&lt;BR /&gt;39 valueStmt=cats('write values "RequestTime" "',&amp;amp;result,'";');&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;WARNING: Apparent symbolic reference RESULT not resolved.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,&lt;BR /&gt;a missing value, INPUT, PUT.&lt;/P&gt;&lt;P&gt;40 put valueStmt;&lt;BR /&gt;41 run;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;39:48&lt;BR /&gt;2 The SAS System 08:31 Tuesday, July 21, 2020&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jul 2020 00:52:27 GMT</pubDate>
    <dc:creator>niejung</dc:creator>
    <dc:date>2020-07-27T00:52:27Z</dc:date>
    <item>
      <title>Why am I getting "ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted..etc"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672429#M202104</link>
      <description>&lt;P&gt;I am not sure why I am getting this error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input start_date :date11.;

a=' 23:59:59 ';
b=put(start_date, yymmddd10.);
result=cat(b,a);
put result $char.;

datalines;
31MAY2020
;
run;

data _null_;
valueStmt=cats('write values "RequestTime" "',&amp;amp;result,'";');
put valueStmt;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;24 data have;&lt;BR /&gt;25 input start_date :date11.;&lt;BR /&gt;26&lt;BR /&gt;27 a=' 23:59:59 ';&lt;BR /&gt;28 b=put(start_date, yymmddd10.);&lt;BR /&gt;29 result=cat(b,a);&lt;BR /&gt;30 put result $char.;&lt;BR /&gt;31&lt;BR /&gt;32 datalines;&lt;/P&gt;&lt;P&gt;2020-05-31 23:59:59&lt;BR /&gt;NOTE: The data set WORK.HAVE has 1 observations and 4 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;BR /&gt;&lt;BR /&gt;34 ;&lt;/P&gt;&lt;P&gt;35 run;&lt;BR /&gt;36&lt;BR /&gt;37 data _null_;&lt;BR /&gt;38 set have;&lt;BR /&gt;39 valueStmt=cats('write values "RequestTime" "',&amp;amp;result,'";');&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;WARNING: Apparent symbolic reference RESULT not resolved.&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,&lt;BR /&gt;a missing value, INPUT, PUT.&lt;/P&gt;&lt;P&gt;40 put valueStmt;&lt;BR /&gt;41 run;&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;BR /&gt;39:48&lt;BR /&gt;2 The SAS System 08:31 Tuesday, July 21, 2020&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 00:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672429#M202104</guid>
      <dc:creator>niejung</dc:creator>
      <dc:date>2020-07-27T00:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "ERROR 22-322: Syntax error, expecting one of the following: a name, a quo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672430#M202105</link>
      <description>&lt;P&gt;Macro variable &amp;amp;result has never been assigned a value. So the SAS code doesn't know what to do when it sees &amp;amp;result.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Jul 2020 01:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672430#M202105</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-27T01:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting "ERROR 22-322: Syntax error, expecting one of the following: a name, a quo</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672432#M202107</link>
      <description>&lt;P&gt;I added this line code on the top and worked.&amp;nbsp; Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let result2=put(%UNQUOTE(%STR(%'&amp;amp;result1%')),20.);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jul 2020 01:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-am-I-getting-quot-ERROR-22-322-Syntax-error-expecting-one-of/m-p/672432#M202107</guid>
      <dc:creator>niejung</dc:creator>
      <dc:date>2020-07-27T01:46:08Z</dc:date>
    </item>
  </channel>
</rss>

