<?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 PDF outputs in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-outputs/m-p/4645#M1886</link>
    <description>I am using EG3 to create a large series of graphs of which I only need some.  Rather than 1 complete PDF with all graphs, is there a way I can automate production of these graphs into separate PDF files that have file names generated by the "group by" variables used in the graph code?&lt;BR /&gt;
&lt;BR /&gt;
In essence, I have:&lt;BR /&gt;
 &lt;BR /&gt;
Myfile.pdf&lt;BR /&gt;
   Page 1) Tom graph&lt;BR /&gt;
   Page 2) Rob graph&lt;BR /&gt;
   Page 3) Jan graph&lt;BR /&gt;
&lt;BR /&gt;
but I need:&lt;BR /&gt;
Tom.pdf&lt;BR /&gt;
Rob.pdf&lt;BR /&gt;
Jan.pdf&lt;BR /&gt;
&lt;BR /&gt;
Where Tom, Rob, and Jan are possible values in my Groub By variable.</description>
    <pubDate>Tue, 11 Sep 2007 17:55:58 GMT</pubDate>
    <dc:creator>rab24</dc:creator>
    <dc:date>2007-09-11T17:55:58Z</dc:date>
    <item>
      <title>PDF outputs</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-outputs/m-p/4645#M1886</link>
      <description>I am using EG3 to create a large series of graphs of which I only need some.  Rather than 1 complete PDF with all graphs, is there a way I can automate production of these graphs into separate PDF files that have file names generated by the "group by" variables used in the graph code?&lt;BR /&gt;
&lt;BR /&gt;
In essence, I have:&lt;BR /&gt;
 &lt;BR /&gt;
Myfile.pdf&lt;BR /&gt;
   Page 1) Tom graph&lt;BR /&gt;
   Page 2) Rob graph&lt;BR /&gt;
   Page 3) Jan graph&lt;BR /&gt;
&lt;BR /&gt;
but I need:&lt;BR /&gt;
Tom.pdf&lt;BR /&gt;
Rob.pdf&lt;BR /&gt;
Jan.pdf&lt;BR /&gt;
&lt;BR /&gt;
Where Tom, Rob, and Jan are possible values in my Groub By variable.</description>
      <pubDate>Tue, 11 Sep 2007 17:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-outputs/m-p/4645#M1886</guid>
      <dc:creator>rab24</dc:creator>
      <dc:date>2007-09-11T17:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: PDF outputs</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-outputs/m-p/4646#M1887</link>
      <description>Hi...if you use a code node in EG, you can "sort" of generate the separate PDF files. There's an upside and a downside. The upside is that if you use NEWFILE=BYGROUP, the files get created automatically. The downside is that you can only "sort of" control the name of the file. For example, with the attached code:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc sort data=sashelp.prdsale out=prdsale;&lt;BR /&gt;
by division prodtype;&lt;BR /&gt;
run;&lt;BR /&gt;
   &lt;BR /&gt;
options orientation=landscape topmargin=1in bottommargin=1in &lt;BR /&gt;
        rightmargin=1in leftmargin=1in nodate number pageno=1; &lt;BR /&gt;
run;&lt;BR /&gt;
    &lt;BR /&gt;
ods pdf file="c:\temp\GRFBY1.pdf"  newfile=bygroup;&lt;BR /&gt;
   &lt;BR /&gt;
GOPTIONS reset=all device=actximg;&lt;BR /&gt;
   &lt;BR /&gt;
PROC GCHART DATA=prdsale;&lt;BR /&gt;
title 'The Graph Title';&lt;BR /&gt;
VBAR3D region / SUMVAR=actual&lt;BR /&gt;
  GROUP=product&lt;BR /&gt;
  SHAPE=BLOCK&lt;BR /&gt;
  FRAME TYPE=SUM&lt;BR /&gt;
  PATTERNID=MIDPOINT;&lt;BR /&gt;
BY division prodtype;&lt;BR /&gt;
format actual dollar12.2;&lt;BR /&gt;
RUN; QUIT;&lt;BR /&gt;
    &lt;BR /&gt;
ods _all_ close; &lt;BR /&gt;
title;&lt;BR /&gt;
footnote;&lt;BR /&gt;
ods listing;&lt;BR /&gt;
    &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
If the SAS dataset has 4 BY groups, then the PDF output files will be named: GRFBY1.PDF, GRFBY2.PDF, GRFBY3.PDF, GRFBY4.PDF  -- which means you can control the "beginning" part of the name, but NEWFILE= option wants to number the output files by incrementing the right-most number in the starting file name by 1 for each BYGROUP (in this example). Of course, after the files were created in c:\temp, you could go and issue a RENAME to name them what you wanted.&lt;BR /&gt;
 &lt;BR /&gt;
Your only other alternative would be to "macroize" the program to produce a single BY group -- and then you can control the name of every BY group's file -- when you invoke the macro program for each group. And then you could call the files Tom.PDF, Rob.PDF and Jan.PDF. (or whatever else you wanted). &lt;BR /&gt;
 &lt;BR /&gt;
Good luck!&lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 12 Sep 2007 06:42:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PDF-outputs/m-p/4646#M1887</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-12T06:42:09Z</dc:date>
    </item>
  </channel>
</rss>

