Using SAS to change date fields on a daily run script to automate it
<p>The following variable are in my current SAS script, that is run daily. </p>

<p>I have to change the following </p>

<p>%let begdt = '22Feb16 00:00:00.0'dt ;</p>

<p>%let enddt = '23Feb16 03:00:00.0'dt ;</p>

<p>%let sync_int = 600;</p>

<p>%let ginterval='01:00:00.0't ;</p>

<p>filename filein (</p>

<p>'C:\PROD\2016\GZ\02.23.16\data02_23_031500.tsv'</p>

<p>);</p>

<p>to the following (So for today - ie the 24th) it will look like this </p>

<p>`%let begdt = '23Feb16 00:00:00.0'dt ;</p>

<p>%let enddt = '24Feb16 03:00:00.0'dt ;</p>

<p>%let sync_int = 600;</p>

<p>%let ginterval='01:00:00.0't ;</p>

<p>filename filein (</p>

<p>'C:\PROD\2016\GZ\02.24.16\data02_24_031500.tsv'</p>

<p>);</p>

<p>In the first line </p>

<p>I change 22Feb16 to 23Feb16... It needs to be the previous day's date</p>

<p>In the 2nd line </p>

<p>I change 23Fed16 to 24Feb14 - it needs to be today's date </p>

<p>and in the file name </p>

<p>I have to change the Folder name freom 02.23.16 to 02.24.16 and the file name from data02_23_ to data02_24_</p>

<p>Basically it's a script that I run daily (manually). I am trying to use SAS to detect what day it is when it runs, and have it change those date fields - so I can set it to run on my SAS server each day without having to change any code... I was trying to use what was avabilable to me - but as you can see I am struggling with it...  Ive been handed the script and am stuck..</p>

<p>Any help is greatly appreciated....  I tried the best I could to see if I could figure it out - but haven't figured it out yet </p>