<?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: print into log only result of one step and prevent others information in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515969#M139313</link>
    <description>&lt;P&gt;Use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nomprint;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 26 Nov 2018 13:03:23 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-11-26T13:03:23Z</dc:date>
    <item>
      <title>print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515604#M139148</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to print the&amp;nbsp;table description (here "cars" ) into a log file. my problem is that log file holds more than the script like this"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds"&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;But what I would like to obtain in the log file is :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;create table SASHELP.CARS( label='2004 Car Data' bufsize=16384 )&lt;BR /&gt;&amp;nbsp; (&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Make char(13),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Model char(40),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Type char(8),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Origin char(6),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; DriveTrain char(5),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MSRP num format=DOLLAR8.,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Invoice num format=DOLLAR8.,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; EngineSize num label='Engine Size (L)',&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Cylinders num,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Horsepower num,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MPG_City num label='MPG (City)',&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MPG_Highway num label='MPG (Highway)',&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Weight num label='Weight (LBS)',&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Wheelbase num label='Wheelbase (IN)',&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Length num label='Length (IN)'&lt;BR /&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto log="/home/ldap/mellouna/log_macro_scrip_tables.txt" new; run;




proc sql;

describe table sashelp.cars ;

quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515604#M139148</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-11-23T16:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515606#M139150</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/147725"&gt;@Nasser_DRMCP&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start your program with:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nonotes nosource;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to suppress the unwanted text in the log file.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515606#M139150</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-11-23T16:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515608#M139151</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto log="/home/ldap/mellouna/log_macro_scrip_tables.txt" new; run;

options nostimer;

proc sql nofeedback;

describe table sashelp.cars ;

quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try this&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:48:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515608#M139151</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-11-23T16:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515609#M139152</link>
      <description>&lt;P&gt;Try this. It print as html. You can export it also.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ods html file="test.html";&lt;BR /&gt;proc document name=temp(write);&lt;BR /&gt;import textfile="path\import.sas" to ^;&lt;BR /&gt;replay;&lt;BR /&gt;run;&lt;BR /&gt;ods html close;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515609#M139152</guid>
      <dc:creator>saslove</dc:creator>
      <dc:date>2018-11-23T16:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515946#M139301</link>
      <description>&lt;P&gt;hello r_behata,&lt;/P&gt;&lt;P&gt;thanks for the solution you suggested. I have a subsidiary question.&lt;BR /&gt;I would like to print only creation tables scripts&amp;nbsp; for many tables so I have developed a loop in a maco.&lt;/P&gt;&lt;P&gt;but, in the log, there is still information regarding the execution that I woul like to prevent the print.&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; quit;&lt;BR /&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; Data _null_;&lt;BR /&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; Set t_tables_list(firstobs=2 obs=2);&lt;BR /&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; Call symputx('mv_table_name',memname);&lt;BR /&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;===========&amp;gt; CLASSFIT options nostimer nonotes nosource&lt;BR /&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; proc sql nofeedback ;&lt;BR /&gt;MPRINT(MC_LIBRARY_TABLE_LIST2):&amp;nbsp;&amp;nbsp; describe table SASHELP.CLASSFIT ;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc printto log="/home/ldap/mellouna/log_macro_scrip_tables.txt" new;  run;

%macro mc_library_table_list2(p_lib_name) ;

proc sql;
   create table t_tables_list as
   select memname from dictionary.tables
   where libname="&amp;amp;p_lib_name" and memtype="DATA" and memname like 'CL%';
quit;

data _null_;
if 0 then set work.t_tables_list nobs=n;
call symput('mv_numobs',n);
stop;
run;

%do i=1 %to &amp;amp;mv_numobs;
    Data _null_;
    Set t_tables_list(firstobs=&amp;amp;i obs=&amp;amp;i);
    Call symputx('mv_table_name',memname);
    run;
%put ===========&amp;gt; &amp;amp;mv_table_name
options nostimer nonotes nosource;
proc sql nofeedback ;
  describe table &amp;amp;p_lib_name..&amp;amp;mv_table_name. ;
quit;

%end;

%mend ;

%mc_library_table_list2(p_lib_name=SASHELP) ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 11:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515946#M139301</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-11-26T11:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515969#M139313</link>
      <description>&lt;P&gt;Use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nomprint;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 13:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515969#M139313</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-26T13:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515970#M139314</link>
      <description>&lt;P&gt;thanks a lot PaigeMIler ! perfectly my need !&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 13:07:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515970#M139314</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-11-26T13:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: print into log only result of one step and prevent others information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/516008#M139326</link>
      <description>&lt;P&gt;hi PaigeMiller&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry, but I still need some help.&lt;/P&gt;&lt;P&gt;by&amp;nbsp;specifying "options nomprint", the result is muchbetter but there is still "The SAS System" printed.&lt;/P&gt;&lt;P&gt;thanks a lot in advance&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 15:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/516008#M139326</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-11-26T15:07:57Z</dc:date>
    </item>
  </channel>
</rss>

