I have a program that needs to be manually changed every month to take into account the latest monthly file (I have to add a new libname line every month and add the correspoding libname reference to my SET statement in my DATA step). I could obviously create libname statements for the months that haven't occured yet, but then I would still have to add the libname reference in the DATA step each month or else the program would tell me dataset doesn't exist. Is there any way around this?
This is not an ODS question or a BASE Reporting procedure question.
What you want to do can probably be accomplished with the use of SAS Macro programming and several possible methods, which include, but are not limited to using functions that check for data set existence or using the dataset dictionary.tables (assuming that you have issued a LIBNAME statement), or even piping the results of a DIR command to a file and then building the LIBNAME statement and DATA step program dynamically with SAS Macro.