<?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: PROC PRINTTO in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19153#M3843</link>
    <description>Thanks.&lt;BR /&gt;
The OP.LOG file is not created,like you suggested I will check with tech support.</description>
    <pubDate>Mon, 10 May 2010 20:54:09 GMT</pubDate>
    <dc:creator>ren2010</dc:creator>
    <dc:date>2010-05-10T20:54:09Z</dc:date>
    <item>
      <title>PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19149#M3839</link>
      <description>I was trying to save my log to a permanent location ,but when i mentioned the libname in the PROC PRINTTO ,i got an error saying INVALID FILE.&lt;BR /&gt;
&lt;BR /&gt;
Here is my code:&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINTTO LOG='S:\DEV\user20\test\op' NEW;&lt;BR /&gt;
RUN;&lt;BR /&gt;
proc contents data=work noprint out=sample;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
PROC PRINTTO PRINT=PRINT LOG=LOG ;&lt;BR /&gt;
RUN;</description>
      <pubDate>Mon, 10 May 2010 17:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19149#M3839</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2010-05-10T17:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19150#M3840</link>
      <description>Hi:&lt;BR /&gt;
  When I point to only a folder location, without a file extension, I get an error message:&lt;BR /&gt;
[pre]&lt;BR /&gt;
222  PROC PRINTTO LOG='c:\temp\output' NEW;&lt;BR /&gt;
223  RUN;&lt;BR /&gt;
                        &lt;BR /&gt;
ERROR: Invalid file, c:\temp\output.&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                   &lt;BR /&gt;
That's because PROC PRINTTO is expecting a FILENAME and FILE EXTENSION, as shown below:&lt;BR /&gt;
[pre]&lt;BR /&gt;
PROC PRINTTO LOG='c:\temp\contents1.log' NEW;&lt;BR /&gt;
RUN;&lt;BR /&gt;
   &lt;BR /&gt;
proc contents data=work._all_ noprint out=sample1;&lt;BR /&gt;
run;&lt;BR /&gt;
                &lt;BR /&gt;
PROC PRINTTO PRINT=PRINT LOG=LOG ;&lt;BR /&gt;
RUN; &lt;BR /&gt;
                    &lt;BR /&gt;
filename c2 'c:\temp\contents2.log';&lt;BR /&gt;
PROC PRINTTO LOG=c2 NEW;&lt;BR /&gt;
RUN;&lt;BR /&gt;
         &lt;BR /&gt;
proc contents data=work._all_ noprint out=sample2;&lt;BR /&gt;
run;&lt;BR /&gt;
    &lt;BR /&gt;
PROC PRINTTO PRINT=PRINT LOG=LOG ;&lt;BR /&gt;
RUN; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
In addition, PROC CONTENTS expects a 2 level name either to a specific SAS dataset or the use of _ALL_ to indicate you want to see all the datasets in a SAS library.:&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc contents data=work.mydata;  /* specific dataset */&lt;BR /&gt;
proc contents data=work._all_;     /* ALL work datasets */&lt;BR /&gt;
proc contents data=sashelp.class;  /* specific dataset */&lt;BR /&gt;
proc contents data=sashelp._all_;   /* ALL SASHELP datasets */&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                          &lt;BR /&gt;
So it looks to me like you potentially have one or two possible issues.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 10 May 2010 19:48:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19150#M3840</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-10T19:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19151#M3841</link>
      <description>Thanks Cynthia.&lt;BR /&gt;
I created a folder 'OP' in and mentioned that folder name with .log extention in my code.This time i did not get any errors,but when i checked the folder to see the .log  file,I did no see anything.Please advise. &lt;BR /&gt;
&lt;BR /&gt;
sample code:&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINTTO LOG='S:\DEV\User20\op.log' NEW;RUN; &lt;BR /&gt;
proc contents data=work._all_ noprint out=sample1;run;  &lt;BR /&gt;
PROC PRINTTO LOG=LOG ;RUN;</description>
      <pubDate>Mon, 10 May 2010 20:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19151#M3841</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2010-05-10T20:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19152#M3842</link>
      <description>Hi:&lt;BR /&gt;
  I'm confused. What do you expect to see??? You should see a message in the PRINTTO log output file that:&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: The data set WORK.SAMPLE1 has xx observations and yy variables.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
and then you should also see the LOG messages from RUNNING the PROC CONTENTS, but there won't really be much here.&lt;BR /&gt;
                             &lt;BR /&gt;
you will see in the output file WHATEVER you would normally see in the SAS log. So when I run this code,&lt;BR /&gt;
[pre]&lt;BR /&gt;
PROC PRINTTO LOG='c:\temp\contents1.log' NEW;&lt;BR /&gt;
RUN;&lt;BR /&gt;
      &lt;BR /&gt;
proc contents data=work._all_ noprint out=sample1;&lt;BR /&gt;
run;&lt;BR /&gt;
          &lt;BR /&gt;
PROC PRINTTO PRINT=PRINT LOG=LOG ;&lt;BR /&gt;
RUN; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                   &lt;BR /&gt;
I get these results in the file c:\temp\contents1.log:&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: PROCEDURE PRINTTO used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
&lt;BR /&gt;
232  &lt;BR /&gt;
233  proc contents data=work._all_ noprint out=sample1;&lt;BR /&gt;
234  run;&lt;BR /&gt;
                &lt;BR /&gt;
