<?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/515968#M139312</link>
    <description>&lt;P&gt;No need to ask the question twice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All replies should go in your other thread at&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515604#M139148" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515604#M139148&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2018 13:02:56 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-11-26T13:02:56Z</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/515967#M139311</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;my objectif is to print the creation tables scripts of these 3 tables but only the script and prevent the print of any others kind of information in the log file. by launching this macro I get the script but the information below as well.&lt;/P&gt;&lt;P&gt;thanks a lot in adavnce.&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;
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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;</description>
      <pubDate>Mon, 26 Nov 2018 12:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515967#M139311</guid>
      <dc:creator>Nasser_DRMCP</dc:creator>
      <dc:date>2018-11-26T12:54:50Z</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/515968#M139312</link>
      <description>&lt;P&gt;No need to ask the question twice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All replies should go in your other thread at&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515604#M139148" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515604#M139148&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2018 13:02:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515968#M139312</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-26T13:02:56Z</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/515972#M139316</link>
      <description>&lt;P&gt;If you want the text output of the describe statements, then direct that output to a seperate file, you will always get information about the run to log, you can minimise it, but there will always be feedback.&amp;nbsp; Its really hard to follow your post but simply:&lt;/P&gt;
&lt;PRE&gt;data _null_;
  set sashelp.vtable (where=(libname="&amp;amp;p_lib_name." and substr(memname,1,2)="CL")) end=last;
  if _n_=1 then call execute('proc printto listing="c:/code.txt";run;proc sql;');
  call execute(cats('describe table &amp;amp;p_lib_name..',memname,';'));
  if last then call execute('quit;proc printto listing=listing;run;');
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Nov 2018 13:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/print-into-log-only-result-of-one-step-and-prevent-others/m-p/515972#M139316</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-26T13:09:24Z</dc:date>
    </item>
  </channel>
</rss>

