<?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: Resolve macro variable in define statement in proc report in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803418#M316341</link>
    <description>&lt;P&gt;Macro variables resolve inside double quotes and outside of quotes but not inside single quotes. This is by design.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 18:23:32 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2022-03-22T18:23:32Z</dc:date>
    <item>
      <title>Resolve macro variable in define statement in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803413#M316336</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to resolve the macro variable in the define statement in proc report in order to generate treatment count and name in the tables with below code but the code is not resolving. Can you please help me out to resolve&amp;nbsp;&amp;amp;trt01count. and&amp;nbsp;&amp;amp;trt01.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;select trtseqp into:trt01&lt;BR /&gt;from bign_counts&lt;BR /&gt;where trtseqpn = 1&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;select count into:trt01count&lt;BR /&gt;from bign_counts&lt;BR /&gt;where trtseqpn = 1&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;BR /&gt;%put &amp;amp;trt01count;&lt;BR /&gt;%put &amp;amp;trt01;&lt;/P&gt;
&lt;P&gt;proc report data=final_tp nowd spacing=1 LS = 200 headline headskip split='|' panels=1 style(header)=header{just=left}&lt;BR /&gt;style(column)=header{just=left cellwidth=0.3in } missing;&lt;/P&gt;
&lt;P&gt;title1 bold "Table 1.6 Disc Test";&lt;BR /&gt;title2 bold "All Enrolled Subjects" ;&lt;BR /&gt;&lt;BR /&gt;columns popfl _1 _2 _999;&lt;/P&gt;
&lt;P&gt;define popfl / order order=internal left ' ' style ={just=left cellwidth=.47in}; &lt;BR /&gt;define _1 / order order=internal left '&amp;amp;trt01.|N=&amp;amp;trt01count.|n(%)' style ={just=left cellwidth=.28in} ;&lt;BR /&gt;define _2 / order order=internal left '&amp;amp;trt02.|N=&amp;amp;trt02count.|n(%)' style ={just=left cellwidth=.28in} ;&lt;/P&gt;
&lt;P&gt;*by pageit;&lt;BR /&gt;compute before _page_/style = [JUST=center];&lt;BR /&gt;line '^R"\brdrb\brdrs"';&lt;BR /&gt;line '';&lt;BR /&gt;endcomp; &lt;BR /&gt;compute after _page_ / style = [JUST=LEFT font_size =9pt font_style=italic];; &lt;BR /&gt;line " " ;&lt;BR /&gt;line "Created by %sysfunc(getoption(sysin)) on %left(&amp;amp;rundayf):%left(&amp;amp;runtimef)";&lt;BR /&gt;line "Reference: Transfer ID: &amp;amp;_transfer_id. on %left(&amp;amp;_extract_date)"; &lt;BR /&gt;endcomp; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kumar.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 18:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803413#M316336</guid>
      <dc:creator>Kumar6</dc:creator>
      <dc:date>2022-03-22T18:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Resolve macro variable in define statement in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803417#M316340</link>
      <description>Use "double" quotes to have SAS resolve macro variables.&lt;BR /&gt;&lt;BR /&gt;define _1 / order order=internal left "'&amp;amp;trt01.|N=&amp;amp;trt01count.|n(%)" style ={just=left cellwidth=.28in} ;0</description>
      <pubDate>Tue, 22 Mar 2022 18:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803417#M316340</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-03-22T18:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Resolve macro variable in define statement in proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803418#M316341</link>
      <description>&lt;P&gt;Macro variables resolve inside double quotes and outside of quotes but not inside single quotes. This is by design.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 18:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Resolve-macro-variable-in-define-statement-in-proc-report/m-p/803418#M316341</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2022-03-22T18:23:32Z</dc:date>
    </item>
  </channel>
</rss>

