I would be grateful if someone could help automate the task of a weekly job that I need to run every Monday.
There are about 10 different files that an existing piece of code reads. All of these files are in a folder say D:\SASFILES.
The issue is the file is dumped into this folder and the folder also has all historical dumps of the file. The latest file is identified by the latest time stamp.
Below is an example of one of the files "MEM122-ALI-FamilySnapShotExtract". The folder contains these files:
MEM122-ALI-FamilySnapShotExtract_2009-02-16-07-34-32.txt
MEM122-ALI-FamilySnapShotExtract_2009-02-23-05-35-26.txt
MEM122-ALI-FamilySnapShotExtract_2009-03-02-05-29-14.txt
The latest file is MEM122-ALI-FamilySnapShotExtract_2009-03-02-05-29-14.txt i.e. that was created on 2nd March 2009.
I want to be able to set a variable say D121SA to point to this file
e.g.
%LET D121SA = MEM122-ALI-FamilySnapShotExtract_2009-03-02-05-29-14.txt ;
Any help appreciated!