<?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: Resume ods pdf in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589405#M23276</link>
    <description>&lt;P&gt;Unfortunately in these cases you cannot use BY group processing, you need macro logic or automatic code generation of some kind.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a tutorial on how to do this here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have questions or feedback please let me know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I highly recommend following the code in the tutorial first and then doing yours step by step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274971"&gt;@CarlosP73&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm creating a .pdf document which consists of several outputs gruped by a "group by" and I need the reporting for each group to be in a single file, i.e. all output in group=1 in the same file and the same for the rest of the groups. I don't know how to gather all output from different proc's but the same group in the same pdf. I am now getting a different .pdf per proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Input table creation*/&lt;/P&gt;
&lt;P&gt;data tas;&lt;/P&gt;
&lt;P&gt;drop div;&lt;BR /&gt;do group_var=1,2;&lt;BR /&gt;if group_var=1 then do;&lt;BR /&gt;div=4;alp=0.05;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;div=0.5;alp=0.01;&lt;BR /&gt;end;&lt;BR /&gt;do x=1 to 3;&lt;BR /&gt;y=x+ranuni(3)/div;output;&lt;BR /&gt;y=x+ranuni(3)/div;output;&lt;BR /&gt;end;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Reporting*/&lt;/P&gt;
&lt;P&gt;%let pdfFile=...\pruebaRep.pdf;&lt;BR /&gt;ods listing off;&lt;BR /&gt;ods pdf file="&amp;amp;pdfFile." newfile=bygroup;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc corr data=tas;&lt;BR /&gt;var x y;&lt;BR /&gt;BY GROUP_VAR;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sgplot data=tas;&lt;BR /&gt;scatter x=x y=y / markerattrs=(symbol=circle size=2 mm);&lt;BR /&gt;BY GROUP_VAR;&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;ods listing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2019 15:56:30 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-09-17T15:56:30Z</dc:date>
    <item>
      <title>Resume ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589396#M23275</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a .pdf document which consists of several outputs gruped by a "group by" and I need the reporting for each group to be in a single file, i.e. all output in group=1 in the same file and the same for the rest of the groups. I don't know how to gather all output from different proc's but the same group in the same pdf. I am now getting a different .pdf per proc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Input table creation*/&lt;/P&gt;&lt;P&gt;data tas;&lt;/P&gt;&lt;P&gt;drop div;&lt;BR /&gt;do group_var=1,2;&lt;BR /&gt;if group_var=1 then do;&lt;BR /&gt;div=4;alp=0.05;&lt;/P&gt;&lt;P&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;div=0.5;alp=0.01;&lt;BR /&gt;end;&lt;BR /&gt;do x=1 to 3;&lt;BR /&gt;y=x+ranuni(3)/div;output;&lt;BR /&gt;y=x+ranuni(3)/div;output;&lt;BR /&gt;end;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*Reporting*/&lt;/P&gt;&lt;P&gt;%let pdfFile=...\pruebaRep.pdf;&lt;BR /&gt;ods listing off;&lt;BR /&gt;ods pdf file="&amp;amp;pdfFile." newfile=bygroup;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc corr data=tas;&lt;BR /&gt;var x y;&lt;BR /&gt;BY GROUP_VAR;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=tas;&lt;BR /&gt;scatter x=x y=y / markerattrs=(symbol=circle size=2 mm);&lt;BR /&gt;BY GROUP_VAR;&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;ods listing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 15:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589396#M23275</guid>
      <dc:creator>CarlosP73</dc:creator>
      <dc:date>2019-09-17T15:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Resume ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589405#M23276</link>
      <description>&lt;P&gt;Unfortunately in these cases you cannot use BY group processing, you need macro logic or automatic code generation of some kind.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a tutorial on how to do this here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have questions or feedback please let me know.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I highly recommend following the code in the tutorial first and then doing yours step by step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/274971"&gt;@CarlosP73&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm creating a .pdf document which consists of several outputs gruped by a "group by" and I need the reporting for each group to be in a single file, i.e. all output in group=1 in the same file and the same for the rest of the groups. I don't know how to gather all output from different proc's but the same group in the same pdf. I am now getting a different .pdf per proc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Input table creation*/&lt;/P&gt;
