<?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: ODS RTF not giving Output in a loop for all subjects in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501769#M133834</link>
    <description>&lt;P&gt;The glaringly obvious mistake is the&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file = 'xxxxxxx.rtf';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;statement in the %do loop.&lt;/P&gt;
&lt;P&gt;This means that the rtf file is reopened (and therefore overwritten) in every iteration of the %do loop.&lt;/P&gt;
&lt;P&gt;Just as the ods rtf close comes &lt;EM&gt;after&lt;/EM&gt; the %end, the ods rtf file= has to come &lt;EM&gt;before&lt;/EM&gt; the %do.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Oct 2018 07:54:15 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-10-05T07:54:15Z</dc:date>
    <item>
      <title>ODS RTF not giving Output in a loop for all subjects</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501761#M133829</link>
      <description>&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing issue with ODS RTF when I write with in a Loop. please check below details and help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to write list of lets take 50 subjects Output into a single RTF file and for each subject we have some 10 PROC Reports(1 for each Panel) and all should come in a single Output file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the code below , is giving Output only for last Subject, (Ex: if I have 10 subjects as Count, the output file is getting generated only for 10th Subject). I am not sure what is going wrong in this. please provide your suggestions. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%di I=1 %to &amp;amp;cnt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods RTF startpage=never;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods rtf file = 'xxxxxxx.rtf';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%calldomains;&amp;nbsp; /*(in this macro we have written&amp;nbsp;Proc report code&amp;nbsp;for each panel and roughly we have 10 Proc reports, so here for each subject we should get 10 tables frome ach panel and next subject output should come in same RTF file).*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods RTF startpage=Now;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods rtf close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 06:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501761#M133829</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2018-10-05T06:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF not giving Output in a loop for all subjects</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501763#M133830</link>
      <description>&lt;P&gt;And how will we solve your problem from that?&amp;nbsp; That is obviously just a small part of the code at maximum as %do loops can't be in open code.&amp;nbsp; No idea what cnt is, not defined, a call to a macro not shown.&amp;nbsp; As I can't see what your doing, its even hard to show some possibilities.&amp;nbsp; This is why we ask for test data - in the form of a datastep - and some working code, and an explanation of what you want out from it.&amp;nbsp; What for instance does the log say?&amp;nbsp; Have you put options mlogic mprint syblogen; on and looked at the values used in each macro call?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 06:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501763#M133830</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-05T06:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF not giving Output in a loop for all subjects</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501769#M133834</link>
      <description>&lt;P&gt;The glaringly obvious mistake is the&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods rtf file = 'xxxxxxx.rtf';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;statement in the %do loop.&lt;/P&gt;
&lt;P&gt;This means that the rtf file is reopened (and therefore overwritten) in every iteration of the %do loop.&lt;/P&gt;
&lt;P&gt;Just as the ods rtf close comes &lt;EM&gt;after&lt;/EM&gt; the %end, the ods rtf file= has to come &lt;EM&gt;before&lt;/EM&gt; the %do.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 07:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501769#M133834</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-05T07:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF not giving Output in a loop for all subjects</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501782#M133837</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; : Thank you So much. Its giving Output for all now. It is simple issue but Wasted my time for Long time.&lt;BR /&gt;&lt;BR /&gt;But just a clarification, the same code is giving Output for all subjects when I write into PDF , That's the reason I did n't try to update the code. Please help me to understand what is the difference here between PDF &amp;amp; RTF in this case.</description>
      <pubDate>Fri, 05 Oct 2018 08:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501782#M133837</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2018-10-05T08:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF not giving Output in a loop for all subjects</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501783#M133838</link>
      <description>Thanks RW9.&lt;BR /&gt;&lt;BR /&gt;I completely agree with what you said, I just wrote in Urgency. Going forward, I will definitely post all details .&lt;BR /&gt;&lt;BR /&gt;Thanks for your support.</description>
      <pubDate>Fri, 05 Oct 2018 08:53:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501783#M133838</guid>
      <dc:creator>Hari2</dc:creator>
      <dc:date>2018-10-05T08:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: ODS RTF not giving Output in a loop for all subjects</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501787#M133840</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127753"&gt;@Hari2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; : Thank you So much. Its giving Output for all now. It is simple issue but Wasted my time for Long time.&lt;BR /&gt;&lt;BR /&gt;But just a clarification, the same code is giving Output for all subjects when I write into PDF , That's the reason I did n't try to update the code. Please help me to understand what is the difference here between PDF &amp;amp; RTF in this case.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It might be because pdf is one of the so-called "Printer" destinations (means it writes to a stream that can pre-exist), while rtf is file-oriented from the beginning.&lt;/P&gt;
&lt;P&gt;See &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=odsug&amp;amp;docsetTarget=p1n357e2fq6kjkn1ijsu3w97lxl1.htm&amp;amp;locale=en#n1mw978jzyat52n1bkdv9dvo4zoa" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=odsug&amp;amp;docsetTarget=p1n357e2fq6kjkn1ijsu3w97lxl1.htm&amp;amp;locale=en#n1mw978jzyat52n1bkdv9dvo4zoa&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 09:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-RTF-not-giving-Output-in-a-loop-for-all-subjects/m-p/501787#M133840</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-05T09:09:45Z</dc:date>
    </item>
  </channel>
</rss>

