Unfortunately no, there's no procedure for this.
However, what you COULD do it write a SAS program that reads other SAS programs as text files and collects the info that you need.
First up you'll be interested in lines starting with SET, MERGE or DATA and lines starting with PROC.
With PROCs, life is a little more complicated, you'll want to find a DATA= statement, OR a CREATE TABLE statement.
Also, you'll want to collect the LIBNAME statements so you know what libraries are being used.
One other item that can help is using dictionary tables.
You can use this:-
Code:
proc sql;
create table TABLES as
select *
from dictionary.tables
where LIBNAME = "<your lirbary name>"
;
quit;
to get a list of the tables/datasets in <your library name>.
Build the code up slowly piece by piece and test each component as you do it. Shouldn't be more than a days work to get a working version that'll do alot of the grunt work for you.
Watch out for proc sql steps, they'll be a little more problematic, also watching out for DATA, SET and MERGE statements which reference multiple datasets (keep reading to the ; mark, ignore anything in brackets).
Might also be worth doing a google search for an example. Something like "SAS code scan" or something might get some results.
Let us know how you do, this is actually a project I've been thinking about tackling several times over the last few years, but never had the need to do it, and therefore never had the motivation to do it.
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.