&lt;P&gt;data tas;&lt;/P&gt;
&lt;P&gt;drop div;&lt;BR /&gt;do group_var=1,2;&lt;BR /&gt;if group_var=1 then do;&lt;BR /&gt;div=4;alp=0.05;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;div=0.5;alp=0.01;&lt;BR /&gt;end;&lt;BR /&gt;do x=1 to 3;&lt;BR /&gt;y=x+ranuni(3)/div;output;&lt;BR /&gt;y=x+ranuni(3)/div;output;&lt;BR /&gt;end;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*Reporting*/&lt;/P&gt;
&lt;P&gt;%let pdfFile=...\pruebaRep.pdf;&lt;BR /&gt;ods listing off;&lt;BR /&gt;ods pdf file="&amp;amp;pdfFile." newfile=bygroup;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc corr data=tas;&lt;BR /&gt;var x y;&lt;BR /&gt;BY GROUP_VAR;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc sgplot data=tas;&lt;BR /&gt;scatter x=x y=y / markerattrs=(symbol=circle size=2 mm);&lt;BR /&gt;BY GROUP_VAR;&lt;BR /&gt;run;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;ods listing;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 15:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589405#M23276</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-17T15:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Resume ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589574#M23279</link>
      <description>&lt;P&gt;Hello Reeza,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer. Unfortunately I still cannot find a way, even using macro language, to stop and resume generation of ooutput in an ods pdf within the very same group group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying now is the use of ods pdf(id=) to select or exclude output. The following SAS document can be of help:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.lexjansen.com/nesug/nesug12/gr/gr04.pdf" target="_blank" rel="noopener"&gt;https://www.lexjansen.com/nesug/nesug12/gr/gr04.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code:&lt;/P&gt;&lt;P&gt;data tas;drop div;&lt;BR /&gt;do group_var=1,2;&lt;BR /&gt;if group_var=1 then do;&lt;BR /&gt;div=4;&lt;BR /&gt;alp=0.05;&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;div=0.5;&lt;BR /&gt;alp=0.01;&lt;BR /&gt;end;&lt;BR /&gt;do x=1 to 3;&lt;BR /&gt;y=x+ranuni(3)/div;&lt;BR /&gt;output;&lt;BR /&gt;y=x+ranuni(3)/div;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;filename regoutP1 '...\pruebaRepG1.pdf';&lt;BR /&gt;filename regoutP2 '...\Desktop\pruebaRepG2.pdf';&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;BR /&gt;ods pdf(id=group1) file=regoutP1;&lt;BR /&gt;ods pdf(id=group2) file=regoutP2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods pdf(id=group1) select all;&lt;BR /&gt;ods pdf(id=group2) exclude all;&lt;BR /&gt;proc corr data=tas(where=(group_var=1));&lt;BR /&gt;var x y;&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=tas(where=(group_var=1));&lt;BR /&gt;scatter x=x y=y / markerattrs=(symbol=circle size=2 mm);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods pdf(id=group1) exclude all;&lt;BR /&gt;ods pdf(id=group2) select all;&lt;BR /&gt;proc corr data=tas(where=(group_var=2));&lt;BR /&gt;var x y;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=tas(where=(group_var=2));&lt;BR /&gt;scatter x=x y=y / markerattrs=(symbol=circle size=2 mm);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;BR /&gt;ods listing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 10:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589574#M23279</guid>
      <dc:creator>CarlosP73</dc:creator>
      <dc:date>2019-09-18T10:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Resume ods pdf</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589746#M23282</link>
      <description>Did you follow through my example link or run the last portion at least? It does EXACTLY what you're trying to do here.</description>
      <pubDate>Wed, 18 Sep 2019 17:20:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Resume-ods-pdf/m-p/589746#M23282</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-18T17:20:51Z</dc:date>
    </item>
  </channel>
</rss>

