<?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 Using SCL file functions to File Print to ODS PDF in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-SCL-file-functions-to-File-Print-to-ODS-PDF/m-p/761#M353</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some text that I want to print to a PDF using file functions in SCL. The text is the contents of a  list box in a SAS/AF app. Extracting the text is no problem, but getting the filename statements right is. &lt;BR /&gt;
&lt;BR /&gt;
Has anyone done this before?&lt;BR /&gt;
&lt;BR /&gt;
The code I use logs a message:&lt;BR /&gt;
&lt;B&gt;WARNING: FILENAME statement syntax for PRINTER devices has changed.&lt;BR /&gt;
 The physical name "PDF" associated with logical name MYPRTR&lt;BR /&gt;
 is not a valid printer name.  The default printer will be&lt;BR /&gt;
 used, with output redirected to the file "PDF".&lt;BR /&gt;
sysmsg=FL_PrintFID=1000&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
And the PDF generated is empty.&lt;BR /&gt;
&lt;BR /&gt;
Code is along the lines of:&lt;BR /&gt;
&lt;BR /&gt;
submit continue;&lt;BR /&gt;
ods results off;&lt;BR /&gt;
ods pdf file="D:\SAS\V9Data\Report_F0138340.pdf" style=ABCLargePDF;&lt;BR /&gt;
endsubmit;&lt;BR /&gt;
&lt;BR /&gt;
rc=filename("MyPrtr",'PDF',"PRINTER");&lt;BR /&gt;
                    sysmsg=sysmsg();&lt;BR /&gt;
                    put 'filename statement' sysmsg= rc=;&lt;BR /&gt;
&lt;BR /&gt;
                    FL_PrintFID=fopen("MyPRTR",'o');&lt;BR /&gt;
                    sysmsg=sysmsg();&lt;BR /&gt;
                    put sysmsg= FL_PrintFID=;&lt;BR /&gt;
&lt;BR /&gt;
                    if (FL_PrintFID&amp;gt;0) then&lt;BR /&gt;
                    do;&lt;BR /&gt;
                        do x = 1 to lbListbox.rows;&lt;BR /&gt;
                            lbListbox._getText( x, RowText );&lt;BR /&gt;
put x= rowtext=;&lt;BR /&gt;
                            rc=fput(FL_SetInitFID,trim(RowText),200);&lt;BR /&gt;
                            rc=fwrite(FL_SetInitFID);&lt;BR /&gt;
                        end;&lt;BR /&gt;
&lt;BR /&gt;
                        rc=fclose(FL_PrintFID);&lt;BR /&gt;
                    end;&lt;BR /&gt;
&lt;BR /&gt;
                    *deallocate filename;&lt;BR /&gt;
                    rc=filename("MyPrtr",' ');&lt;BR /&gt;
&lt;BR /&gt;
       submit continue;&lt;BR /&gt;
         ods PDF close;&lt;BR /&gt;
       endsubmit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: 6 at May 31, 2006 7:07 PM

&lt;BR /&gt;
Message was edited by: 6 at May 31, 2006 7:07 PM&lt;BR /&gt;</description>
    <pubDate>Wed, 31 May 2006 23:07:05 GMT</pubDate>
    <dc:creator>MarkBodt_NZ</dc:creator>
    <dc:date>2006-05-31T23:07:05Z</dc:date>
    <item>
      <title>Using SCL file functions to File Print to ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-SCL-file-functions-to-File-Print-to-ODS-PDF/m-p/761#M353</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some text that I want to print to a PDF using file functions in SCL. The text is the contents of a  list box in a SAS/AF app. Extracting the text is no problem, but getting the filename statements right is. &lt;BR /&gt;
&lt;BR /&gt;
Has anyone done this before?&lt;BR /&gt;
&lt;BR /&gt;
The code I use logs a message:&lt;BR /&gt;
&lt;B&gt;WARNING: FILENAME statement syntax for PRINTER devices has changed.&lt;BR /&gt;
 The physical name "PDF" associated with logical name MYPRTR&lt;BR /&gt;
 is not a valid printer name.  The default printer will be&lt;BR /&gt;
 used, with output redirected to the file "PDF".&lt;BR /&gt;
sysmsg=FL_PrintFID=1000&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
And the PDF generated is empty.&lt;BR /&gt;
&lt;BR /&gt;
Code is along the lines of:&lt;BR /&gt;
&lt;BR /&gt;
submit continue;&lt;BR /&gt;
ods results off;&lt;BR /&gt;
ods pdf file="D:\SAS\V9Data\Report_F0138340.pdf" style=ABCLargePDF;&lt;BR /&gt;
endsubmit;&lt;BR /&gt;
&lt;BR /&gt;
rc=filename("MyPrtr",'PDF',"PRINTER");&lt;BR /&gt;
                    sysmsg=sysmsg();&lt;BR /&gt;
                    put 'filename statement' sysmsg= rc=;&lt;BR /&gt;
&lt;BR /&gt;
                    FL_PrintFID=fopen("MyPRTR",'o');&lt;BR /&gt;
                    sysmsg=sysmsg();&lt;BR /&gt;
                    put sysmsg= FL_PrintFID=;&lt;BR /&gt;
&lt;BR /&gt;
                    if (FL_PrintFID&amp;gt;0) then&lt;BR /&gt;
                    do;&lt;BR /&gt;
                        do x = 1 to lbListbox.rows;&lt;BR /&gt;
                            lbListbox._getText( x, RowText );&lt;BR /&gt;
put x= rowtext=;&lt;BR /&gt;
                            rc=fput(FL_SetInitFID,trim(RowText),200);&lt;BR /&gt;
                            rc=fwrite(FL_SetInitFID);&lt;BR /&gt;
                        end;&lt;BR /&gt;
&lt;BR /&gt;
                        rc=fclose(FL_PrintFID);&lt;BR /&gt;
                    end;&lt;BR /&gt;
&lt;BR /&gt;
                    *deallocate filename;&lt;BR /&gt;
                    rc=filename("MyPrtr",' ');&lt;BR /&gt;
&lt;BR /&gt;
       submit continue;&lt;BR /&gt;
         ods PDF close;&lt;BR /&gt;
       endsubmit;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: 6 at May 31, 2006 7:07 PM

&lt;BR /&gt;
Message was edited by: 6 at May 31, 2006 7:07 PM&lt;BR /&gt;</description>
      <pubDate>Wed, 31 May 2006 23:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-SCL-file-functions-to-File-Print-to-ODS-PDF/m-p/761#M353</guid>
      <dc:creator>MarkBodt_NZ</dc:creator>
      <dc:date>2006-05-31T23:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using SCL file functions to File Print to ODS PDF</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-SCL-file-functions-to-File-Print-to-ODS-PDF/m-p/762#M354</link>
      <description>We have no SCL experts on the Base Reporting/ODS R&amp;amp;D team.  Your best SAS resource is Technical Support; see &lt;A href="http://support.sas.com/techsup/intro.html" target="_blank"&gt;http://support.sas.com/techsup/intro.html&lt;/A&gt; .&lt;BR /&gt;
&lt;BR /&gt;
-- David Kelley, SAS</description>
      <pubDate>Thu, 01 Jun 2006 15:21:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Using-SCL-file-functions-to-File-Print-to-ODS-PDF/m-p/762#M354</guid>
      <dc:creator>David_SAS</dc:creator>
      <dc:date>2006-06-01T15:21:59Z</dc:date>
    </item>
  </channel>
</rss>

