<?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: %bquote error on quotation marks in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954022#M372656</link>
    <description>You are right! %bquote doesn't serve any purpose here. That's the key point. Thank you again for your help!</description>
    <pubDate>Wed, 18 Dec 2024 16:07:32 GMT</pubDate>
    <dc:creator>masonCL</dc:creator>
    <dc:date>2024-12-18T16:07:32Z</dc:date>
    <item>
      <title>%bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954007#M372648</link>
      <description>&lt;DIV&gt;Dear SAS expert,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you in advance for your help! I created a macro below to dynamically generate define statements that are being used in proc report. %bquote is being used here. However, proc report can't process it. You can see the error message below. Can you please help identify the reason? Thanks!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%macro ild_out;&lt;/DIV&gt;&lt;DIV&gt;%do i=2 %to &amp;amp;max_ild.;&lt;/DIV&gt;&lt;DIV&gt;%bquote(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define e%eval(&amp;amp;i.-1)_prog_yn / "Did event%eval(&amp;amp;i.-1) progress to a higher grade per Investigator (Y/N)" style(column)=[cellwidth=0.8in] display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define e%eval(&amp;amp;i.-1)_prog_date / "If yes, date when event%eval(&amp;amp;i.-1) progressed to a higher grade (event&amp;amp;i.)" style(column)=[cellwidth=0.8in] display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define e&amp;amp;i._grade / "Grade of event&amp;amp;i." style(column)=[cellwidth=0.8in] display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define e&amp;amp;i._out / "Outcome of event&amp;amp;i." style(column)=[cellwidth=0.8in] display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;define e&amp;amp;i._action / "Dose action of event&amp;amp;i. for DXd ADC" style(column)=[cellwidth=0.8in] display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;&lt;DIV&gt;%end;&lt;/DIV&gt;&lt;DIV&gt;%mend ild_out;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Using in proc report:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;define e1_action / "Dose action of initial event" style(column)=[cellwidth=1.2in] display;&lt;BR /&gt;%ild_out&lt;BR /&gt;define e1_aft_adc_dur / "Duration" style(column)=[cellwidth=0.8in] display;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="masonCL_0-1734535797947.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103143i8E52BE700A8F12A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="masonCL_0-1734535797947.png" alt="masonCL_0-1734535797947.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:35:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954007#M372648</guid>
      <dc:creator>masonCL</dc:creator>
      <dc:date>2024-12-18T15:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954012#M372650</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, Instead of using&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%bquote&lt;/CODE&gt;&lt;SPAN&gt;, can use&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;%nrstr&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;to handle the special characters and ensure the macro variables are correctly interpreted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro ild_out;
%do i=2 %to &amp;amp;max_ild.;
%nrstr(
define e%eval(&amp;amp;i.-1)_prog_yn / "Did event%eval(&amp;amp;i.-1) progress to a higher grade per Investigator (Y/N)" style(column)=[cellwidth=0.8in] display;
define e%eval(&amp;amp;i.-1)_prog_date / "If yes, date when event%eval(&amp;amp;i.-1) progressed to a higher grade (event&amp;amp;i.)" style(column)=[cellwidth=0.8in] display;
define e&amp;amp;i._grade / "Grade of event&amp;amp;i." style(column)=[cellwidth=0.8in] display;
define e&amp;amp;i._out / "Outcome of event&amp;amp;i." style(column)=[cellwidth=0.8in] display;
define e&amp;amp;i._action / "Dose action of event&amp;amp;i. for DXd ADC" style(column)=[cellwidth=0.8in] display;
)
%end;
%mend ild_out;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954012#M372650</guid>
      <dc:creator>himself</dc:creator>
      <dc:date>2024-12-18T15:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954014#M372651</link>
      <description>&lt;P&gt;Call it like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%unquote(%ild_out)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Read this article to learn why:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stats.oarc.ucla.edu/wp-content/uploads/2016/02/bt185.pdf" target="_blank"&gt;https://stats.oarc.ucla.edu/wp-content/uploads/2016/02/bt185.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954014#M372651</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2024-12-18T15:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954015#M372652</link>
      <description>&lt;P&gt;Why do you want to use %BQUOTE()?&amp;nbsp; It does not seem to serve any purpose.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro ild_out;
%local next previous style;
%let style=style(column)=[cellwidth=0.8in] display;
%do next=2 %to &amp;amp;max_ild.;
  %let previous=%eval(&amp;amp;next-1);
define e&amp;amp;previous._prog_yn / "Did event&amp;amp;previous. progress to a higher grade per Investigator (Y/N)" &amp;amp;style.;
define e&amp;amp;previous._prog_date / "If yes, date when event&amp;amp;previous. progressed to a higher grade (event&amp;amp;i.)" &amp;amp;style.;
define e&amp;amp;next._grade / "Grade of event&amp;amp;next." &amp;amp;style.;
define e&amp;amp;next._out / "Outcome of event&amp;amp;next." &amp;amp;style.;
define e&amp;amp;next._action / "Dose action of event&amp;amp;next. for DXd ADC" &amp;amp;style.;
%end;
%mend ild_out;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also where does the value for the "magic" macro variable MAX_ILD come from? It is not a parameter that the macro accepts. Nor is it another LOCAL macro variable that macro created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:53:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954015#M372652</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-12-18T15:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954018#M372653</link>
      <description>&lt;P&gt;Thanks a lot, himself! It didn't process and reported the message below. All the macro variables are masked in the define blocks.&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="masonCL_0-1734537264535.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/103148i5A5525930C9D42B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="masonCL_0-1734537264535.png" alt="masonCL_0-1734537264535.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954018#M372653</guid>
      <dc:creator>masonCL</dc:creator>
      <dc:date>2024-12-18T15:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954019#M372654</link>
      <description>&lt;DIV class=""&gt;Thanks a lot, Yabwon! Your solution works perfectly. I'll read the article you provided.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Dec 2024 15:58:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954019#M372654</guid>
      <dc:creator>masonCL</dc:creator>
      <dc:date>2024-12-18T15:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954020#M372655</link>
      <description>&lt;P&gt;Thank you so much, Tom! &amp;amp;maxild is the maximum number of events that was defined in other data step. Your solution also works perfectly. I wish I could mark it as the second solution. Much appreciate it.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:02:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954020#M372655</guid>
      <dc:creator>masonCL</dc:creator>
      <dc:date>2024-12-18T16:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: %bquote error on quotation marks</title>
      <link>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954022#M372656</link>
      <description>You are right! %bquote doesn't serve any purpose here. That's the key point. Thank you again for your help!</description>
      <pubDate>Wed, 18 Dec 2024 16:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/bquote-error-on-quotation-marks/m-p/954022#M372656</guid>
      <dc:creator>masonCL</dc:creator>
      <dc:date>2024-12-18T16:07:32Z</dc:date>
    </item>
  </channel>
</rss>

