<?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: The symbol is not recognized and will be ignored. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416569#M102289</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _NULL_;
SET TEMP.LATEST_BAL_DATE;
DT3=PUT(MAX_BAL_DATE,DATE9.);
CALL SYMPUT("BALDT_DATE9",DT3);
RUN;

%LET BALDT_DATE9=%STR(%')&amp;amp;BALDT_DATE9.%STR(%'D);
%PUT &amp;amp;BALDT_DATE9.;

PROC SQL;
CREATE TABLE TEST_TEMP AS 
SELECT * FROM 
SASD.CBOL_DEP_APPLICATIONS_20171122
WHERE SESSION_DATE_AT_APPSTART &amp;lt;= &amp;amp;BALDT_DATE9.
;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Log:-&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;21 DATA _NULL_;&lt;BR /&gt;22 SET TEMP.LATEST_BAL_DATE;&lt;BR /&gt;23 DT3=PUT(MAX_BAL_DATE,DATE9.);&lt;BR /&gt;24 CALL SYMPUT("BALDT_DATE9",DT3);&lt;BR /&gt;25 RUN;&lt;/P&gt;
&lt;P&gt;NOTE: There were 1 observations read from the data set TEMP.LATEST_BAL_DATE.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 0.58 seconds&lt;BR /&gt; user cpu time 0.01 seconds&lt;BR /&gt; system cpu time 0.00 seconds&lt;BR /&gt; memory 536.00k&lt;BR /&gt; OS Memory 18336.00k&lt;BR /&gt; Timestamp 11/27/2017 11:01:22 PM&lt;BR /&gt; Step Count 67 Switch Count 36&lt;BR /&gt; Page Faults 0&lt;BR /&gt; Page Reclaims 92&lt;BR /&gt; Page Swaps 0&lt;BR /&gt; Voluntary Context Switches 124&lt;BR /&gt; Involuntary Context Switches 0&lt;BR /&gt; Block Input Operations 0&lt;BR /&gt; Block Output Operations 0&lt;/P&gt;
&lt;P&gt;26 &lt;BR /&gt;27 %LET BALDT_DATE9=%STR(%')&amp;amp;BALDT_DATE9.%STR(%'D);&lt;BR /&gt;SYMBOLGEN: Macro variable BALDT_DATE9 resolves to 22NOV2017&lt;BR /&gt;28 %PUT &amp;amp;BALDT_DATE9.;&lt;BR /&gt;SYMBOLGEN: Macro variable BALDT_DATE9 resolves to '22NOV2017'D&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;BR /&gt;'22NOV2017'D&lt;BR /&gt;29 &lt;BR /&gt;30 PROC SQL;&lt;BR /&gt;31 CREATE TABLE TEST_TEMP AS&lt;BR /&gt;32 SELECT * FROM&lt;BR /&gt;2 The SAS System 21:18 Monday, November 27, 2017&lt;/P&gt;
&lt;P&gt;33 SASD.CBOL_DEP_APPLICATIONS_20171122&lt;BR /&gt;34 WHERE SESSION_DATE_AT_APPSTART &amp;lt;= &amp;amp;BALDT_DATE9.&lt;BR /&gt;SYMBOLGEN: Macro variable BALDT_DATE9 resolves to '22NOV2017'D&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;BR /&gt;35 ;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;NOTE: Line generated by the macro variable "BALDT_DATE9".&lt;BR /&gt;35 '22NOV2017'D&lt;BR /&gt; _&lt;BR /&gt; 22&lt;BR /&gt; _&lt;BR /&gt; 200&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, (, +, -, ALL, ANY, BTRIM, CALCULATED, CASE, INPUT, PUT, SELECT, SOME, SUBSTRING, TRANSLATE, USER.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2017 05:03:53 GMT</pubDate>
    <dc:creator>dhana</dc:creator>
    <dc:date>2017-11-28T05:03:53Z</dc:date>
    <item>
      <title>The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416562#M102284</link>
      <description>&lt;P&gt;&lt;BR /&gt;I have the following piece of code. &lt;BR /&gt; &lt;BR /&gt;%put &amp;amp;BALDT_DATE9.; &lt;BR /&gt; &lt;BR /&gt;BALDT_DATE9 resolves to '22NOV2017'D&lt;BR /&gt; &lt;BR /&gt;proc sql;&lt;BR /&gt;create table test_temp as &lt;BR /&gt;select * from sasd.basedata&lt;BR /&gt;where SESSION_DATE &amp;lt;= &amp;amp;BALDT_DATE9.&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;BR /&gt; &lt;BR /&gt;I am trying to subset the base dataset using the date condition. But for some reason I am keep getting the following error message. &lt;BR /&gt; &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, (, +, -, ALL, ANY, BTRIM, CALCULATED, CASE, INPUT, PUT, SELECT, SOME, SUBSTRING, TRANSLATE, USER.&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt; &lt;BR /&gt;Can some help ?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 04:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416562#M102284</guid>
      <dc:creator>dhana</dc:creator>
      <dc:date>2017-11-28T04:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416567#M102287</link>
      <description>&lt;P&gt;Please post your exact code and log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18151"&gt;@dhana&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;I have the following piece of code. &lt;BR /&gt; &lt;BR /&gt;%put &amp;amp;BALDT_DATE9.; &lt;BR /&gt; &lt;BR /&gt;BALDT_DATE9 resolves to '22NOV2017'D&lt;BR /&gt; &lt;BR /&gt;proc sql;&lt;BR /&gt;create table test_temp as &lt;BR /&gt;select * from sasd.basedata&lt;BR /&gt;where SESSION_DATE &amp;lt;= &amp;amp;BALDT_DATE9.&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;BR /&gt; &lt;BR /&gt;I am trying to subset the base dataset using the date condition. But for some reason I am keep getting the following error message. &lt;BR /&gt; &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, (, +, -, ALL, ANY, BTRIM, CALCULATED, CASE, INPUT, PUT, SELECT, SOME, SUBSTRING, TRANSLATE, USER.&lt;BR /&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;BR /&gt; &lt;BR /&gt;Can some help ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 04:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416567#M102287</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-28T04:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416569#M102289</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _NULL_;
SET TEMP.LATEST_BAL_DATE;
DT3=PUT(MAX_BAL_DATE,DATE9.);
CALL SYMPUT("BALDT_DATE9",DT3);
RUN;

%LET BALDT_DATE9=%STR(%')&amp;amp;BALDT_DATE9.%STR(%'D);
%PUT &amp;amp;BALDT_DATE9.;

PROC SQL;
CREATE TABLE TEST_TEMP AS 
SELECT * FROM 
SASD.CBOL_DEP_APPLICATIONS_20171122
WHERE SESSION_DATE_AT_APPSTART &amp;lt;= &amp;amp;BALDT_DATE9.
;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Log:-&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;21 DATA _NULL_;&lt;BR /&gt;22 SET TEMP.LATEST_BAL_DATE;&lt;BR /&gt;23 DT3=PUT(MAX_BAL_DATE,DATE9.);&lt;BR /&gt;24 CALL SYMPUT("BALDT_DATE9",DT3);&lt;BR /&gt;25 RUN;&lt;/P&gt;
&lt;P&gt;NOTE: There were 1 observations read from the data set TEMP.LATEST_BAL_DATE.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt; real time 0.58 seconds&lt;BR /&gt; user cpu time 0.01 seconds&lt;BR /&gt; system cpu time 0.00 seconds&lt;BR /&gt; memory 536.00k&lt;BR /&gt; OS Memory 18336.00k&lt;BR /&gt; Timestamp 11/27/2017 11:01:22 PM&lt;BR /&gt; Step Count 67 Switch Count 36&lt;BR /&gt; Page Faults 0&lt;BR /&gt; Page Reclaims 92&lt;BR /&gt; Page Swaps 0&lt;BR /&gt; Voluntary Context Switches 124&lt;BR /&gt; Involuntary Context Switches 0&lt;BR /&gt; Block Input Operations 0&lt;BR /&gt; Block Output Operations 0&lt;/P&gt;
&lt;P&gt;26 &lt;BR /&gt;27 %LET BALDT_DATE9=%STR(%')&amp;amp;BALDT_DATE9.%STR(%'D);&lt;BR /&gt;SYMBOLGEN: Macro variable BALDT_DATE9 resolves to 22NOV2017&lt;BR /&gt;28 %PUT &amp;amp;BALDT_DATE9.;&lt;BR /&gt;SYMBOLGEN: Macro variable BALDT_DATE9 resolves to '22NOV2017'D&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;BR /&gt;'22NOV2017'D&lt;BR /&gt;29 &lt;BR /&gt;30 PROC SQL;&lt;BR /&gt;31 CREATE TABLE TEST_TEMP AS&lt;BR /&gt;32 SELECT * FROM&lt;BR /&gt;2 The SAS System 21:18 Monday, November 27, 2017&lt;/P&gt;
&lt;P&gt;33 SASD.CBOL_DEP_APPLICATIONS_20171122&lt;BR /&gt;34 WHERE SESSION_DATE_AT_APPSTART &amp;lt;= &amp;amp;BALDT_DATE9.&lt;BR /&gt;SYMBOLGEN: Macro variable BALDT_DATE9 resolves to '22NOV2017'D&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;BR /&gt;35 ;&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;NOTE: Line generated by the macro variable "BALDT_DATE9".&lt;BR /&gt;35 '22NOV2017'D&lt;BR /&gt; _&lt;BR /&gt; 22&lt;BR /&gt; _&lt;BR /&gt; 200&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, (, +, -, ALL, ANY, BTRIM, CALCULATED, CASE, INPUT, PUT, SELECT, SOME, SUBSTRING, TRANSLATE, USER.&lt;/P&gt;
&lt;P&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 05:03:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416569#M102289</guid>
      <dc:creator>dhana</dc:creator>
      <dc:date>2017-11-28T05:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416572#M102291</link>
      <description>&lt;P&gt;Rather than add quotes to the macro variable use it in the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Bal_date &amp;lt;= “&amp;amp;baldt_date9.”d;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or use the number and don’t use a format when you create the macro variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, use CALL SYMPUTX&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 05:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416572#M102291</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-28T05:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416574#M102293</link>
      <description>&lt;P&gt;If you post a log use the Insert Code button so that the forum editor doesn't messup the spacing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks to me like you have added macro quoting to the value of macro variable.&amp;nbsp; It is confusing SAS. Remove it.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;WHERE SESSION_DATE_AT_APPSTART &amp;lt;= %unquote(&amp;amp;BALDT_DATE9.)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Why did you add the macro quoting? It is not needed.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET BALDT_DATE9="&amp;amp;BALDT_DATE9."d;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Or just use the actual number of days.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;CALL SYMPUTX("BALDT",MAX_BAL_DATE);
...
WHERE SESSION_DATE_AT_APPSTART &amp;lt;= &amp;amp;BALDT&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 05:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416574#M102293</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-28T05:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416577#M102295</link>
      <description>&lt;P&gt;You can solve the problem using your definition of BALDT_DATE9 by changing the where-clause to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="4"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="4"&gt; SESSION_DATE_AT_APPSTART &amp;lt;= &lt;/FONT&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="4"&gt;%unquote&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="4"&gt;(&amp;amp;BALDT_DATE9)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But as a general rule I would not bother with the %STR(%') and %unquote macro functions. Instead leave BALDT_DATE9 without the quotes (i.e&amp;nbsp; BALDT_DATE9=22NOV2017).&amp;nbsp; Then whenever you want to use it as a date constant, just use "&amp;amp;BALDT_DATE9"D, as in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="SAS Monospace" size="4"&gt;WHERE&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="4"&gt; SESSION_DATE_AT_APPSTART &amp;lt;= "&lt;/FONT&gt;&lt;FONT face="SAS Monospace" size="4"&gt;&amp;amp;BALDT_DATE9"D&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This takes advantage of the fact that double quotes do not prevent resolution of macro expressions inside the quotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="SAS Monospace" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 06:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416577#M102295</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-11-28T06:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: The symbol is not recognized and will be ignored.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416585#M102300</link>
      <description>&lt;P&gt;Maim 28: macro variables need no formats:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA _NULL_;
DT3=PUT(today(),best.);
CALL SYMPUT("BALDT_DATE9",DT3);
RUN;

%PUT &amp;amp;BALDT_DATE9.;

data test;
SESSION_DATE_AT_APPSTART = today() -1;
run;

PROC SQL;
CREATE TABLE TEST_TEMP AS 
SELECT * FROM 
test
WHERE SESSION_DATE_AT_APPSTART &amp;lt;= &amp;amp;BALDT_DATE9.
;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For comparisons, raw values are best.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 07:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-symbol-is-not-recognized-and-will-be-ignored/m-p/416585#M102300</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-11-28T07:30:58Z</dc:date>
    </item>
  </channel>
</rss>

