<?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: Piping output listing to log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412060#M100751</link>
    <description>&lt;P&gt;No, but... I forgot about Jupyter..&amp;nbsp; and OOHH... it is now supported on Windows!&amp;nbsp; I didn't know this!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2017 18:20:46 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2017-11-09T18:20:46Z</dc:date>
    <item>
      <title>Piping output listing to log in batch mode</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/411985#M100724</link>
      <description>&lt;P&gt;Can listings output be redirected to the log?&amp;nbsp; Using batch mode, without redirecting the log to another file, without passing arguments to SAS regarding current directory or command line arguments to mimic normal batch mode log file placement&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2017 13:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/411985#M100724</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2017-11-14T13:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412018#M100733</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the PROC PRINTTO documentation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146809.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000146809.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE cellspacing="2" cellpadding="4"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Tip:&lt;/TD&gt;&lt;TD&gt;To route the SAS log and procedure output to the same file, specify the same file with both the LOG= and PRINT= options.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 09 Nov 2017 16:53:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412018#M100733</guid>
      <dc:creator>JohnHoughton</dc:creator>
      <dc:date>2017-11-09T16:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412033#M100737</link>
      <description>&lt;P&gt;Jupyter notebooks puts everything in one place if that's what you're trying to accomplish.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 17:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412033#M100737</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-09T17:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412060#M100751</link>
      <description>&lt;P&gt;No, but... I forgot about Jupyter..&amp;nbsp; and OOHH... it is now supported on Windows!&amp;nbsp; I didn't know this!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 18:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412060#M100751</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2017-11-09T18:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412062#M100753</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto print=log; run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;doesn't work.&amp;nbsp; (thanks)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 18:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412062#M100753</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2017-11-09T18:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412067#M100757</link>
      <description>&lt;P&gt;If you route it to a file it does?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename output 'c:\_localdata\temp\test.txt';
proc printto print=output log=output; run;

proc means data=sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Nov 2017 18:28:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412067#M100757</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-09T18:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412073#M100759</link>
      <description>&lt;P&gt;True,&amp;nbsp;but ....&amp;nbsp;yuck.&amp;nbsp; adding to the question:&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;"Using batch mode, without passing arguments to SAS regarding current directory or command line arguments."&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 18:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412073#M100759</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2017-11-09T18:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412097#M100768</link>
      <description>&lt;P&gt;Naive question...doesn't batch generate a separate log file by default? Wouldn't set PROC PRINTTO within the batch process direct it to a separate file anyways?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 19:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/412097#M100768</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-09T19:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Piping output listing to log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/413020#M101047</link>
      <description>&lt;P&gt;Ok Reeza, yes.&amp;nbsp; Because you asked that question like that, made me think outside the box, so then I just went and solved my own problem.&amp;nbsp; Thanks for the inspiration.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SAS Code:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL outobs=1 noprint;
   SELECT t1.fileref
     INTO :LOG_FILEREF
     FROM SASHELP.VEXTFL t1
       where t1.xpath like '%.log%';
QUIT;

%put NOTE: LOG_FILEREF=&amp;amp;LOG_FILEREF;

proc printto print=&amp;amp;LOG_FILEREF; run;

proc print data=SASHELP.cars (obs=3);
  var _ALL_;
run;

PROC SQL;
   SELECT t1.fileref, 
          t1.xpath, 
          t1.xengine, 
          t1.modate
      FROM SASHELP.VEXTFL t1;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Producing output log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;NOTE: AUTOEXEC processing completed.

 

1          PROC SQL outobs=1 noprint;
2             SELECT t1.fileref
3               INTO :LOG_FILEREF
4               FROM SASHELP.VEXTFL t1
5                 where t1.xpath like '%.log%';
6          QUIT;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.04 seconds
      cpu time            0.01 seconds
     

SYMBOLGEN:  Macro variable LOG_FILEREF resolves to #LN00003
7         
8          %put NOTE: LOG_FILEREF=&amp;amp;LOG_FILEREF;
&amp;#12;3                                         The SAS System           14:45 Monday, November 13, 2017

