<?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 says macro variable is a character but I don't see how that is possible in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630176#M186519</link>
    <description>&lt;P&gt;It's a good thought, but there are 10 observations. Never more than like, 50 under any circumstances.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Mar 2020 17:45:57 GMT</pubDate>
    <dc:creator>logistics_00</dc:creator>
    <dc:date>2020-03-06T17:45:57Z</dc:date>
    <item>
      <title>error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630139#M186503</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run this program in the&amp;nbsp; past with no issues, but suddenly I'm getting errors like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand&lt;BR /&gt;is required. The condition was: &amp;amp;mails&lt;BR /&gt;ERROR: The %TO value of the %DO I loop is invalid.&lt;BR /&gt;ERROR: The macro EASYBIRD will stop executing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if you look at my code, the macro variable &amp;amp;mails is a count distinct of another field, so how can it not be a number? I feel like I'm going a little bit nuts.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%libdb;
%liblr;
%libee;
/*%pfile(P3 easybird);*/



proc sql;


create table easybird as
select distinct

b.source,
strip(put(b.l_nbr,10.)) as listing_id,
b.ls_d format = MMDDYYs. as close_date,
today() - b.ls_d as close_days,/*how many days since the listing closed*/
b.cc_name,
b.job_title,
b.cm as cm_name,
e.email_address as cm_email_address,
b.am as am_name,
g.director as director_name,
h.email as director_email,
f.email as am_email,
case when b.source = 'US' 
then 'http://compass.oxfordcorp.com/#listing/'||strip(put(b.jo_url_id, 10.)) 
else 'http://compass.eu.oxfordcorp.com/#listing/'||strip(put(b.jo_url_id,10.)) end as url /*creates url field for body of email*/
	


from lr.jos b
inner join stg.cm_email e
on b.cm_id = e.cm_id
and e.is_primary &amp;lt;&amp;gt; 0
inner join ee.active_empl f
on b.am_eid = f.eid
inner join ee.dept_org_map g
on f.dept_id = g.dept_id 
and scope = 'BD'
and cur = 1
inner join ee.active_empl h
on g.director_eid = h.eid 


where today()-b.ls_d in (10,30) /*includes in only listings that closed 10 or 30 days ago*/
and b.comp_fill = 1 /*includes in only comp fills*/
and b.open is null


order by b.ls_d desc
			
;quit;


%macro easybird;
	proc sql noprint;
		/*counts the number of listings to mail to*/
		select count(distinct listing_id)
		into :mails
		from easybird
		;
	
		/*lists the listings and puts them in variables*/
		select distinct
			am_email,
			am_name,
			director_name,
			director_email,
			cm_name,
			cc_name,
			job_title,
			listing_id,
			url,
			close_days
		into
			:mail_1 - :mail_%sysfunc(strip(&amp;amp;mails)),
			:am_1 - :am_%sysfunc(strip(&amp;amp;mails)),
			:dn_1 - :dn_%sysfunc(strip(&amp;amp;mails)),
			:de_1 - :de_%sysfunc(strip(&amp;amp;mails)),
			:cm_1 - :cm_%sysfunc(strip(&amp;amp;mails)),
			:cc_1 - :cc_%sysfunc(strip(&amp;amp;mails)),
			:title_1 - :title_%sysfunc(strip(&amp;amp;mails)),
			:listing_1 - :listing_%sysfunc(strip(&amp;amp;mails)),
			:url_1 - :url_%sysfunc(strip(&amp;amp;mails)),
			:days_1 - :days_%sysfunc(strip(&amp;amp;mails))
			from easybird
		;
	quit;

	
