Library includes datasets..now find variable belong to which table?

Reply
Contributor
Posts: 56

Library includes datasets..now find variable belong to which table?

Library includes datasets..now find variable belong to which table?

how we can find the variable belongs to which dataset ?

Thanks

Shiva

Super User
Super User
Posts: 7,401

Re: Library includes datasets..now find variable belong to which table?

Please look at datasets SASHELP.VCOLUMN and SASHELP.VTABLE.  If you want SQL then it is DICTIONARY.COLUMNs and DICTIONARY.TABLE.

Respected Advisor
Posts: 3,777

Re: Library includes datasets..now find variable belong to which table?

change 'SASHELP' to your libname and 'AGE' to the variable you seek.
proc sql;
  
select name,memname
  
from dictionary.columns
  
where libname eq 'SASHELP' and upcase(name) eq 'AGE' and memtype eq 'DATA';
  
quit;
  
run;
Ask a Question
Discussion stats
  • 2 replies
  • 261 views
  • 0 likes
  • 3 in conversation