NOTE: The data set WORK.SAMPLE1 has 84 observations and 40 variables.&lt;BR /&gt;
NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;
      real time           0.04 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
              &lt;BR /&gt;
235  &lt;BR /&gt;
236  PROC PRINTTO PRINT=PRINT LOG=LOG ;&lt;BR /&gt;
237  RUN;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
          &lt;BR /&gt;
Now, if you did something like this PROC OPTIONS:&lt;BR /&gt;
[pre]&lt;BR /&gt;
PROC PRINTTO LOG='c:\temp\options.log' NEW;&lt;BR /&gt;
RUN;&lt;BR /&gt;
        &lt;BR /&gt;
proc options;&lt;BR /&gt;
run;&lt;BR /&gt;
             &lt;BR /&gt;
PROC PRINTTO PRINT=PRINT LOG=LOG ;&lt;BR /&gt;
RUN; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
                       &lt;BR /&gt;
THEN, there'd be something to see in the PROC PRINTTO copy of the log(partial results):&lt;BR /&gt;
[pre]&lt;BR /&gt;
NOTE: PROCEDURE PRINTTO used (Total process time):&lt;BR /&gt;
      real time           0.00 seconds&lt;BR /&gt;
      cpu time            0.00 seconds&lt;BR /&gt;
      &lt;BR /&gt;
&lt;BR /&gt;
240  &lt;BR /&gt;
241  proc options;&lt;BR /&gt;
242  run;&lt;BR /&gt;
          &lt;BR /&gt;
    SAS (r) Proprietary Software Release 9.2  TS2M2&lt;BR /&gt;
         &lt;BR /&gt;
Portable Options:&lt;BR /&gt;
          &lt;BR /&gt;
 APPEND=           Append at the end of the option value&lt;BR /&gt;
 APPLETLOC=C:\Program Files\SAS\SASGraphJavaApplets\9.2&lt;BR /&gt;
                   Location of Java applets&lt;BR /&gt;
 ARMAGENT=         ARM Agent to use to collect ARM records&lt;BR /&gt;
 ARMLOC=ARMLOG.LOG Identify location where ARM records are to be written&lt;BR /&gt;
 ARMSUBSYS=(ARM_NONE)&lt;BR /&gt;
                   Enable/Disable ARMing of SAS subsystems&lt;BR /&gt;
 NOASYNCHIO        Do not enable asynchronous input/output&lt;BR /&gt;
 AUTOSAVELOC=      Identifies the location where program editor contents are auto saved&lt;BR /&gt;
 NOAUTOSIGNON      SAS/CONNECT remote submit will not automatically attempt to SIGNON&lt;BR /&gt;
 BINDING=DEFAULT   Controls the binding edge for duplexed output&lt;BR /&gt;
 BOMFILE           Add Byte Order Mark when creating Unicode files&lt;BR /&gt;
 BOTTOMMARGIN=0.000 IN&lt;BR /&gt;
                   Bottom margin for printed output&lt;BR /&gt;
 BUFNO=1           Number of buffers for each SAS data set&lt;BR /&gt;
 BUFSIZE=0         Size of buffer for page of SAS data set&lt;BR /&gt;
[/pre]&lt;BR /&gt;
  &lt;BR /&gt;
If you are saying that you run the code and that the &lt;B&gt;op.log&lt;/B&gt; file is NOT created, at all, then you have a question for Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 10 May 2010 20:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19152#M3842</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-05-10T20:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19153#M3843</link>
      <description>Thanks.&lt;BR /&gt;
The OP.LOG file is not created,like you suggested I will check with tech support.</description>
      <pubDate>Mon, 10 May 2010 20:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19153#M3843</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2010-05-10T20:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19154#M3844</link>
      <description>The reply below from the OP is a bit concerning and possibly a confusion point:&lt;BR /&gt;
&lt;BR /&gt;
"I created a folder 'OP' in and mentioned that folder name with .log extention in my code"&lt;BR /&gt;
&lt;BR /&gt;
Based on the SAS code piece communicated in a prior reply - I would expect to see the file op.log in the directory User20 with "S:\DEV\" directory structure  -- not in a sub-folder "op" under User20, if that is what was created.  Here is the code I saw:&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINTTO LOG='S:\DEV\User20\op.log' NEW;RUN; &lt;BR /&gt;
&lt;BR /&gt;
The information from prior posts is contradictory - possibly after doing some additional desk-checking, then post the exact SAS log where it is executed, rather than just pasting your code.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 10 May 2010 22:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19154#M3844</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-10T22:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19155#M3845</link>
      <description>Thanks SBB.&lt;BR /&gt;
&lt;BR /&gt;
"I would expect to see the file op.log in the directory User20 with "S:\DEV\" directory structure " -&lt;BR /&gt;
To save a log ,do I have to create/save an empty log,so that the PRINTTO prints the log to that log file?</description>
      <pubDate>Tue, 11 May 2010 23:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19155#M3845</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2010-05-11T23:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19156#M3846</link>
      <description>No, the SAS system will create the file if it does not exist.  Try it and see.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 12 May 2010 00:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19156#M3846</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-05-12T00:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC PRINTTO</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19157#M3847</link>
      <description>Thanks SBB,it worked.</description>
      <pubDate>Wed, 12 May 2010 15:09:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-PRINTTO/m-p/19157#M3847</guid>
      <dc:creator>ren2010</dc:creator>
      <dc:date>2010-05-12T15:09:38Z</dc:date>
    </item>
  </channel>
</rss>

