<?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: array using holidaytest fx in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/array-using-holidaytest-fx/m-p/931603#M366481</link>
    <description>&lt;P&gt;The first parameter of the HOLIDAYTEST function is a string value that hopefully is the name of a holiday.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your array maybe should be:&lt;/P&gt;
&lt;PRE&gt;ARRAY hol(3)  $ 20 _temporary_( 'Christmas', 'USINDEPENDENCE', 'newyear'); 
&lt;/PRE&gt;
&lt;P&gt;_temporary_ means the variables Hol1 through Hol3 are not added to your data set the the values in the parentheses initialize the array values.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2024 19:14:55 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2024-06-10T19:14:55Z</dc:date>
    <item>
      <title>array using holidaytest fx</title>
      <link>https://communities.sas.com/t5/SAS-Programming/array-using-holidaytest-fx/m-p/931601#M366479</link>
      <description>&lt;DIV&gt;I need to capture the 4th business day of the month and check to see if it is a holiday. if the day is a holiday than use the next business day.&amp;nbsp; I only need to check the 3 holidays listed below.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;options EVENTDS=(DEFAULTS); &amp;lt;== I ADD THIS BECAUSE OF ERROR BUT STILL DOESNT HELP&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;data _null_;&lt;BR /&gt;call symput('run_date',intnx('month',today(),0, 'b'));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%put &amp;amp;run_date.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;/*SNAP SHOT BIZ DAY 4 */&lt;/DIV&gt;&lt;DIV&gt;data test;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;format new_bus_day bus&amp;nbsp; bus_DAY NEXT_BUS_DAY&amp;nbsp; date9.;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ARRAY hol(3)&amp;nbsp; $&amp;nbsp; Christmas USINDEPENDENCE newyear;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;bus_day = intnx('weekday',intnx('month','31jul2024'd, -1,'e'),4);&lt;/DIV&gt;&lt;DIV&gt;next_bus_day = intnx('weekday',intnx('month','31jul2024'd,-1,'e'),5);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;DO I=1 TO 3;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; holiday=hol{i};&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; IF holidaytest(holiday,bus_day)&amp;gt;0 THEN New_BUS_DAY=NEXT_BUS_DAY;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ELSE New_BUS_DAY=BUS_DAY;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;END;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;i keep getting the following error when i try to use arrays to pass the value of the holidaytest fx&lt;/DIV&gt;&lt;DIV&gt;WARNING: In a call to the HOLIDAYTEST function or routine, the date keyword was not defined using the EVENTDS system option.&lt;BR /&gt;NOTE: Argument 1 to function HOLIDAYTEST(' ',23561) at line 45 column 9 is invalid.&lt;BR /&gt;WARNING: In a call to the HOLIDAYTEST function or routine, the date keyword was not defined using the EVENTDS system option.&lt;BR /&gt;NOTE: Argument 1 to function HOLIDAYTEST(' ',23561) at line 45 column 9 is invalid.&lt;BR /&gt;WARNING: In a call to the HOLIDAYTEST function or routine, the date keyword was not defined using the EVENTDS system option.&lt;BR /&gt;NOTE: Argument 1 to function HOLIDAYTEST(' ',23561) at line 45 column 9 is invalid.&lt;BR /&gt;new_bus_day=04JUL2024 business_day1=06JUN2024 bus_DAY=04JUL2024 NEXT_BUS_DAY=05JUL2024 business_day3=04JUL2024 business_day4=.&lt;BR /&gt;business_day5=. Christmas= USINDEPENDENCE= newyear= I=4 holiday= _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to&lt;BR /&gt;missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;3 at 45:9&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Jun 2024 19:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/array-using-holidaytest-fx/m-p/931601#M366479</guid>
      <dc:creator>bibbnd</dc:creator>
      <dc:date>2024-06-10T19:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: array using holidaytest fx</title>
      <link>https://communities.sas.com/t5/SAS-Programming/array-using-holidaytest-fx/m-p/931603#M366481</link>
      <description>&lt;P&gt;The first parameter of the HOLIDAYTEST function is a string value that hopefully is the name of a holiday.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your array maybe should be:&lt;/P&gt;
&lt;PRE&gt;ARRAY hol(3)  $ 20 _temporary_( 'Christmas', 'USINDEPENDENCE', 'newyear'); 
&lt;/PRE&gt;
&lt;P&gt;_temporary_ means the variables Hol1 through Hol3 are not added to your data set the the values in the parentheses initialize the array values.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 19:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/array-using-holidaytest-fx/m-p/931603#M366481</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-10T19:14:55Z</dc:date>
    </item>
  </channel>
</rss>

