<?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: First Day of Month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606161#M175986</link>
    <description>Yes please</description>
    <pubDate>Thu, 21 Nov 2019 14:56:59 GMT</pubDate>
    <dc:creator>JJP1</dc:creator>
    <dc:date>2019-11-21T14:56:59Z</dc:date>
    <item>
      <title>First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606156#M175981</link>
      <description>&lt;P&gt;Hi i need to run the job on first of every month.so iam using below condition.but how can i test the below one it is working as expected please&lt;/P&gt;&lt;P&gt;%sysfunc(day(%sysfunc(today())))=1&lt;/P&gt;&lt;P&gt;iam running above cmd in SAS EG.nothing is coming in output.please help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606156#M175981</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2019-11-21T14:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606157#M175982</link>
      <description>&lt;P&gt;You can test it like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let day= %sysfunc(day(%sysfunc(today())));
%put The value is &amp;amp;day.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606157#M175982</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-21T14:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606159#M175984</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;please suggest how can i get day=01,i ran this code i got day=21.&lt;/P&gt;&lt;P&gt;but i need day=01.please help&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606159#M175984</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2019-11-21T14:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606160#M175985</link>
      <description>&lt;P&gt;I don't understand this. You want to run some code conditional on the fact that it is the first day of the month, correct?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606160#M175985</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-21T14:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606161#M175986</link>
      <description>Yes please</description>
      <pubDate>Thu, 21 Nov 2019 14:56:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606161#M175986</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2019-11-21T14:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606162#M175987</link>
      <description>&lt;P&gt;If you simply want to test the code you really want to run on the first, simply make your code conditional on the 21'th day. Then test. Then change it back again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:59:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606162#M175987</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-21T14:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606167#M175990</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering why you have to do something in the code to check for 1st day of month. Can't you just schedule the job to run 1st of every month. What environment do you have? Linux/unix you have Crontab and on Windows you have the SAS EG schedule (File &amp;gt; Schedule and setup the triggers). We might want more information on what your trying to achieve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 15:13:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606167#M175990</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-11-21T15:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: First Day of Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606173#M175993</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/256123"&gt;@JJP1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code retrieve the first day of the month in the macro variable job_time.&lt;/P&gt;
&lt;P&gt;E.g. today is November 21st 2019 -&amp;gt; the macro variable will be equal to November 1st 2019&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if this is what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let job_time= %sysfunc(intnx(month,%sysfunc(today()),0,b));
%put &amp;amp;job_time;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 19:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/First-Day-of-Month/m-p/606173#M175993</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-11-21T19:18:20Z</dc:date>
    </item>
  </channel>
</rss>

