<?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: Why doesn't my macro variable resolve in this code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583250#M166026</link>
    <description>&lt;P&gt;enclose this in double quotes&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token string"&gt;"Bland-Altman Plot for Day 1 and Day 2 observed values at &amp;amp;visit."&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your existing code, the macro variable visit do not resolve in a literal that's enclosed with single quotes&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 16:12:54 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-08-22T16:12:54Z</dc:date>
    <item>
      <title>Why doesn't my macro variable resolve in this code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583249#M166025</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mlogic mprint symbolgen;

%macro visit(indata=, visit=);

data datafile;
set &amp;amp;indata.(where=(visit_="&amp;amp;visit."));
diffm1m2=day1-day2;
meanm1m2=mean(day1,day2);
run;

proc means data=datafile mean std noprint;
by visit_;
var diffm1m2;
output out=mdiff mean=mdiffm1m2 std=sddiffm1m2;
run;

data datafile2_1 datafile2_2 datafile2_3;
if _n_=1 then set mdiff;
set datafile;
drop _freq_ _type_;
newcol=mdiffm1m2;output datafile2_1;
lldiffm1m22=mdiffm1m2-(1.96*sddiffm1m2); newcol=lldiffm1m22;output datafile2_2;
uldiffm1m22=mdiffm1m2+(1.96*sddiffm1m2);newcol=uldiffm1m22;output datafile2_3;
run;

data datafile2;
  set datafile2_1 datafile2_2 datafile2_3;
run;

options nonumber nodate;

title1 j=c %if visit_ ne "" %then %do; 'Bland-Altman Plot for Day 1 and Day 2 observed values at &amp;amp;visit.'; %end;
          %else %do; "Bland-Altman Plot for Day 1 and Day 2 observed values"; %end;
title2 j=c "Efficacy Set";
footnote1 " ";

ods graphics / reset width=1200px height=700px imagename='Full' ;
ods listing close; 
ods escapechar='~';
ODS rtf FILE = "&amp;amp;outpath.&amp;amp;output..rtf";
symbol value=dot interpol=join repeat=100;


proc sgplot data=datafile2;
scatter x=meanm1m2 y=diffm1m2/ markerattrs=(color=green);
refline lldiffm1m22 / axis=y lineattrs=(color=red pattern=4 thickness=2pt);
refline mdiffm1m2/ axis=y lineattrs=(color=blue thickness=2pt);
refline uldiffm1m22/ axis=y lineattrs=(color=red pattern=4 thickness=2pt);
yaxis label='Day 1 - Day 2' labelattrs=(style=normal );
xaxis label='Mean of Day 1 and Day 2';
run;

ods rtf close; 
ods listing;

%mend;

%visit(indata=all1, visit=Baseline);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hi , why is my code not resolving for macro variable in the title statement? attached is the code as well as excerpt of the sas log.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31958i6AE481312992C7DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 16:07:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583249#M166025</guid>
      <dc:creator>VinnyR</dc:creator>
      <dc:date>2019-08-22T16:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't my macro variable resolve in this code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583250#M166026</link>
      <description>&lt;P&gt;enclose this in double quotes&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token string"&gt;"Bland-Altman Plot for Day 1 and Day 2 observed values at &amp;amp;visit."&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your existing code, the macro variable visit do not resolve in a literal that's enclosed with single quotes&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 16:12:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583250#M166026</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-08-22T16:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't my macro variable resolve in this code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583252#M166028</link>
      <description>&lt;P&gt;Thanks, that was quickfix.&lt;/P&gt;&lt;P&gt;Really appreciate your help&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 16:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-doesn-t-my-macro-variable-resolve-in-this-code/m-p/583252#M166028</guid>
      <dc:creator>VinnyR</dc:creator>
      <dc:date>2019-08-22T16:12:47Z</dc:date>
    </item>
  </channel>
</rss>

