<?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: DYNAMICALLY CREATE MULTIPLE PDF FILES in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2867#M1266</link>
    <description>hi oliver,&lt;BR /&gt;
i am using SAS V8.2</description>
    <pubDate>Fri, 20 Apr 2007 09:18:29 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-04-20T09:18:29Z</dc:date>
    <item>
      <title>DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2863#M1262</link>
      <description>can the dynamically created multiple flat files using FILEVAR= option be converted to PDF files?</description>
      <pubDate>Thu, 19 Apr 2007 09:55:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2863#M1262</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-04-19T09:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2864#M1263</link>
      <description>According to the Doc, it says that FILEVAR doesn't work with the FILE PRINT ODS statement:&lt;BR /&gt;
&lt;B&gt;&lt;BR /&gt;
These arguments affect only listing output:&lt;BR /&gt;
FOOTNOTES and NOFOOTNOTES&lt;BR /&gt;
LINESIZE&lt;BR /&gt;
PAGESIZE&lt;BR /&gt;
TITLE and NOTITLES&lt;BR /&gt;
&lt;BR /&gt;
Do not use these arguments:&lt;BR /&gt;
DELIMITER=&lt;BR /&gt;
DSD&lt;BR /&gt;
_FILE_=&lt;BR /&gt;
FILEVAR=&lt;BR /&gt;
HEADER=&lt;BR /&gt;
PAD&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
In a SAS Macro program, you could loop through a list of files, however and either do a PROC PRINT or a FILE PRINT ODS for each one, sending it to the PDF destination.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 20 Apr 2007 00:15:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2864#M1263</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-04-20T00:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2865#M1264</link>
      <description>hi can you please send me the macro code which generates dynamically multiple PDF files?</description>
      <pubDate>Fri, 20 Apr 2007 04:02:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2865#M1264</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-04-20T04:02:01Z</dc:date>
    </item>
    <item>
      <title>Re: DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2866#M1265</link>
      <description>Hi all !&lt;BR /&gt;
I think I have a solution that does not need any macro loops. Just import your files with FILEVAR, retain a variable that says which file you've been reading from, then use that variable in a BY statement in the Print procedure and the NEWFILE=BYGROUP option in the ODS PDF statement.&lt;BR /&gt;
For example :&lt;BR /&gt;
&lt;BR /&gt;
DATA work.ImportedData ;&lt;BR /&gt;
	INPUT file :$40. ;&lt;BR /&gt;
	INFILE MISSOVER DLM = "09"x DSD FILEVAR = file END = finished ;&lt;BR /&gt;
	changePDF = file ;&lt;BR /&gt;
	DO WHILE (NOT FINISHED) ;&lt;BR /&gt;
		INPUT country :$30. year month :$10. product :$30. actual :dollar12.2 predict :dollar12.2 ;&lt;BR /&gt;
		OUTPUT ;&lt;BR /&gt;
	END ;&lt;BR /&gt;
CARDS ;&lt;BR /&gt;
c:\temp\sales2.txt&lt;BR /&gt;
c:\temp\sales3.txt&lt;BR /&gt;
RUN ;&lt;BR /&gt;
ODS PDF FILE = "c:\temp\sales2.pdf" NEWFILE = BYGROUP ;&lt;BR /&gt;
OPTION NOBYLINE ;&lt;BR /&gt;
TITLE ;&lt;BR /&gt;
PROC PRINT DATA = work.importedData LABEL NOOBS ;&lt;BR /&gt;
	VAR country year month product actual predict ;&lt;BR /&gt;
	BY changePDF ;&lt;BR /&gt;
RUN ;&lt;BR /&gt;
OPTION BYLINE ;&lt;BR /&gt;
ODS PDF CLOSE ;&lt;BR /&gt;
&lt;BR /&gt;
Regards.&lt;BR /&gt;
Olivier</description>
      <pubDate>Fri, 20 Apr 2007 08:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2866#M1265</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-04-20T08:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2867#M1266</link>
      <description>hi oliver,&lt;BR /&gt;
i am using SAS V8.2</description>
      <pubDate>Fri, 20 Apr 2007 09:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2867#M1266</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-04-20T09:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2868#M1267</link>
      <description>Then you don't have any STARTPAGE option in ODS PDF ? (I don't remember well what it was like in 8.2.)</description>
      <pubDate>Fri, 20 Apr 2007 13:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2868#M1267</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-04-20T13:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: DYNAMICALLY CREATE MULTIPLE PDF FILES</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2869#M1268</link>
      <description>I think that NEWFILE= did not work for PDF in SAS 8.2 -- but, the general approach that Olivier outlined should still work for you. If you have a variable that identifies which file your information came from, then you could treat that variable as the "BY" variable.&lt;BR /&gt;
    &lt;BR /&gt;
The macro program would be something like what is shown below. It would have to be adjusted for your variables and data values.&lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
*** the code;&lt;BR /&gt;
%macro doby(byval=xxxxx);&lt;BR /&gt;
  ods pdf file="&amp;amp;byval..pdf";&lt;BR /&gt;
    proc print data=big_dsn;&lt;BR /&gt;
      where dsnvar = "&amp;amp;byval";&lt;BR /&gt;
    run;&lt;BR /&gt;
  ods pdf close;&lt;BR /&gt;
%mend doby;&lt;BR /&gt;
&lt;BR /&gt;
%doby(byval=Asia);&lt;BR /&gt;
%doby(byval=Pacific);&lt;BR /&gt;
%doby(byval=Canada);[/pre]</description>
      <pubDate>Fri, 20 Apr 2007 14:16:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/DYNAMICALLY-CREATE-MULTIPLE-PDF-FILES/m-p/2869#M1268</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-04-20T14:16:07Z</dc:date>
    </item>
  </channel>
</rss>

