<?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: Create calendar with SAS/AF in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/281840#M311347</link>
    <description>Hey thank you so much, I've been working on something, it helped a lot !&lt;BR /&gt;&lt;BR /&gt;Thank you !</description>
    <pubDate>Sat, 02 Jul 2016 13:06:47 GMT</pubDate>
    <dc:creator>Xibition</dc:creator>
    <dc:date>2016-07-02T13:06:47Z</dc:date>
    <item>
      <title>Create calendar with SAS/AF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280200#M311343</link>
      <description>&lt;P&gt;Helloo,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like some help with SAS/AF, I know it's kinda old but it's for a project, I have to make a dynamic calendar,&amp;nbsp;&lt;SPAN&gt;which means days are automatically displayed when the user goes through the years/months. A bit like the Windows Calendar we have.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So I have this Data set :&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;%let fromDate = 31DEC2005;
%let toDate = 31DEC2016;
data calendar;

  do date = "&amp;amp;fromDate"d to "&amp;amp;toDate"d; 
    DayOfWeek = put(date, downame3.);
    Day = put(date, day.);
    Month=month(date);
    Year=year(date);
    output; 
  end; 

  format 
    date date9.
  ;
run;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;and my calendar looks like the attached image.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The only thing I need to do now is set the days in the Push Buttons (takes values 1-31) though I want the values to be updated following the data set, as soon as the user changes the month/year from the combo/spin boxes. (didn't decide which one to choose yet)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am new to SCL I don't know how to put all these things together, thank you for your help !&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also I'm sorry if it's not the proper section.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12700i7C8D34AD605E7BCF/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="input.PNG" title="input.PNG" /&gt;</description>
      <pubDate>Sun, 26 Jun 2016 13:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280200#M311343</guid>
      <dc:creator>Xibition</dc:creator>
      <dc:date>2016-06-26T13:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create calendar with SAS/AF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280307#M311344</link>
      <description>&lt;P&gt;Sadly I can no longer use SAS/AF since crippled EG has been forced onto me, and it has been a few years since I last used SCL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here is the pseudo code I would use. You'll have to modify it to make it work, but maybe it will help you get started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
main:
  first_button=put("&amp;amp;fromDate"d,eurdfdn.);                           %* say 3 for Wednesday;
  DAY=.;
  do button_nb = 1 to 35;
    if button_nb &amp;lt; first_button then button[button_nb]=' ';          %* button 1,2 is set to blank;
    if button_nb = first_button then DAY=0;                          %* 3rd button is start of month;
    DAY=DAY+1;
    if DAY then button[button_nb]=put(DAY,2.);                       %* next buttons set to date;
    if month(intnx('day',"&amp;amp;fromDate"d,DAY)) ne month("&amp;amp;fromDate"d)   
      then button[button_nb]=' ' ;                                   %* if past EOM then set to missing;
  end;
return;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2016 02:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280307#M311344</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-27T02:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create calendar with SAS/AF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280420#M311345</link>
      <description>&lt;P&gt;Hello, Thank you very much for stopping by !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have severl errors like "Undeclared array reference"&amp;nbsp;&amp;nbsp;for button, also I didn't understand how is it supposed to "change" the actual value of the button ? the "1" in the image is the value of the "label" attribute, am I not going to use it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you once more !&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2016 13:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280420#M311345</guid>
      <dc:creator>Xibition</dc:creator>
      <dc:date>2016-06-27T13:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create calendar with SAS/AF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280604#M311346</link>
      <description>&lt;P&gt;Yes you have to adapt the code.&lt;/P&gt;
&lt;P&gt;I don't know the names of your widgets so I called them in via an array. You can declare an array in SCL (SCL has nice array functions actually) and so the same thing.&lt;/P&gt;
&lt;P&gt;Yes set the label property to change it.&lt;/P&gt;
&lt;P&gt;Sorry I can't provide you with better code.&amp;nbsp;I blame&amp;nbsp;SAS for pushing EG down our throats.&lt;/P&gt;
&lt;P&gt;Feel free to ignore if it doesn't help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2016 22:17:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/280604#M311346</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-27T22:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create calendar with SAS/AF</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/281840#M311347</link>
      <description>Hey thank you so much, I've been working on something, it helped a lot !&lt;BR /&gt;&lt;BR /&gt;Thank you !</description>
      <pubDate>Sat, 02 Jul 2016 13:06:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-calendar-with-SAS-AF/m-p/281840#M311347</guid>
      <dc:creator>Xibition</dc:creator>
      <dc:date>2016-07-02T13:06:47Z</dc:date>
    </item>
  </channel>
</rss>

