<?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 Execution Time in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Execution-Time/m-p/143472#M4069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to have SAS compute execution time for a stored process which simply includes a SAS program file. I was able to do this with very simple program but when the program was more complex (includes macros, sql junk, etc) I have problems. SAS for some reason does not create a data file? Also, do stored processes have a macro variable defined for execution time that I can access?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code registered as stored process in metadata follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%global startdatetime;&lt;/P&gt;&lt;P&gt;%global executeSAStime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let startdatetime= %sysfunc(datetime());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;startdatetime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%STPBEGIN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "C:\code\goes\here.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;startdatetime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let executeSAStime= %sysfunc(round(%sysevalf(%sysfunc(datetime())-&amp;amp;startdatetime),0.01));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;executeSAStime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let rc=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "D:\SAS\users\jchapman1\test\append.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%STPEND;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The append program creates a dataset and appends it to a sql database. However, the datastep used does not seem to be making the dataset for the complex program while it does for the simple one. Very confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;400 +%put &amp;amp;_METAUSER;&lt;/P&gt;&lt;P&gt;thisisme@safdasdf&lt;/P&gt;&lt;P&gt;401 +%put &amp;amp;_username;&lt;/P&gt;&lt;P&gt;Test User&lt;/P&gt;&lt;P&gt;402 +%put &amp;amp;_program;&lt;/P&gt;&lt;P&gt;/Shared Data/StoredProcName&lt;/P&gt;&lt;P&gt;403 +%put &amp;amp;startdatetime;&lt;/P&gt;&lt;P&gt;1726172330.329&lt;/P&gt;&lt;P&gt;404 +%put &amp;amp;executeSAStime;&lt;/P&gt;&lt;P&gt;176.38&lt;/P&gt;&lt;P&gt;405 +%put &amp;amp;rc;&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;406 +&lt;/P&gt;&lt;P&gt;407 +*create dataset;&lt;/P&gt;&lt;P&gt;408 +data newtempfile;&lt;/P&gt;&lt;P&gt;409 +length client username $16. Program $30. datetime exectime rc 8. ;&lt;/P&gt;&lt;P&gt;410 +client="&amp;amp;_METAUSER.";&lt;/P&gt;&lt;P&gt;411 +username="&amp;amp;_username.";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;412 +program="&amp;amp;_program.";&lt;/P&gt;&lt;P&gt;413 +datetime=&amp;amp;startdatetime.;&lt;/P&gt;&lt;P&gt;414 +exectime=&amp;amp;executeSAStime.;&lt;/P&gt;&lt;P&gt;415 +rc=&amp;amp;rc.;&lt;/P&gt;&lt;P&gt;416 +run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;&lt;BR /&gt;NOTE: The data set WORK.NEWTEMPFILE has 0 observations and 6 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp; real time 0.00 seconds&lt;BR /&gt;&amp;nbsp; cpu time 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;&lt;SPAN style="color: #000000;"&gt;Please help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Sep 2014 00:24:03 GMT</pubDate>
    <dc:creator>Jchapman</dc:creator>
    <dc:date>2014-09-13T00:24:03Z</dc:date>
    <item>
      <title>Execution Time</title>
      <link>https://communities.sas.com/t5/Developers/Execution-Time/m-p/143472#M4069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to have SAS compute execution time for a stored process which simply includes a SAS program file. I was able to do this with very simple program but when the program was more complex (includes macros, sql junk, etc) I have problems. SAS for some reason does not create a data file? Also, do stored processes have a macro variable defined for execution time that I can access?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code registered as stored process in metadata follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%global startdatetime;&lt;/P&gt;&lt;P&gt;%global executeSAStime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let startdatetime= %sysfunc(datetime());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;startdatetime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%STPBEGIN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "C:\code\goes\here.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;startdatetime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let executeSAStime= %sysfunc(round(%sysevalf(%sysfunc(datetime())-&amp;amp;startdatetime),0.01));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;executeSAStime;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let rc=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include "D:\SAS\users\jchapman1\test\append.sas";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%STPEND;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The append program creates a dataset and appends it to a sql database. However, the datastep used does not seem to be making the dataset for the complex program while it does for the simple one. Very confusing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;400 +%put &amp;amp;_METAUSER;&lt;/P&gt;&lt;P&gt;thisisme@safdasdf&lt;/P&gt;&lt;P&gt;401 +%put &amp;amp;_username;&lt;/P&gt;&lt;P&gt;Test User&lt;/P&gt;&lt;P&gt;402 +%put &amp;amp;_program;&lt;/P&gt;&lt;P&gt;/Shared Data/StoredProcName&lt;/P&gt;&lt;P&gt;403 +%put &amp;amp;startdatetime;&lt;/P&gt;&lt;P&gt;1726172330.329&lt;/P&gt;&lt;P&gt;404 +%put &amp;amp;executeSAStime;&lt;/P&gt;&lt;P&gt;176.38&lt;/P&gt;&lt;P&gt;405 +%put &amp;amp;rc;&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;406 +&lt;/P&gt;&lt;P&gt;407 +*create dataset;&lt;/P&gt;&lt;P&gt;408 +data newtempfile;&lt;/P&gt;&lt;P&gt;409 +length client username $16. Program $30. datetime exectime rc 8. ;&lt;/P&gt;&lt;P&gt;410 +client="&amp;amp;_METAUSER.";&lt;/P&gt;&lt;P&gt;411 +username="&amp;amp;_username.";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;412 +program="&amp;amp;_program.";&lt;/P&gt;&lt;P&gt;413 +datetime=&amp;amp;startdatetime.;&lt;/P&gt;&lt;P&gt;414 +exectime=&amp;amp;executeSAStime.;&lt;/P&gt;&lt;P&gt;415 +rc=&amp;amp;rc.;&lt;/P&gt;&lt;P&gt;416 +run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;&lt;BR /&gt;NOTE: The data set WORK.NEWTEMPFILE has 0 observations and 6 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;&amp;nbsp; real time 0.00 seconds&lt;BR /&gt;&amp;nbsp; cpu time 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;&lt;SPAN style="color: #000000;"&gt;Please help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 00:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Execution-Time/m-p/143472#M4069</guid>
      <dc:creator>Jchapman</dc:creator>
      <dc:date>2014-09-13T00:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Execution Time</title>
      <link>https://communities.sas.com/t5/Developers/Execution-Time/m-p/143473#M4070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what you are trying to do is standard part of ARM.&lt;BR /&gt;The log4j is a well known interface. APM and Eventmananager are build on top of this. When activated ill you are trying to build is already there.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/armref/62980/HTML/default/viewer.htm#n1x1n1iiwv8l6jn199yr79iaud8m.htm"&gt;http://support.sas.com/documentation/cdl/en/armref/62980/HTML/default/viewer.htm#n1x1n1iiwv8l6jn199yr79iaud8m.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 05:56:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Execution-Time/m-p/143473#M4070</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-13T05:56:52Z</dc:date>
    </item>
  </channel>
</rss>

