<?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: Loop is not considering the condition in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136901#M11086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of creating holiday calendars per region you will need to create holiday calendars per country and then based on this data custom intervals per country. Else everything works the same as in the code I've already posted. It's only about applying the logic per country instead of per region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not proposing to create an EMEA_holidays_2014 variable and you would need some looping mechanism for such an approach. I believe the custom interval approach is what you should do - but as said earlier creating all these calendars will be a bit of work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Apr 2014 08:34:40 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2014-04-06T08:34:40Z</dc:date>
    <item>
      <title>Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136873#M11058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below loop to calculate the made &amp;amp; miss metrics however the loop is not considering the 2nd line to check for weekends/holidays. i am getting the results if i change the DATEPART(ORD_ENTRY_DATE) + 3 to DATEPART(ORD_ENTRY_DATE) + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The calculation is if the delivery start date is within 3 business days of order entry date then it is made else it is a miss. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; IF DLVR_STRT_DTS = .&amp;nbsp; THEN C= 'N/A';&lt;/P&gt;&lt;P&gt; ELSE DO;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SELECT (REGION);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; WHEN ('Americas') &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHECK = DATEPART(ORD_ENTRY_DATE) + 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DO WHILE (WEEKDAY(CHECK) IN (1,7) OR INPUT(PUT(CHECK,AMERHOL.),9.) = 1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHECK = CHECK + 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF CHECK &amp;gt;= DATEPART(DLVR_STRT_DTS)&amp;nbsp; THEN C = 'MADE';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C = 'MISS';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136873#M11058</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-07T14:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136874#M11059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you considered using INTCK function with 'WEEKDAY' as interval?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:37:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136874#M11059</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-03-07T14:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136875#M11060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &lt;SPAN style="color: #0000ff;"&gt;intck&lt;/SPAN&gt;&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a020f0;"&gt;'WEEKDAY'&lt;/SPAN&gt;, datepart(ORD_ENTRY_DATE), datepart(DLVR_STRT_DTS))&amp;lt;=3 then C='MADE';&lt;/P&gt;&lt;P&gt;else C='MISS';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 14:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136875#M11060</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2014-03-07T14:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136876#M11061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. It worked &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; . I wanted the calculation of weekdays to consider Amerhol ( American Holidays )&amp;nbsp; as well. Please advise how do i go about it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 08:54:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136876#M11061</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-11T08:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136877#M11062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about doing it the other way around, by counting workdays?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF DLVR_STRT_DTS = .&amp;nbsp; THEN C= 'N/A';&lt;/P&gt;&lt;P&gt;ELSE DO;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SELECT (REGION);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHEN ('Americas') DO;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; check = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do iter_date = DATEPART(ORD_ENTRY_DATE) to DATEPART(DLVR_STRT_DTS);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (WEEKDAY(iter_date) not IN (1,7) and INPUT(PUT(iter_date,AMERHOL.),9.) ne 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; then check = check + 1; * count the actual number of workdays;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF check le 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; THEN C = 'MADE';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE C = 'MISS';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Mar 2014 11:47:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136877#M11062</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-03-11T11:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136878#M11063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kurt. It did not solve my problem. The below has solved my problem to a great extent and i just want to add AMERHOL to the below for the condition to consider weekday &amp;amp; no holiday for MADE. Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &lt;SPAN style="color: #0000ff;"&gt;intck&lt;/SPAN&gt;&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a020f0;"&gt;'WEEKDAY'&lt;/SPAN&gt;, datepart(ORD_ENTRY_DATE), datepart(DLVR_STRT_DTS))&amp;lt;=3 then C='MADE';&lt;/P&gt;&lt;P&gt;else C='MISS';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 10:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136878#M11063</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-14T10:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136879#M11064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below has solved my problem to a great extent and i just want to add AMERHOL to the below for the condition to consider weekday &amp;amp; no holiday for MADE. Please advise.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &lt;SPAN style="color: #0000ff;"&gt;intck&lt;/SPAN&gt;&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a020f0;"&gt;'WEEKDAY'&lt;/SPAN&gt;, datepart(ORD_ENTRY_DATE), datepart(DLVR_STRT_DTS))&amp;lt;=3 then C='MADE';&lt;/P&gt;&lt;P&gt;else C='MISS';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 11:08:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136879#M11064</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-14T11:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136880#M11065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create a custom interval as described here: &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p0syn64amroombn14vrdzksh459w.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p0syn64amroombn14vrdzksh459w.htm"&gt;SAS(R) 9.3 Functions and CALL Routines: Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could get the US holidays right for this custom interval using this code: &lt;A href="http://support.sas.com/kb/24/655.html" title="http://support.sas.com/kb/24/655.html"&gt;24655 - Using SAS to determine dates for U.S. holidays&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you define these intervals as SAS datetime values then you wouldn't even need a datepart() function for your variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most existing out-of-the box intervals have a version for SAS datetime values which starts with DT, eg. DTWEEKDAY&lt;/P&gt;&lt;P&gt;Untested:&lt;/P&gt;&lt;P&gt;if &lt;SPAN style="color: #0000ff;"&gt;intck&lt;/SPAN&gt;&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a020f0;"&gt;'DTWEEKDAY'&lt;/SPAN&gt;, ORD_ENTRY_DATE, DLVR_STRT_DTS)&amp;lt;=3 then C='MADE';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 11:38:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136880#M11065</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-03-14T11:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136881#M11066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you provide some data for testing and the required results, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 12:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136881#M11066</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-03-14T12:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136882#M11067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Please advise how do i share the data file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 12:30:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136882#M11067</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-14T12:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136883#M11068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just give us a data step with some example datalines and the desired results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 12:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136883#M11068</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-03-14T12:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136884#M11069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="726"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="55"&gt;REGION&lt;/TD&gt;&lt;TD class="xl63" width="63"&gt;OE_DATE&lt;/TD&gt;&lt;TD class="xl63" width="182"&gt;ORD_ENTRY_DATE&lt;/TD&gt;&lt;TD class="xl63" width="182"&gt;DLVR_STRT_DTS&lt;/TD&gt;&lt;TD class="xl63" width="115"&gt;DLVR_STRT_DATE&lt;/TD&gt;&lt;TD class="xl63" width="129"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;EMEA&lt;/TD&gt;&lt;TD class="xl64"&gt;3-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;03MAR2014:12:00:06.000000&lt;/TD&gt;&lt;TD class="xl63"&gt;07MAR2014:15:48:33.000000&lt;/TD&gt;&lt;TD class="xl64"&gt;7-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;MISS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;EMEA&lt;/TD&gt;&lt;TD class="xl64"&gt;3-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;03MAR2014:13:10:28.000000&lt;/TD&gt;&lt;TD class="xl63"&gt;07MAR2014:10:29:35.000000&lt;/TD&gt;&lt;TD class="xl64"&gt;7-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;MISS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;EMEA&lt;/TD&gt;&lt;TD class="xl64"&gt;3-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;03MAR2014:14:18:42.000000&lt;/TD&gt;&lt;TD class="xl63"&gt;07MAR2014:06:57:46.000000&lt;/TD&gt;&lt;TD class="xl64"&gt;7-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;MISS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;EMEA&lt;/TD&gt;&lt;TD class="xl64"&gt;3-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;03MAR2014:14:58:54.000000&lt;/TD&gt;&lt;TD class="xl63"&gt;07MAR2014:07:37:04.000000&lt;/TD&gt;&lt;TD class="xl64"&gt;7-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;MISS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;EMEA&lt;/TD&gt;&lt;TD class="xl64"&gt;3-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;03MAR2014:19:27:49.000000&lt;/TD&gt;&lt;TD class="xl63"&gt;07MAR2014:11:38:10.000000&lt;/TD&gt;&lt;TD class="xl64"&gt;7-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;MISS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20"&gt;EMEA&lt;/TD&gt;&lt;TD class="xl64"&gt;3-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;03MAR2014:09:46:08.000000&lt;/TD&gt;&lt;TD class="xl63"&gt;07MAR2014:00:07:29.000000&lt;/TD&gt;&lt;TD class="xl64"&gt;7-Mar-14&lt;/TD&gt;&lt;TD class="xl63"&gt;MISS&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 13:19:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136884#M11069</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-14T13:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136885#M11070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue;"&gt;VALUE&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt; EMEAHOL&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;'04MAR2014'D&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;'06MAR2014'D&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;'21MAR2014'D = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;OTHER=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if &lt;SPAN style="color: #0000ff;"&gt;intck&lt;/SPAN&gt;&lt;SPAN style="color: #66cc66;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a020f0;"&gt;'WEEKDAY'&lt;/SPAN&gt;, datepart(ORD_ENTRY_DATE), datepart(DLVR_STRT_DTS))&amp;lt;=3 then C='MADE';&lt;/P&gt;&lt;P&gt;else C='MISS';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above data set i should get column c as made as 3 business days from order entry date ( excludes order entry date ) should be 5th, 7th, 10th as 4th/6th are holidays &amp;amp; 8th/9th are weekends. Please advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Mar 2014 13:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136885#M11070</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-14T13:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136886#M11071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To write this once more: You can solve this using custom intervals as documented here: &lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p0syn64amroombn14vrdzksh459w.htm"&gt;SAS(R) 9.3 Functions and CALL Routines: Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Example 3: Using Custom Intervals with the INTCK Function&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The following example uses custom intervals in the INTCK function to omit holidays when counting business days:"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here some code variation of what has already been provided in the documentation. Hope that makes it clear for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data weekdays_2014;&lt;BR /&gt;&amp;nbsp; attrib&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begin format=date9.&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; begin=intnx('weekday','01jan2014'd,0,'b');&lt;BR /&gt;&amp;nbsp; do while(year(begin)=2014);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begin=intnx('weekday',begin,1,'b');&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data holidays_2014;&lt;BR /&gt;&amp;nbsp; infile datalines truncover;&lt;BR /&gt;&amp;nbsp; attrib &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; region informat=$8.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; hol_date informat=date9. format=date9.;&lt;BR /&gt;&amp;nbsp; input region hol_date;&lt;BR /&gt;&amp;nbsp; datalines;&lt;BR /&gt;EMEA 01JAN2014&lt;BR /&gt;EMEA 04MAR2014&lt;BR /&gt;EMEA 06MAR2014&lt;BR /&gt;EMEA 21MAR2014&lt;BR /&gt;AMERHOL 01JAN2014&lt;BR /&gt;AMERHOL 20JAN2014&lt;BR /&gt;AMERHOL 17FEB2014&lt;BR /&gt;AMERHOL 09MAR2014&lt;BR /&gt;AMERHOL 26MAY2014&lt;BR /&gt;AMERHOL 04JUL2014&lt;BR /&gt;AMERHOL 01SEP2014&lt;BR /&gt;AMERHOL 13OCT2014&lt;BR /&gt;AMERHOL 02NOV2014&lt;BR /&gt;AMERHOL 04NOV2014&lt;BR /&gt;AMERHOL 11NOV2014&lt;BR /&gt;AMERHOL 27NOV2014&lt;BR /&gt;AMERHOL 25DEC2014&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;&amp;nbsp; create table workdays_emea_2014 as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select begin&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from weekdays_2014 a &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where begin not in (select hol_date from holidays_2014 where region='EMEA')&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; create table workdays_amerhol_2014 as&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; select begin&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; from weekdays_2014 a &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where begin not in (select hol_date from holidays_2014 where region='AMERHOL')&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;options intervalds=(WD_AMERHOL=workdays_amerhol_2014 WD_EMEA=workdays_emea_2014);&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;&amp;nbsp; attrib&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; order_dttm delivery_dttm format=datetime21.&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; order_dttm='01jan2014:14:10:00'dt;&lt;BR /&gt;&amp;nbsp; delivery_dttm='01jan2014:08:35:00'dt;&lt;BR /&gt;&amp;nbsp; do _i=1 to 40;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; order_dttm=intnx('dtday',order_dttm,1,'b');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; delivery_dttm=intnx('dtday',delivery_dttm,4,'b');&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_workdays_EMEA=intck('WD_EMEA',datepart(order_dttm),datepart(delivery_dttm));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n_workdays_AMERHOL=intck('WD_AMERHOL',datepart(order_dttm),datepart(delivery_dttm));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Mar 2014 06:55:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136886#M11071</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-03-15T06:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136887#M11072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Pat. I am sure the code would work but unfortunately i could not map it to my existing code. Please advise whether there's a shorter code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 14:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136887#M11072</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-18T14:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136888#M11073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Build yourself a custom date dimension that has the date and then 3 business days prior. Then you can create&amp;nbsp; format or merge against the table to check your dates.&lt;/P&gt;&lt;P&gt;I doubt that's actually shorter, but probably simpler to understand. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how I create my date dimension when I choose to go down that route. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This DOES NOT have the three day business day built in, but wouldn't be difficult to add. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/9606118" title="https://gist.github.com/statgeek/9606118"&gt;SAS - Date Dimension&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 15:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136888#M11073</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-18T15:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136889#M11074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Build a custom date lookup table that has a date and the expected shipping date. &lt;/P&gt;&lt;P&gt;Use a look up to check your status. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if its any faster, but its easier to implement and understand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 15:42:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136889#M11074</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-03-18T15:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136890#M11075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The main work is to build up some sort of working day custom calendars per country/region. Once you're there you can use any of the already proposed approaches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I myself would still go for the "custom intervals" approach as this will allow you to use SAS calendar functions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 03:11:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136890#M11075</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-03-19T03:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136891#M11076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your below code will n_workdays_EMEA give three business days interval as output and how do i get the intervals &amp;gt; 3 business days. Please advise. I am still trying to digest your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; n_workdays_EMEA=intck('WD_EMEA',datepart(order_dttm),datepart(delivery_dttm));&lt;/P&gt;&lt;P&gt; n_workdays_AMERHOL=intck('WD_AMERHOL',datepart(order_dttm),datepart(delivery_dttm));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 12:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136891#M11076</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-19T12:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Loop is not considering the condition</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136892#M11077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you please advise how to build a custom data look up table, i need a column which says Y if the order entry date + 3 business days is &amp;gt; = delivery start date&lt;/P&gt;&lt;P&gt;else the value should be N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a custom table however it is not excluding the weekend. for example order entry date 11th mar 2014 and the Y orders have delivery start date from 12th march till 16th march ( 12,13,14 - business days &amp;amp; 15,16 are weekends which are non business &amp;amp; should have been excluded )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Mar 2014 13:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Loop-is-not-considering-the-condition/m-p/136892#M11077</guid>
      <dc:creator>sharath_rk</dc:creator>
      <dc:date>2014-03-19T13:01:32Z</dc:date>
    </item>
  </channel>
</rss>

