07-25-2016 06:31 PM
I am attempting to combine multiple data files based on a date prefix.
All of the files are located in one folder and have the date prefix of YYYYMMDD. They are excel files.
I would like to be able to give a start date, say 20160423 and have SAS return the appended files for a given amount of days....say 7, or 14, or 21.
07-25-2016 06:43 PM
Do you have any part of this process started?
This can't be done in EG via point and click, it requires a macro solution via code.
You'll need to write the base code and looping over the specified dates is easy enough.
IF YOUR DATA IN THE FILES IS NOT WELL STRUCTURED AND CONSISTENT THIS WILL NOT WORK.
When importing data from Excel SAS guesses at types, if your data is inconsisten then the types may not match between datasets and you'll have to deal with that issue.
07-25-2016 06:57 PM
Yes, I know this will require a macro....
The files are all the same format so they are structured perfectly. They were actually originally in one large files but then split out based on the day.
The reason I did not leave them all in one file is because I will be using a rolling-window to look at customers.