Hi:
It's very likely that you don't have a permanent library assigned that is named 'SQL'. You have to at least know the name of a LIBRARY that you want to find out the information about. For example, you probably do have a SASHELP Library assigned.
You could try this:
[pre]
Proc SQL;
Title "All Datasets and Views in the SASHELP Library";
Select Libname, Memname, Memtype, Nobs
From Dictionary.Tables
Where Libname = 'SASHELP';
quit;
[/pre]
Next, you will need to figure out where your datasets of interest reside. Let's say that you have a bunch of SAS datasets stored in this physical location:
c:\datafiles\accounting\
so you make a LIBNAME statement and change the code:
[pre]
LIBNAME MYDATA 'C:\datafiles\accounting';
Proc SQL;
Title "All Datasets and Views in the MYDATA Library";
Select Libname, Memname, Memtype, Nobs
From Dictionary.Tables
Where Libname = 'MYDATA';
quit;
[/pre]
Hope that helps.
cynthia