NOTE: LOG_FILEREF=#LN00003
9         
10         proc printto print=&amp;amp;LOG_FILEREF; run;
SYMBOLGEN:  Macro variable LOG_FILEREF resolves to #LN00003

NOTE: PROCEDURE PRINTTO used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
     

11        
12         proc print data=SASHELP.cars (obs=3);
13           var _ALL_;
14         run;

&amp;#12;                                          The SAS System       14:45 Monday, November 13, 2017   1

                                                                               M
                                           D                      E     H      P
                                           r                      n  C  o      G       W
                                           i                      g  y  r   M  _       h
                                           v                I     i  l  s   P  H       e
                                     O     e                n     n  i  e   G  i   W   e   L
                     M               r     T                v     e  n  p   _  g   e   l   e
           M         o          T    i     r       M        o     S  d  o   C  h   i   b   n
      O    a         d          y    g     a       S        i     i  e  w   i  w   g   a   g
      b    k         e          p    i     i       R        c     z  r  e   t  a   h   s   t
      s    e         l          e    n     n       P        e     e  s  r   y  y   t   e   h

       1 Acura MDX            SUV   Asia All    $36,945  $33,337 3.5 6 265 17 23 4451 106 189
       2 Acura RSX Type S 2dr Sedan Asia Front  $23,820  $21,761 2.0 4 200 24 31 2778 101 172
       3 Acura TSX 4dr        Sedan Asia Front  $26,990  $24,647 2.4 4 200 22 29 3230 105 183
 
 [...spaces...] 

NOTE: There were 3 observations read from the data set SASHELP.CARS.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds
     

15        
16         *proc printto log=&amp;amp;LOG_FILEREF; run;
17        
18         PROC SQL;
19            SELECT t1.fileref,
20                   t1.xpath,
21                   t1.xengine,
22                   t1.modate
23               FROM SASHELP.VEXTFL t1;
&amp;#12;                                          The SAS System       14:45 Monday, November 13, 2017   2

                                                                        Engine
Fileref   Pathname                                                      Name         Date Modified
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
#LN00003  J:\Files\New Text Document.log                                DISK      13NOV17:14:45:21
#LN00004  J:\Files\New Text Document.lst                                DISK      13NOV17:14:27:32
#LN00005  J:\Files\New Text Document.sas                                DISK      13NOV17:14:45:10
SASAUTO1  \\XXXXXXXXXXXX\admin\SASAUTO1                                 DISK      12OCT16:09:19:00
RLINK     C:\Program                                                    DISK      09OCT17:09:29:22
          Files\SASHome\x86\SASFoundation\9.4\CONNECT\SASLINK\TCPWiN.                            
          SCR                                                                                    
#LN00001  C:\Program Files\SASHome\x86\SASFoundation\9.4\core\sasmsg    DISK      05JUN17:14:39:57
#LN00001  C:\Program                                                    DISK      05JUN17:14:39:57
          Files\SASHome\x86\SASFoundation\9.4\accelmva\sasmsg                                    
#LN00001  C:\Program Files\SASHome\x86\SASFoundation\9.4\access\sasmsg  DISK      05JUN17:14:39:57
#LN00001  C:\Program Files\SASHome\x86\SASFoundation\9.4\cmp\sasmsg     DISK      05JUN17:14:39:57
#LN00001  C:\Program Files\SASHome\x86\SASFoundation\9.4\graph\sasmsg   DISK      05JUN17:14:39:57
#LN00001  C:\Program                                                    DISK      05JUN17:14:39:57
          Files\SASHome\x86\SASFoundation\9.4\spdsclient\sasmsg                                  
#LN00002  C:\Users\xxxxxxxx\SAS\connect-saslink                         DISK      13OCT17:15:24:22
 
 [...spaces...] 
 
 4         QUIT;
NOTE: The PROCEDURE SQL printed page 2.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.06 seconds
      cpu time            0.00 seconds
     

25        
26        

NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414
NOTE: The SAS System used:
      real time           1.52 seconds
      cpu time            0.37 seconds
     &lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Nov 2017 21:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Piping-output-listing-to-log-in-batch-mode/m-p/413020#M101047</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2017-11-13T21:23:49Z</dc:date>
    </item>
  </channel>
</rss>