%do i = 1 %to &amp;amp;mails;	
		%let l_nbr = %superq(listing_&amp;amp;i);
		%let am_email = %superq(mail_&amp;amp;i);
		%let dir_email = %superq(de_&amp;amp;i);
		%let cls_days = %superq(days_&amp;amp;i);
		filename outbox email 
			to= 'jennifer_boyle@oxfordcorp.com' /*"&amp;amp;am_email"*/
			/*cc= 'jennifer_boyle@oxfordcorp.com' "&amp;amp;dir_email"*/
			/*bcc= ('jennifer_boyle@oxfordcorp.com''steven_kim@oxfordcorp.com')*/
			type = 'text/html'
			from = 'Oxford Marketing &amp;lt;marketing@oxfordcorp.com&amp;gt;'
			sender = 'Oxford Marketing &amp;lt;marketing@oxfordcorp.com&amp;gt;'
			subject = "Comp Fill &amp;amp;cls_days - Day Notice - CM Follow-Up with Listing #&amp;amp;l_nbr"
		;
			%let am_f_name = %superq(am_&amp;amp;i);
			%let client_manager = %superq(cm_&amp;amp;i);
			%let comp = %superq(cc_&amp;amp;i);
			%let jt = %superq(title_&amp;amp;i);
			%let url = %superq(url_&amp;amp;i);
				
			data _null_;
			file outbox;
			put "Hello &amp;amp;am_f_name," @;
			put ' ';
				/*   ----+----1----+----2----+----3----+----4----+----5----+----6 */
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put "Listing &amp;lt;a href = &amp;amp;url &amp;gt;&amp;amp;l_nbr&amp;lt;/a&amp;gt; closed &amp;amp;cls_days days ago due to " @;
				put 'comp fill.';
				put '&amp;lt;br&amp;gt;';
				put 'Please follow up with the CM to check on the project status, ' @;
				put 'comp performance, and new opportunities.';
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put "Client Manager: &amp;lt;b&amp;gt;&amp;amp;client_manager &amp;lt;/b&amp;gt;" ;
				put'&amp;lt;br&amp;gt;';
				put "Company: &amp;lt;b&amp;gt;&amp;amp;comp &amp;lt;/b&amp;gt;" ;
				put'&amp;lt;br&amp;gt;';
				put "Job Title: &amp;lt;b&amp;gt;&amp;amp;jt &amp;lt;/b&amp;gt;" ;
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put 'Sincerely,';
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put 'Oxford Marketing Department';
				put '&amp;lt;br&amp;gt;';
				put '&amp;lt;br&amp;gt;';
				put "General questions? Contact &amp;lt;a href='mailto:marketing@oxfordcorp.com?Subject=Comp Fill Reminder Listing # &amp;amp;l_nbr ' target='_top'&amp;gt;marketing@oxfordcorp.com&amp;lt;/a&amp;gt;" ;
				put '&amp;lt;br&amp;gt;';
				put "Data related questions? Contact &amp;lt;a href='mailto:bi_support@oxfordcorp.com?Subject=Comp Fill Reminder Listing # &amp;amp;l_nbr ' target='_top'&amp;gt;BI_support@oxfordcorp.com&amp;lt;/a&amp;gt;" ;
				

				/*   ----+----1----+----2----+----3----+----4----+----5----+----6 */
		run;
	%end;
%mend easybird;
option nonotes noquotelenmax;
%dev_prod(, %nrstr(%easybird), macro);
option notes quotelenmax;
%macro send_email;

proc sql noprint;
		/*counts the number of listings tho mail to*/
		select count(distinct listing_id)
		into :mails
		from easybird
		;
	
/* SEND EMAIL IF THERE IS DATA TODAY OR NOT */
	%if &amp;amp;mails &amp;gt;= 1 %then %do;
		%let data_today = 1;
	%end;
	%else %do;
		%let data_today = 0;
	%end;

/* IF THERE IS DATA TODAY*/
	%if &amp;amp;data_today = 1 %then %do;

	filename mymail email 'bi@oxfordcorp.com'
				to = ('bi@oxfordcorp.com''jennifer_boyle@oxfordbi.com' 'steven_kim@oxfordbi.com')
		subject = 'Easybird Count';
	;
	data _null_;
		file mymail;
		put 'Hi,';
		put ' ';
		put 'The Easybird script ran successfully ';
		put 'today: '"%sysfunc(today(), date10.)";
		put ' ';
		put 'It contains the following data:';
		put 'Number of listings:  '"&amp;amp;mails";
		put ' ';
		put 'Thank you,';
		put 'Jennifer';
	run;
	%end;
	%else %do;
/*IF THERE IS NO DATA TODAY*/
	filename mymail email 'bi@oxfordcorp.com'
				to = ('bi@oxfordcorp.com''jennifer_boyle@oxfordcorp.com''steven_kim@oxfordbi.com')
		subject = 'Easybird Count';
	;
	data _null_;
		file mymail;
		put 'Hi,';
		put ' ';
		put 'The Easybird script ran sucessfully today: '"%sysfunc(today(), date10.)";
		put ' ';
		put 'But there are no listings.';
		put ' ';
		put 'Let me know if you have any questions.';
		put ' ';
		put 'Thank you,';
		put ' ';
		put 'Jennifer';

	run;
	%end;
