<?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: How to know how long does it take for SAS EG or SAS Base to finish a progress? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727652#M226370</link>
    <description>&lt;P&gt;If you want to track the progress of your steps i.e. which one is being executed (and/or taking abnormally longer to run), use the SYSECHO global statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Link:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sasdummy/2009/05/26/tracking-progress-in-sas-programs-in-sas-enterprise-guide/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2009/05/26/tracking-progress-in-sas-programs-in-sas-enterprise-guide/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class (drop=x);
 sysecho "In the first DATA step";
 set sashelp.class;
 x = sleep(1);
run;
 
proc sql;
 sysecho "Creating the first table, OUT";
 create table out as 
    select name,
    /* Calculation */
    (sleep(1)) AS zzzz
    from class where age&amp;gt;14;
 
sysecho "Creating the second table, OUT2";
create table out2 as 
    select name,
    /* Calculation */
    (sleep(1)) AS zzzz
    from class where sex="M" and age&amp;gt;14;
quit;
 
%macro makedata(count);
 %do i = 1 %to &amp;amp;count;
    data outdata&amp;amp;i;
      sysecho "Making data step &amp;amp;i of &amp;amp;count";
      zzz = sleep(3);
  run;
 %end;
%mend;
 
%makedata(5);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Mar 2021 05:47:31 GMT</pubDate>
    <dc:creator>qoit</dc:creator>
    <dc:date>2021-03-19T05:47:31Z</dc:date>
    <item>
      <title>How to know how long does it take for SAS EG or SAS Base to finish a progress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727617#M226341</link>
      <description>&lt;P&gt;Hi all SAS Users,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally, we can see how long does it take SAS EG and SAS Base to finish a code under this code in the LOG. But I am wondering how can we know the total time for SAS to run a set of code rather than manually calculating.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 00:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727617#M226341</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-03-19T00:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to know how long does it take for SAS EG or SAS Base to finish a progress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727618#M226342</link>
      <description>&lt;P&gt;I have EG run these macros automatically when I submit code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro z_eg_pre_run;
  %let syscc=0;
  %global zegt;
  %put %sysfunc(repeat(#,50));
  %put# Run started: %sysfunc(datetime(),datetime20.);
  %let zegt=%sysfunc(datetime());
  %put %sysfunc(repeat(#,50));
%mend;

%macro z_eg_post_run;
  %put %sysfunc(repeat(#,50));
  %let zegt=%sysfunc(datetime())-&amp;amp;zegt;
  %put# Elapse time: %sysfunc(hour(&amp;amp;zegt),z2.)h%sysfunc(minute(&amp;amp;zegt),z2.)m%sysfunc(second(&amp;amp;zegt),z2.)s;
  %put %sysfunc(repeat(#,50));
  %put# Run ended: %sysfunc(datetime(),datetime20.);
  %put# &amp;amp;=syscc &amp;amp;=syserr;
  %if &amp;amp;syscc&amp;gt;4       %then %put# SYSERRORTEXT = %superq(syserrortext);
  %else %if &amp;amp;syscc&amp;gt;0 %then %put# SYSWARNINGTEXT = %superq(syswarningtext);
  %put %sysfunc(repeat(#,50));
%mend; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In the EG options, add that at connection time, and insert the calls before/after submitted code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Mar 2021 01:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727618#M226342</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-19T01:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to know how long does it take for SAS EG or SAS Base to finish a progress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727652#M226370</link>
      <description>&lt;P&gt;If you want to track the progress of your steps i.e. which one is being executed (and/or taking abnormally longer to run), use the SYSECHO global statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Link:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sasdummy/2009/05/26/tracking-progress-in-sas-programs-in-sas-enterprise-guide/" target="_blank"&gt;https://blogs.sas.com/content/sasdummy/2009/05/26/tracking-progress-in-sas-programs-in-sas-enterprise-guide/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class (drop=x);
 sysecho "In the first DATA step";
 set sashelp.class;
 x = sleep(1);
run;
 
proc sql;
 sysecho "Creating the first table, OUT";
 create table out as 
    select name,
    /* Calculation */
    (sleep(1)) AS zzzz
    from class where age&amp;gt;14;
 
sysecho "Creating the second table, OUT2";
create table out2 as 
    select name,
    /* Calculation */
    (sleep(1)) AS zzzz
    from class where sex="M" and age&amp;gt;14;
quit;
 
%macro makedata(count);
 %do i = 1 %to &amp;amp;count;
    data outdata&amp;amp;i;
      sysecho "Making data step &amp;amp;i of &amp;amp;count";
      zzz = sleep(3);
  run;
 %end;
%mend;
 
%makedata(5);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Mar 2021 05:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727652#M226370</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-03-19T05:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to know how long does it take for SAS EG or SAS Base to finish a progress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727948#M226491</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is exactly what I want. I am wondering that is there anything I need to concern about when using this code globally? I set it up as auto exec whenever I open SAS EG already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2021 21:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727948#M226491</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-03-20T21:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to know how long does it take for SAS EG or SAS Base to finish a progress?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727953#M226495</link>
      <description>I can't see why this should cause any issue.&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Mar 2021 22:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-know-how-long-does-it-take-for-SAS-EG-or-SAS-Base-to/m-p/727953#M226495</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-03-20T22:56:31Z</dc:date>
    </item>
  </channel>
</rss>

