<?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: SAS Macro unidentified error (ERROR: Invalid symbolic variable name ,.) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740860#M231506</link>
    <description>&lt;P&gt;Thank you Reeza!&lt;BR /&gt;&lt;BR /&gt;I haven't even noticed that there were commas between the variables. I have copied the from an email and pasted into the code.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 16:46:24 GMT</pubDate>
    <dc:creator>mlino</dc:creator>
    <dc:date>2021-05-12T16:46:24Z</dc:date>
    <item>
      <title>SAS Macro unidentified error (ERROR: Invalid symbolic variable name ,.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740853#M231499</link>
      <description>&lt;P&gt;I'm trying to identify an error that doesn't prevent a table be created but is calling the attention of our error tracking script. So, every time this error is logged, I get a message about it sent by our error tracking routine.&lt;BR /&gt;Here is the straightforward code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro createDec(var);

%local _fse1_dec10, _fse1_dec20, _fse1_dec30, _fse1_dec40, _fse1_dec50, _fse1_dec60, _fse1_dec70, _fse1_dec80, _fse1_dec90;

data tbl_out;
	 retain year month mvt cd_cust pub ebb fse_1 fse_2;
	 merge tbl_tmp0001(where=(pub = &amp;amp;var and mvt = &amp;amp;_movAnt and fse_1 ne .) in=a keep= year month mvt cd_cust ebb pub fse rename= fse=fse_1)
		   tbl_tmp0001(where=(mvt = &amp;amp;_movAtl) in=b keep= mvt cd_cust fse rename= fse=fse_2);
	by cd_cust;
	if a;
run;		

proc univariate noprint data = tbl_out;
  var fse_1;
  output out=Pctls_t_3 pctlpts=10 to 90 by 10 pctlpre=decil_;
run;

proc sql noprint;
	select	*
			into:_fse1_dec10, :_fse1_dec20, :_fse1_dec30, :_fse1_dec40, :_fse1_dec50,
				:_fse1_dec60, :_fse1_dec70, :_fse1_dec80, :_fse1_dec90
   from pctls_t_3;
quit;

%mend;

%createDec("0_1");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;We have two global variables called _movAtl and _movAnt that represents the year and month, e.g., 202010, 202101, etc. Every time I run the script, I got the following error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;53         %createDec("0_1");
2                                                          The SAS System                              07:36 Wednesday, May 12, 2021

ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.
ERROR: Invalid symbolic variable name ,.

SYMBOLGEN:  Macro variable VAR resolves to "0_1"
SYMBOLGEN:  Macro variable _MOVANT resolves to 202010
SYMBOLGEN:  Macro variable _MOVATL resolves to 202001

NOTE: There were 10465412 observations read from the data set WORK.TBL_TMP0001.
      WHERE (pub='0_1') and (mvt=202010) and (fse_1 not = .);
NOTE: There were 0 observations read from the data set WORK.TBL_TMP0001.
      WHERE mvt=202001;
NOTE: The data set WORK.TBL_OUT has 10465412 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           6.00 seconds
      cpu time            1.82 seconds
      
NOTE: The data set WORK.PCTLS_T_3 has 1 observations and 9 variables.
NOTE: PROCEDURE UNIVARIATE used (Total process time):
      real time           35.52 seconds
      cpu time            10.90 seconds

NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I was unable to determine what's causing that error listed in the running log, but the table was created. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marcio Souza&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 16:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740853#M231499</guid>
      <dc:creator>mlino</dc:creator>
      <dc:date>2021-05-12T16:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro unidentified error (ERROR: Invalid symbolic variable name ,.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740858#M231504</link>
      <description>Remove the commas in the %LOCAL statement between the variables. I count 8 errors and 8 comma's so that should fix your issue.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 May 2021 16:38:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740858#M231504</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-12T16:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro unidentified error (ERROR: Invalid symbolic variable name ,.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740859#M231505</link>
      <description>&lt;P&gt;You cannot include a comma in macro variable (aka symbol) name.&lt;/P&gt;
&lt;P&gt;You tried to make a macro variable named:&amp;nbsp;&lt;FONT face="courier new,courier" size="5"&gt;_fse1_dec10,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 16:44:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740859#M231505</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-12T16:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro unidentified error (ERROR: Invalid symbolic variable name ,.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740860#M231506</link>
      <description>&lt;P&gt;Thank you Reeza!&lt;BR /&gt;&lt;BR /&gt;I haven't even noticed that there were commas between the variables. I have copied the from an email and pasted into the code.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 16:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740860#M231506</guid>
      <dc:creator>mlino</dc:creator>
      <dc:date>2021-05-12T16:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro unidentified error (ERROR: Invalid symbolic variable name ,.)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740864#M231509</link>
      <description>Thank you Tom! Yeap that was the problem as I stated above.</description>
      <pubDate>Wed, 12 May 2021 16:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro-unidentified-error-ERROR-Invalid-symbolic-variable/m-p/740864#M231509</guid>
      <dc:creator>mlino</dc:creator>
      <dc:date>2021-05-12T16:55:07Z</dc:date>
    </item>
  </channel>
</rss>