%mend send_email;

option nonotes noquotelenmax;
%dev_prod(, %nrstr(%send_email), macro);
option notes quotelenmax;
/*%plog;*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Mar 2020 16:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630139#M186503</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T16:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630160#M186507</link>
      <description>Run the macro with the debugging options on and post the log. &lt;BR /&gt;&lt;BR /&gt;options mprint symbolgen;&lt;BR /&gt;&lt;BR /&gt;What does a %PUT show for the variable in question?</description>
      <pubDate>Fri, 06 Mar 2020 16:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630160#M186507</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-06T16:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630162#M186509</link>
      <description>&lt;P&gt;You'll also see a WARNING that a symbolic reference could not be resolved. This happens because there are no observations in easybird, so the macro variable is not created.&lt;/P&gt;
&lt;P&gt;Set the macro variable to 0 before the select ... into.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 17:02:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630162#M186509</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-06T17:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630164#M186510</link>
      <description>&lt;P&gt;Your code is too convoluted to follow exactly.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are using PROC SQL to generate the MAILS macro variable.&amp;nbsp; That can fail in two ways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (A) It could not find any values and hence not assign any value to the macro variable. So it will keep its old value or just not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (B) It could be so large that SAS will generate scientific notation when setting the value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure to set a value before the SELECT statement and tell SAS to use a longer format when writing the value. While you are at it remove the leading/trailing spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let mails=0;
select count(distinct listing_id) format=32.
  into :mails trimmed
from easybird
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or better eliminate that extra query and just use the SQLOBS automatic macro variable generated from your real query.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select distinct
	am_email,
	am_name,
	director_name,
	director_email,
	cm_name,
	cc_name,
	job_title,
	listing_id,
	url,
	close_days
into
	:mail_1 - 
	:am_1 - 
	:dn_1 - 
	:de_1 - 
	:cm_1 - 
	:cc_1 - 
	:title_1 - 
	:listing_1 - 
	:url_1 - 
	:days_1 - 
from easybird
;
%let mails=&amp;amp;sqlobs;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 17:04:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630164#M186510</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-06T17:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630175#M186518</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-03-06_12-41-56.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36643iCD3168A7BC5A18D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-03-06_12-41-56.png" alt="2020-03-06_12-41-56.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 17:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630175#M186518</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T17:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630176#M186519</link>
      <description>&lt;P&gt;It's a good thought, but there are 10 observations. Never more than like, 50 under any circumstances.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 17:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630176#M186519</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T17:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630177#M186520</link>
      <description>&lt;P&gt;I think this is the right path, but if I now the &amp;amp;mail is resolving to 0 every time?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 17:54:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630177#M186520</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T17:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630179#M186522</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298203"&gt;@logistics_00&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I think this is the right path, but if I now the &amp;amp;mail is resolving to 0 every time?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What does that mean?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the 0 causing trouble? Does your logic properly handle when there are no emails to send?&amp;nbsp; You might need an %IF &amp;amp;MAILS&amp;gt;0 %THEN %DO;... %END; block around some or all of the later steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or do you not understand why the query is not finding any matching observations?&amp;nbsp; What do the notes SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are using CALL EXECUTE() then watch out for timing issues where code is generated before the query that sets it can run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:03:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630179#M186522</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-06T18:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630181#M186523</link>
      <description>&lt;P&gt;Maxim 3: Know Your data. Inspect the dataset from which your macro variable is created, if it ever has more than 0 observations for the conditions you specify. Since you create easybird before the macro is invoked, you should see the number of observations in the log.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630181#M186523</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-06T18:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630182#M186524</link>
      <description>&lt;P&gt;There are definitely 10 observations in the dataset easybird. So if &amp;amp;mails is resolving to 0 when I run the script, it means that the rest of the variables don't load. It sends ten emails with blanks instead of values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:03:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630182#M186524</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T18:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630183#M186525</link>
      <description>&lt;P&gt;There are ten observations in the data set easybird! There are more than zero observations 99% of the days it runs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630183#M186525</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T18:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630184#M186526</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/298203"&gt;@logistics_00&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;There are definitely 10 observations in the dataset easybird. So if &amp;amp;mails is resolving to 0 when I run the script, it means that the rest of the variables don't load. It sends ten emails with blanks instead of values.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But does it have any non-missing values in the column you count? Run a proc freq for this variable.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630184#M186526</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-06T18:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630185#M186527</link>
      <description>&lt;P&gt;Any non-missing values? They are all non-missing as it's a mandatory column in the data set. So there are no missing values, ever, if that's what you're asking. Listing_id is always populated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630185#M186527</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T18:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630186#M186528</link>
      <description>Please post the log as text. There's something weird there as the errors are coming before you declare or calculate the macro variable so either the code shown isn't what's run or you messed up your session somehow. I'm assuming you've done the restart and run from scratch to get a clean log check already.</description>
      <pubDate>Fri, 06 Mar 2020 18:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630186#M186528</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-06T18:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630188#M186530</link>
      <description>&lt;P&gt;I see what's happening, it's a macro timing mistake.&lt;/P&gt;
&lt;P&gt;Use %nrstr( in the call execute, to prevent premature execution of macro statements.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630188#M186530</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-06T18:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630190#M186531</link>
      <description>But the OP said this worked previously which is the part that confuses me.</description>
      <pubDate>Fri, 06 Mar 2020 18:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630190#M186531</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-06T18:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630191#M186532</link>
      <description>&lt;P&gt;&lt;BR /&gt;2189 proc sql;&lt;BR /&gt;2190&lt;BR /&gt;2191&lt;BR /&gt;2192 create table easybird as&lt;BR /&gt;2193 select distinct&lt;BR /&gt;2194&lt;BR /&gt;2195 b.source,&lt;BR /&gt;2196 strip(put(b.l_nbr,10.)) as listing_id,&lt;BR /&gt;2197 b.ls_d format = MMDDYYs. as close_date,&lt;BR /&gt;2198 today() - b.ls_d as close_days,/*how many days since the listing closed*/&lt;BR /&gt;2199 b.cc_name,&lt;BR /&gt;2200 b.job_title,&lt;BR /&gt;2201 b.cm as cm_name,&lt;BR /&gt;2202 e.email_address as cm_email_address,&lt;BR /&gt;2203 b.am as am_name,&lt;BR /&gt;2204 g.director as director_name,&lt;BR /&gt;2205 h.email as director_email,&lt;BR /&gt;2206 f.email as am_email,&lt;BR /&gt;2207 case when b.source = 'US'&lt;BR /&gt;2208 then '&lt;A href="http://compass.oxfordcorp.com/#listing/'||strip(put(b.jo_url_id" target="_blank"&gt;http://compass.oxfordcorp.com/#listing/'||strip(put(b.jo_url_id&lt;/A&gt;, 10.))&lt;BR /&gt;2209 else '&lt;A href="http://compass.eu.oxfordcorp.com/#listing/'||strip(put(b.jo_url_id,10" target="_blank"&gt;http://compass.eu.oxfordcorp.com/#listing/'||strip(put(b.jo_url_id,10&lt;/A&gt;.)) end as url&lt;BR /&gt;2209! /*creates url field for body of email*/&lt;BR /&gt;2210&lt;BR /&gt;2211&lt;BR /&gt;2212&lt;BR /&gt;2213 from lr.jos b&lt;BR /&gt;2214 inner join stg.cm_email e&lt;BR /&gt;2215 on b.cm_id = e.cm_id&lt;BR /&gt;2216 and e.is_primary &amp;lt;&amp;gt; 0&lt;BR /&gt;2217 inner join ee.active_empl f&lt;BR /&gt;2218 on b.am_eid = f.eid&lt;BR /&gt;2219 inner join ee.dept_org_map g&lt;BR /&gt;2220 on f.dept_id = g.dept_id&lt;BR /&gt;2221 and scope = 'BD'&lt;BR /&gt;2222 and cur = 1&lt;BR /&gt;2223 inner join ee.active_empl h&lt;BR /&gt;2224 on g.director_eid = h.eid&lt;BR /&gt;2225&lt;BR /&gt;2226&lt;BR /&gt;2227 where today()-b.ls_d in (10,30) /*includes in only listings that closed 10 or 30 days ago*/&lt;BR /&gt;2228 and b.comp_fill = 1 /*includes in only comp fills*/&lt;BR /&gt;2229 and b.open is null&lt;BR /&gt;2230&lt;BR /&gt;2231&lt;BR /&gt;2232 order by b.ls_d desc&lt;BR /&gt;2233&lt;BR /&gt;2234 ;&lt;BR /&gt;NOTE: The "&amp;lt;&amp;gt;" operator is interpreted as "not equals".&lt;BR /&gt;NOTE: Table WORK.EASYBIRD created, with 10 rows and 13 columns.&lt;/P&gt;&lt;P&gt;2234! quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 1.64 seconds&lt;BR /&gt;cpu time 0.20 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2235&lt;BR /&gt;2236&lt;BR /&gt;2237 %macro easybird;&lt;BR /&gt;2238&lt;BR /&gt;2239 proc sql;&lt;BR /&gt;2240 /*counts the number of listings to mail to*/&lt;BR /&gt;2241 select count(distinct listing_id)format=32.&lt;BR /&gt;2242 into :mails trimmed&lt;BR /&gt;2243 from easybird&lt;BR /&gt;2244 ;&lt;BR /&gt;2245&lt;BR /&gt;2246 /*lists the listings and puts them in variables*/&lt;BR /&gt;2247 select distinct&lt;BR /&gt;2248 am_email,&lt;BR /&gt;2249 am_name,&lt;BR /&gt;2250 director_name,&lt;BR /&gt;2251 director_email,&lt;BR /&gt;2252 cm_name,&lt;BR /&gt;2253 cc_name,&lt;BR /&gt;2254 job_title,&lt;BR /&gt;2255 listing_id,&lt;BR /&gt;2256 url,&lt;BR /&gt;2257 close_days&lt;BR /&gt;2258 into&lt;BR /&gt;2259 :mail_1 - :mail_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2260 :am_1 - :am_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2261 :dn_1 - :dn_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2262 :de_1 - :de_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2263 :cm_1 - :cm_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2264 :cc_1 - :cc_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2265 :title_1 - :title_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2266 :listing_1 - :listing_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2267 :url_1 - :url_%sysfunc(strip(&amp;amp;mails)),&lt;BR /&gt;2268 :days_1 - :days_%sysfunc(strip(&amp;amp;mails))&lt;BR /&gt;2269 from easybird&lt;BR /&gt;2270 ;&lt;BR /&gt;2271&lt;BR /&gt;2272 quit;&lt;BR /&gt;2273&lt;BR /&gt;2274&lt;BR /&gt;2275 %do i = 1 %to &amp;amp;mails;&lt;BR /&gt;2276 %let l_nbr = %superq(listing_&amp;amp;i);&lt;BR /&gt;2277 %let am_email = %superq(mail_&amp;amp;i);&lt;BR /&gt;2278 %let dir_email = %superq(de_&amp;amp;i);&lt;BR /&gt;2279 %let cls_days = %superq(days_&amp;amp;i);&lt;BR /&gt;2280 filename outbox email&lt;BR /&gt;2281 to= 'jennifer_boyle@oxfordcorp.com' /*"&amp;amp;am_email"*/&lt;BR /&gt;2282 /*cc= 'jennifer_boyle@oxfordcorp.com' "&amp;amp;dir_email"*/&lt;BR /&gt;2283 /*bcc= ('jennifer_boyle@oxfordcorp.com''steven_kim@oxfordcorp.com')*/&lt;BR /&gt;2284 type = 'text/html'&lt;BR /&gt;2285 from = 'Oxford Marketing &amp;lt;marketing@oxfordcorp.com&amp;gt;'&lt;BR /&gt;2286 sender = 'Oxford Marketing &amp;lt;marketing@oxfordcorp.com&amp;gt;'&lt;BR /&gt;2287 subject = "Comp Fill &amp;amp;cls_days - Day Notice - CM Follow-Up with Listing #&amp;amp;l_nbr"&lt;BR /&gt;2288 ;&lt;BR /&gt;2289 %let am_f_name = %superq(am_&amp;amp;i);&lt;BR /&gt;2290 %let client_manager = %superq(cm_&amp;amp;i);&lt;BR /&gt;2291 %let comp = %superq(cc_&amp;amp;i);&lt;BR /&gt;2292 %let jt = %superq(title_&amp;amp;i);&lt;BR /&gt;2293 %let url = %superq(url_&amp;amp;i);&lt;BR /&gt;2294&lt;BR /&gt;2295 data _null_;&lt;BR /&gt;2296 file outbox;&lt;BR /&gt;2297 put "Hello &amp;amp;am_f_name," @;&lt;BR /&gt;2298 put ' ';&lt;BR /&gt;2299 /* ----+----1----+----2----+----3----+----4----+----5----+----6 */&lt;BR /&gt;2300 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2301 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2302 put "Listing &amp;lt;a href = &amp;amp;url &amp;gt;&amp;amp;l_nbr&amp;lt;/a&amp;gt; closed &amp;amp;cls_days days ago due to " @;&lt;BR /&gt;2303 put 'comp fill.';&lt;BR /&gt;2304 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2305 put 'Please follow up with the CM to check on the project status, ' @;&lt;BR /&gt;2306 put 'comp performance, and new opportunities.';&lt;BR /&gt;2307 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2308 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2309 put "Client Manager: &amp;lt;b&amp;gt;&amp;amp;client_manager &amp;lt;/b&amp;gt;" ;&lt;BR /&gt;2310 put'&amp;lt;br&amp;gt;';&lt;BR /&gt;2311 put "Company: &amp;lt;b&amp;gt;&amp;amp;comp &amp;lt;/b&amp;gt;" ;&lt;BR /&gt;2312 put'&amp;lt;br&amp;gt;';&lt;BR /&gt;2313 put "Job Title: &amp;lt;b&amp;gt;&amp;amp;jt &amp;lt;/b&amp;gt;" ;&lt;BR /&gt;2314 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2315 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2316 put 'Sincerely,';&lt;BR /&gt;2317 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2318 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2319 put 'Oxford Marketing Department';&lt;BR /&gt;2320 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2321 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2322 put "General questions? Contact &amp;lt;a&lt;BR /&gt;2322! href='mailto:marketing@oxfordcorp.com?Subject=Comp Fill Reminder Listing # &amp;amp;l_nbr '&lt;BR /&gt;2322! target='_top'&amp;gt;marketing@oxfordcorp.com&amp;lt;/a&amp;gt;" ;&lt;BR /&gt;2323 put '&amp;lt;br&amp;gt;';&lt;BR /&gt;2324 put "Data related questions? Contact &amp;lt;a&lt;BR /&gt;2324! href='mailto:bi_support@oxfordcorp.com?Subject=Comp Fill Reminder Listing # &amp;amp;l_nbr '&lt;BR /&gt;2324! target='_top'&amp;gt;BI_support@oxfordcorp.com&amp;lt;/a&amp;gt;" ;&lt;BR /&gt;2325&lt;BR /&gt;2326&lt;BR /&gt;2327 /* ----+----1----+----2----+----3----+----4----+----5----+----6 */&lt;BR /&gt;2328 run;&lt;BR /&gt;2329 %end;&lt;BR /&gt;2330 %mend easybird;&lt;BR /&gt;2331 option nonotes noquotelenmax;&lt;BR /&gt;2332 %dev_prod(, %nrstr(%easybird), macro);&lt;BR /&gt;SYMBOLGEN: Macro variable SYSHOSTNAME resolves to PRD-BIA-APP-003&lt;BR /&gt;SYMBOLGEN: Macro variable SYSHOSTNAME resolves to PRD-BIA-APP-003&lt;BR /&gt;SYMBOLGEN: Macro variable TASK_TYPE resolves to macro&lt;BR /&gt;MPRINT(DEV_PROD): data _null_;&lt;BR /&gt;SYMBOLGEN: Macro variable PROD_TASK resolves to %easybird&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted&lt;BR /&gt;for printing.&lt;BR /&gt;MPRINT(DEV_PROD): call execute ("%easybird");&lt;BR /&gt;MPRINT(DEV_PROD): run;&lt;BR /&gt;MPRINT(EASYBIRD): proc sql;&lt;BR /&gt;MPRINT(EASYBIRD): select count(distinct listing_id)format=32. into :mails trimmed from easybird ;&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;MPRINT(EASYBIRD): select distinct am_email, am_name, director_name, director_email, cm_name,&lt;BR /&gt;cc_name, job_title, listing_id, url, close_days into :mail_1 - :mail_&amp;amp;mails, :am_1 - :am_&amp;amp;mails,&lt;BR /&gt;:dn_1 - :dn_&amp;amp;mails, :de_1 - :de_&amp;amp;mails, :cm_1 - :cm_&amp;amp;mails, :cc_1 - :cc_&amp;amp;mails, :title_1 -&lt;BR /&gt;:title_&amp;amp;mails, :listing_1 - :listing_&amp;amp;mails, :url_1 - :url_&amp;amp;mails, :days_1 - :days_&amp;amp;mails from&lt;BR /&gt;easybird ;&lt;BR /&gt;MPRINT(EASYBIRD): quit;&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand&lt;BR /&gt;is required. The condition was: &amp;amp;mails&lt;BR /&gt;ERROR: The %TO value of the %DO I loop is invalid.&lt;BR /&gt;ERROR: The macro EASYBIRD will stop executing.&lt;BR /&gt;1 + proc sql;&lt;BR /&gt;1 + select count(distinct listing_id)format=32. into :mails&lt;BR /&gt;trimmed from easybird ;&lt;BR /&gt;1 +&lt;BR /&gt;select distinct am_email, am_name,&lt;BR /&gt;director_name,&lt;BR /&gt;2 + director_email, cm_name, cc_name, job_title,&lt;BR /&gt;listing_id, url, close_days into :mail_1 - :mail_&amp;amp;mails,&lt;BR /&gt;:am_1 - :am_&amp;amp;mails, :dn_1 -&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;3 + :dn_&amp;amp;mails, :de_1 - :de_&amp;amp;mails, :cm_1 - :cm_&amp;amp;mails, :cc_1&lt;BR /&gt;- :cc_&amp;amp;mails, :title_1 - :title_&amp;amp;mails, :listing_1 - :listing_&amp;amp;mails,&lt;BR /&gt;:url_1 - :url_&amp;amp;mails, :days_1 -&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;4 + :days_&amp;amp;mails from easybird ; quit;&lt;BR /&gt;SYMBOLGEN: Macro variable MAILS resolves to 10&lt;BR /&gt;MPRINT(DEV_PROD): mail_10am_10dn_10de_10cm_10cc_10title_10listing_10url_10days_10&lt;BR /&gt;2333 option notes quotelenmax;&lt;BR /&gt;2334 options mprint symbolgen;&lt;BR /&gt;2335 %macro send_email;&lt;BR /&gt;2336 proc sql;&lt;BR /&gt;2337 /*counts the number of listings to mail to*/&lt;BR /&gt;2338 select count(distinct listing_id)format=32.&lt;BR /&gt;2339 into :mails trimmed&lt;BR /&gt;2340 from easybird&lt;BR /&gt;2341 ;&lt;BR /&gt;2342&lt;BR /&gt;2343 /* SEND EMAIL IF THERE IS DATA TODAY OR NOT */&lt;BR /&gt;2344 %if &amp;amp;mails &amp;gt;= 1 %then %do;&lt;BR /&gt;2345 %let data_today = 1;&lt;BR /&gt;2346 %end;&lt;BR /&gt;2347 %else %do;&lt;BR /&gt;2348 %let data_today = 0;&lt;BR /&gt;2349 %end;&lt;BR /&gt;2350&lt;BR /&gt;2351 /* IF THERE IS DATA TODAY*/&lt;BR /&gt;2352 %if &amp;amp;data_today = 1 %then %do;&lt;BR /&gt;2353&lt;BR /&gt;2354 filename mymail email 'bi@oxfordcorp.com'&lt;BR /&gt;2355 to = ('bi@oxfordcorp.com''jennifer_boyle@oxfordbi.com'&lt;BR /&gt;2355! 'steven_kim@oxfordbi.com')&lt;BR /&gt;2356 subject = 'Easybird Count';&lt;BR /&gt;2357 ;&lt;BR /&gt;2358 data _null_;&lt;BR /&gt;2359 file mymail;&lt;BR /&gt;2360 put 'Hi,';&lt;BR /&gt;2361 put ' ';&lt;BR /&gt;2362 put 'The Easybird script ran successfully ';&lt;BR /&gt;2363 put 'today: '"%sysfunc(today(), date10.)";&lt;BR /&gt;2364 put ' ';&lt;BR /&gt;2365 put 'It contains the following data:';&lt;BR /&gt;2366 put 'Number of listings: '"&amp;amp;mails";&lt;BR /&gt;2367 put ' ';&lt;BR /&gt;2368 put 'Thank you,';&lt;BR /&gt;2369 put 'Jennifer';&lt;BR /&gt;2370 run;&lt;BR /&gt;2371 %end;&lt;BR /&gt;2372 %else %do;&lt;BR /&gt;2373 /*IF THERE IS NO DATA TODAY*/&lt;BR /&gt;2374 filename mymail email 'bi@oxfordcorp.com'&lt;BR /&gt;2375 to =&lt;BR /&gt;2375! ('bi@oxfordcorp.com''jennifer_boyle@oxfordcorp.com''steven_kim@oxfordbi.com')&lt;BR /&gt;2376 subject = 'Easybird Count';&lt;BR /&gt;2377 ;&lt;BR /&gt;2378 data _null_;&lt;BR /&gt;2379 file mymail;&lt;BR /&gt;2380 put 'Hi,';&lt;BR /&gt;2381 put ' ';&lt;BR /&gt;2382 put 'The Easybird script ran successfully today: '"%sysfunc(today(), date10.)";&lt;BR /&gt;2383 put ' ';&lt;BR /&gt;2384 put 'But there are no listings.';&lt;BR /&gt;2385 put ' ';&lt;BR /&gt;2386 put 'Let me know if you have any questions.';&lt;BR /&gt;2387 put ' ';&lt;BR /&gt;2388 put 'Thank you,';&lt;BR /&gt;2389 put ' ';&lt;BR /&gt;2390 put 'Jennifer';&lt;BR /&gt;2391&lt;BR /&gt;2392 run;&lt;BR /&gt;2393 %end;&lt;BR /&gt;2394 %mend send_email;&lt;BR /&gt;2395&lt;BR /&gt;2396 option nonotes noquotelenmax;&lt;BR /&gt;2397 %dev_prod(, %nrstr(%send_email), macro);&lt;BR /&gt;SYMBOLGEN: Macro variable SYSHOSTNAME resolves to PRD-BIA-APP-003&lt;BR /&gt;SYMBOLGEN: Macro variable SYSHOSTNAME resolves to PRD-BIA-APP-003&lt;BR /&gt;SYMBOLGEN: Macro variable TASK_TYPE resolves to macro&lt;BR /&gt;MPRINT(DEV_PROD): data _null_;&lt;BR /&gt;SYMBOLGEN: Macro variable PROD_TASK resolves to %send_email&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted&lt;BR /&gt;for printing.&lt;BR /&gt;MPRINT(DEV_PROD): call execute ("%send_email");&lt;BR /&gt;MPRINT(DEV_PROD): run;&lt;BR /&gt;MPRINT(SEND_EMAIL): proc sql;&lt;BR /&gt;MPRINT(SEND_EMAIL): select count(distinct listing_id)format=32. into :mails trimmed from easybird ;&lt;BR /&gt;WARNING: Apparent symbolic reference MAILS not resolved.&lt;BR /&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand&lt;BR /&gt;is required. The condition was: &amp;amp;mails &amp;gt;= 1&lt;BR /&gt;ERROR: The macro SEND_EMAIL will stop executing.&lt;BR /&gt;1 + proc sql;&lt;BR /&gt;1 + select count(distinct listing_id)format=32. into :mails trimmed from easybird ;&lt;BR /&gt;2398 option notes quotelenmax;&lt;BR /&gt;2399 options mprint symbolgen;&lt;BR /&gt;2400 /*%plog;*/&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630191#M186532</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T18:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630192#M186533</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;option nonotes noquotelenmax;
%dev_prod(, %nrstr(%easybird), macro);
option notes quotelenmax;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Don't I already have this though? Sorry if I'm not understanding.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630192#M186533</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T18:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630195#M186534</link>
      <description>&lt;P&gt;No, the problem is likely inside the definition of your macro %Dev_Prod.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like it uses CALL EXECUTE to call your macro %EasyBird.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes you quoted it with %NRSTR(), but inside your macro %Dev_Prod it's possible something unquoted it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post the definition of the %Dev_Prod macro?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your current macro is generating:&lt;/P&gt;
&lt;PRE&gt;MPRINT(DEV_PROD): call execute ("%send_email");&lt;/PRE&gt;
&lt;P&gt;You want it to generate something like:&lt;/P&gt;
&lt;PRE&gt;MPRINT(DEV_PROD): call execute ('%nrstr(%send_email)');&lt;/PRE&gt;
&lt;P&gt;Note single quotes, and %NRSTR().&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 18:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630195#M186534</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2020-03-06T18:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: error says macro variable is a character but I don't see how that is possible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630201#M186536</link>
      <description>&lt;P&gt;This was exactly the issue. The %dev_prod macro determines if a script is being run on our dev server or our prod server and treats it accordingly (like the dev server doesn't have an email application). I thought they were identical environments, but taking out that macro resolves my issues.&amp;nbsp; I'll have to take that up with the DW architect but for now I'm gtg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help, everyone. Much appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jennifer&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 19:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/error-says-macro-variable-is-a-character-but-I-don-t-see-how/m-p/630201#M186536</guid>
      <dc:creator>logistics_00</dc:creator>
      <dc:date>2020-03-06T19:25:37Z</dc:date>
    </item>
  </channel>
</rss>

