<?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: Run only when real time gt 0 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900148#M355757</link>
    <description>&lt;P&gt;Why are you creating a WHERE with invalid data to begin with? That points to a very serious design flaw on your part.&lt;/P&gt;
&lt;P&gt;Look at how you generate the where and fix that.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 14:34:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-10-26T14:34:04Z</dc:date>
    <item>
      <title>Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900130#M355748</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;Is there a way to make SAS run only when real time is greater than 0?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I am asking is because I wrote a macro and it executes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;" proc sgplot data=sashelp.cars;&lt;BR /&gt;vbar type/dataskin=pressed;&lt;BR /&gt;where make="BMW" and cylinders=3;&lt;BR /&gt;run; "&lt;/P&gt;&lt;P&gt;won't run because when make=BMW, cylinders is never equal to 3.&lt;/P&gt;&lt;P&gt;I want SAS to execute only when the where clause is true or when real time is greater than 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 13:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900130#M355748</guid>
      <dc:creator>Reader587</dc:creator>
      <dc:date>2023-10-26T13:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900132#M355749</link>
      <description>&lt;P&gt;Please define "real time".&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 13:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900132#M355749</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-10-26T13:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900133#M355750</link>
      <description>Apart from defining "real time" (like in predicted execution time for the step?), could you describe your requirement, why do you want this logic?&lt;BR /&gt;To be able to understand if your where clause will be true for any records you need to look into the data somehow. If you can't execute your SGPLOT, but ok to run a simple data _null_ step with the same where clause, you can test that outcome and then decide to run the next step by using macro logic, or issue an ENDSAS statement if that's more appropriate,&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Oct 2023 14:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900133#M355750</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2023-10-26T14:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900144#M355755</link>
      <description>&lt;P&gt;Hey Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;You know how there's always a real time and cpu time in the log. I presented an example above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 14:27:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900144#M355755</guid>
      <dc:creator>Reader587</dc:creator>
      <dc:date>2023-10-26T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900147#M355756</link>
      <description>&lt;P&gt;I'm misunderstanding something here. What does real-time gt 0 when running PROC CONTENTS have to do with the case where BMWs don't have 3 cylinders?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 14:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900147#M355756</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-26T14:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900148#M355757</link>
      <description>&lt;P&gt;Why are you creating a WHERE with invalid data to begin with? That points to a very serious design flaw on your part.&lt;/P&gt;
&lt;P&gt;Look at how you generate the where and fix that.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 14:34:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900148#M355757</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-26T14:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900159#M355763</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/401191"&gt;@Reader587&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey Kurt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;You know how there's always a real time and cpu time in the log. I presented an example above.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't know of any way to retrieve that information.&amp;nbsp; But if you need to know how long a step takes then you can remember when it starts and then calculate how long it took.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let startdt = %sysfunc(datetime());
proc contents;
run;
%let duration=%sysevalf(&amp;amp;startdt - %sysfunc(datetime()));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What that has to do with PROC SGPLOT or WHERE statements I have not idea.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 15:39:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900159#M355763</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-26T15:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run only when real time gt 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900170#M355769</link>
      <description>&lt;P&gt;It appears that you are trying to create the plot whenever the WHERE statement actually pulls observations.&amp;nbsp; If so, here's a way to do that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set sashelp.cars;
where make="BMW" and cylinders=3; 
call execute &lt;BR /&gt;('proc sgplot data=sashelp.cars;
  vbar type/dataskin=pressed;
  where make="BMW" and cylinders=3;
  run;'&lt;BR /&gt;);
stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There are other mildly similar ways to go about this as well.&amp;nbsp; If any observations meet the WHERE condition, the DATA step generates a PROC SGPLOT.&amp;nbsp; If no observations meet the WHERE condition, the DATA step generates nothing.&amp;nbsp; Either way, the DATA step ends.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 16:33:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-only-when-real-time-gt-0/m-p/900170#M355769</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-10-26T16:33:12Z</dc:date>
    </item>
  </channel>
</rss>

