Before I'd go ANY farther with this, I'd make reasonable filenames mandatory. Anybody who uses a date format like that in an IT context is in dire need of being the target of a LART. And get rid of the stupid blanks, there's underlines for that.
As it is, I'd first do
filename = scan(filename,1,'.');
to remove the extension.
Then
year = input(scan(filename,-1,' '),4.);
day = input(scan(filename,-2,' '),2.);
For the month, I'd create a custom infomat that converts the textual month names to the numbers:
proc format;
invalue inmonth
'January' = 1
'February' = 2
....
'September' = 9
...
;
run;
You can then use that in
month = input(scan(filename,-3,' '),inmonth.);
After that, use the mdy() function to build a date.
All that would not be necessary if some &?%!?# had used a yyyy-mm-dd format for the date in the filename.
... View more