<?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: filename pipe with PC SAS in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66689#M19061</link>
    <description>The enscript works the same under both unix and windows. I also test other programs with SAS, for example, using &lt;BR /&gt;
&lt;BR /&gt;
filename hts pipe 'cat &amp;gt; test.lst';&lt;BR /&gt;
&lt;BR /&gt;
then redirect output to hts. With PC SAS it output a page break '0C'x at the beginning while with unix SAS it does not. So I guess it may be a problem related to SAS pipe device?</description>
    <pubDate>Fri, 19 Dec 2008 13:47:01 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-12-19T13:47:01Z</dc:date>
    <item>
      <title>filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66687#M19059</link>
      <description>I have using pipe to redirect sas output and generate ps files. however,  the same codes got different result in Unix and Windows platform. below is an example:&lt;BR /&gt;
&lt;BR /&gt;
********************************;&lt;BR /&gt;
filename hts pipe 'enscript -c -q -p test.ps';&lt;BR /&gt;
proc printto print=hts new; &lt;BR /&gt;
run; &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run; &lt;BR /&gt;
proc printto;&lt;BR /&gt;
run; &lt;BR /&gt;
********************************;&lt;BR /&gt;
In Unix, it generate the correct ps file. but in Windows, the first page of the generated ps file is blank and the real output is shown on the second page.  It seems related to pipe device because the same code got different result &lt;BR /&gt;
between Unix and Windows. Under Windows, PC SAS first write a new page to pipe? Does anyone know how to correct it?  Thanks!</description>
      <pubDate>Thu, 18 Dec 2008 22:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66687#M19059</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-18T22:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66688#M19060</link>
      <description>I'm not so sure that it is SAS that behaves differently on different platform. It could be the encript application as well that behaves differently between platforms. Have you tested it with other applications than SAS?&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Fri, 19 Dec 2008 08:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66688#M19060</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-12-19T08:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66689#M19061</link>
      <description>The enscript works the same under both unix and windows. I also test other programs with SAS, for example, using &lt;BR /&gt;
&lt;BR /&gt;
filename hts pipe 'cat &amp;gt; test.lst';&lt;BR /&gt;
&lt;BR /&gt;
then redirect output to hts. With PC SAS it output a page break '0C'x at the beginning while with unix SAS it does not. So I guess it may be a problem related to SAS pipe device?</description>
      <pubDate>Fri, 19 Dec 2008 13:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66689#M19061</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-19T13:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66690#M19062</link>
      <description>Hi:&lt;BR /&gt;
  Indeed, if you read this Tech Support Note, you will see the '0C'x is the "old" Carriage Return character:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/3/396.html" target="_blank"&gt;http://support.sas.com/kb/3/396.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
  PROC PRINTTO is an older proc. If it still follows that old convention of a leading page break ... I don't know whether there's a way around that. That's a question for Tech Support.&lt;BR /&gt;
&lt;BR /&gt;
  However, there is ANOTHER way to create a PS file:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods ps file='testclass.ps';&lt;BR /&gt;
               &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
                   &lt;BR /&gt;
ods ps close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
   &lt;BR /&gt;
Alternately, you could specify:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods printer ps file='testclass2.ps';&lt;BR /&gt;
                  &lt;BR /&gt;
proc print data=sashelp.class;&lt;BR /&gt;
run;&lt;BR /&gt;
             &lt;BR /&gt;
ods printer ps close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                &lt;BR /&gt;
Unless you really want the look of old LISTING window output, you might like the look of this type of Postscript output better.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 19 Dec 2008 14:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66690#M19062</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-19T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66691#M19063</link>
      <description>Thanks Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
I knew the ods way to produce ps file. But, I have my old codes worked well under AIX, and I need using put statement with line pointer, column pointer to create an customized report. It also use enscript to filter / highlight some pattern text in the final report. I have tried using the new ods features with my SAS version 9.1.3, but I found it is hard to create the same kind of report. &lt;BR /&gt;
&lt;BR /&gt;
I am not sure if it is problem of proc printto; I tried using the data step as follows;&lt;BR /&gt;
&lt;BR /&gt;
filename hts pipe 'enscript -c -q -p test.ps';&lt;BR /&gt;
data _null_;&lt;BR /&gt;
    file hts;&lt;BR /&gt;
    set sashelp.class;&lt;BR /&gt;
    put name sex age weight height;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The output is correct and not leading blank page.&lt;BR /&gt;
&lt;BR /&gt;
As for the proc printto, it did not output a leading page break under Unix platform. If the output is a destination other than a pipe device, for example, an disk file: &lt;BR /&gt;
&lt;BR /&gt;
filename hts 'c:\test.lst';&lt;BR /&gt;
proc printto print=hts new;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
it did not output a leading page break, either.&lt;BR /&gt;
&lt;BR /&gt;
So the problem is when using proc printto with a pipe device in PC SAS, it produce a leading blank page. Strange.</description>
      <pubDate>Fri, 19 Dec 2008 16:20:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66691#M19063</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-19T16:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66692#M19064</link>
      <description>Hi:&lt;BR /&gt;
  You might consider opening a track with Tech Support about it. I don't understand enough about operating system differences to know what SAS is doing differently working with the PIPE command. If anyone can figure out the "internals" or see what's happening, it would be Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 19 Dec 2008 16:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66692#M19064</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-19T16:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: filename pipe with PC SAS</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66693#M19065</link>
      <description>Thanks.  I will fill a report to the SAS Tech Support after hoilday.</description>
      <pubDate>Sat, 20 Dec 2008 19:44:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filename-pipe-with-PC-SAS/m-p/66693#M19065</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-20T19:44:11Z</dc:date>
    </item>
  </channel>
</rss>

