<?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: Reg:The Dates to move day if job Runs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20151#M3117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your situation, I think you can use CALL EXECUTE statement to perform your job.&lt;/P&gt;&lt;P&gt;Firstly make a macro to include what you need to do. then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if indicaotr=1 and No=2 then call execute('%myjob('||stdate||','||enddate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Dec 2011 11:48:55 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-12-26T11:48:55Z</dc:date>
    <item>
      <title>Reg:The Dates to move day if job Runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20148#M3114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data calendar_table(drop=sdt edt);&lt;BR /&gt;input sdt$ 1-9 edt$ 10-20;&lt;BR /&gt;stdate =input(sdt,date9.);&lt;BR /&gt;enddate=input(edt,date9.);&lt;BR /&gt;format stdate enddate ddmmyy10.;&lt;BR /&gt;cards;&lt;BR /&gt;12jan2011 13jan2011&lt;BR /&gt;13jan2011 14jan2011&lt;BR /&gt;14jan2011 15jan2011&lt;BR /&gt;15jan2011 16jan2011&lt;BR /&gt;16jan2011 17jan2011&lt;BR /&gt;17jan2011 18jan2011&lt;BR /&gt;run;&lt;BR /&gt;proc print;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;see actually in the above table i have the dates on which the loading to be happened&lt;/P&gt;&lt;P&gt;In the second table in one cell i will have the Sdate and Edate so i want one table&lt;BR /&gt;with one obs of date so that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:&lt;BR /&gt;Table 2&lt;BR /&gt;Sdate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Edate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fpath &lt;BR /&gt;12012011&amp;nbsp;&amp;nbsp;&amp;nbsp; 13012011&amp;nbsp;&amp;nbsp; c/raw/&amp;nbsp;&amp;nbsp;&amp;nbsp; order.txt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c/raw/12012011/order.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the dates&amp;nbsp; to go to another table in the Infile path of the job i will&lt;BR /&gt;give Fpath in the macro so that it will take data from there daily&lt;/P&gt;&lt;P&gt;if the job again runs the date should increment so i will run for 13 date this is my aim &lt;BR /&gt;for the loading data based on date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sdate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Edate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Fpath &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;13012011&amp;nbsp;&amp;nbsp;&amp;nbsp; 14012011&amp;nbsp;&amp;nbsp; c/raw/&amp;nbsp;&amp;nbsp;&amp;nbsp; order.txt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c/raw/13012011/order.txt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 07:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20148#M3114</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-26T07:21:02Z</dc:date>
    </item>
    <item>
      <title>Reg:The Dates to move day if job Runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20149#M3115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using simple code can get that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data calendar_table(drop=sdt edt);
input sdt$ 1-9 edt$ 10-20;
stdate =input(sdt,date9.);
enddate=input(edt,date9.);
format stdate enddate ddmmyy10.;
cards;
12jan2011 13jan2011
13jan2011 14jan2011
14jan2011 15jan2011
15jan2011 16jan2011
16jan2011 17jan2011
17jan2011 18jan2011
;
run;

data calendar_table need_table;
 set calendar_table;
 length path data $ 400;
 if _n_ eq 1 then do;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path='c:\raw';data='order.txt';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output need_table;delete;end;
 output&amp;nbsp; calendar_table;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 09:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20149#M3115</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-26T09:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:The Dates to move day if job Runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20150#M3116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small need if indicator and&amp;nbsp; is there&amp;nbsp; it should move the dates having indicaotr=1 and No=2 only how can i do it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data calendar_table(drop=sdt edt);&lt;/P&gt;&lt;P&gt;input sdt$ 1-9 edt$ 10-20 Indicator NO;&lt;/P&gt;&lt;P&gt;stdate =input(sdt,date9.);&lt;/P&gt;&lt;P&gt;enddate=input(edt,date9.);&lt;/P&gt;&lt;P&gt;format stdate enddate ddmmyy10.;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;12jan2011 13jan2011 1 2&lt;/P&gt;&lt;P&gt;13jan2011 14jan2011 1 4&lt;/P&gt;&lt;P&gt;14jan2011 15jan2011 2 3&lt;/P&gt;&lt;P&gt;15jan2011 16jan2011 1 4&lt;/P&gt;&lt;P&gt;16jan2011 17jan2011 1 4&lt;/P&gt;&lt;P&gt;17jan2011 18jan2011 2 5&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;&lt;/P&gt;&lt;P&gt;data calendar_table need_table;&lt;/P&gt;&lt;P&gt;set calendar_table;&lt;/P&gt;&lt;P&gt;length path data $ 400;&lt;/P&gt;&lt;P&gt;if indicator=1 and no=4 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path='c:\raw';data='order.txt';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output need_table;delete;end;&lt;/P&gt;&lt;P&gt;output&amp;nbsp; calendar_table;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Req:2 )And i wnat to Edit the need_table and keep the dates if dates 12jan2011 13jan2011&amp;nbsp; are complted if needed i should call them again as per the logic the calendar_table does not hold these obs if once the date was crossed ,how can i do that.&lt;/P&gt;&lt;P&gt;Reg:3) If&amp;nbsp; need_table; are having dates sdate :15jan2011 and endate:16jan2011 dates in that table i will edit them and again move the date&amp;nbsp; to 13jan2011 and 14jan2011 respectively again it should get the dates accordingly ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thqs in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 09:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20150#M3116</guid>
      <dc:creator>sas_</dc:creator>
      <dc:date>2011-12-26T09:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:The Dates to move day if job Runs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20151#M3117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your situation, I think you can use CALL EXECUTE statement to perform your job.&lt;/P&gt;&lt;P&gt;Firstly make a macro to include what you need to do. then use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if indicaotr=1 and No=2 then call execute('%myjob('||stdate||','||enddate);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Dec 2011 11:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-The-Dates-to-move-day-if-job-Runs/m-p/20151#M3117</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-12-26T11:48:55Z</dc:date>
    </item>
  </channel>
</rss>

