I am trying to write some code that will look at all the datasets in a libname and bring back the created date of the most recently created file.
I have googled this for an entire day and cannot find a way to do this. I know that ATTRN can determine the created date of a dataset:
%let data_set = libname.data_set_name;
%let dsid = %sysfunc (open(&data_set));
%let create_date = %sysfunc(attrn(&dsid, crdte));
But there seems to be no way to make it look at multiple datasets so that a max date can be determined.
Can anyone please help?