While reviewing a collection of jobs (.sas files) recently I am wondering what is the best way to identify all the input and output datasets produced from the code.
Might there be a macro or procedure that can take the .sas file as input and determine all the in and out datasets and their library?
The best way is to review the log generated when the program runs. SAS even has a tool to help, PROC SCAPROC. https://documentation.sas.com/?docsetId=proc&docsetTarget=p0sf63lx4fs2m5n14qv1bn8p863v.htm&docsetVer...
To tease it out of just the source code you might end up needing the build your own SAS compiler (or even SAS Macro Processor).
The best way is to review the log generated when the program runs. SAS even has a tool to help, PROC SCAPROC. https://documentation.sas.com/?docsetId=proc&docsetTarget=p0sf63lx4fs2m5n14qv1bn8p863v.htm&docsetVer...
To tease it out of just the source code you might end up needing the build your own SAS compiler (or even SAS Macro Processor).
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.