02 Jun

SAS: PROC SQL, Dictionary Tables And sashelp

There are, a lot, of dictionary tables. Here’s three queries that list a few of them.

proc sql;
	SELECT *
	FROM dictionary.options;
	SELECT *
	FROM dictionary.tables;
	SELECT *
	FROM dictionary.extfiles;
quit;

You don’t want to see the results, it’s really long, but the queries would list the current system options, table list and the currently assigned filerefs. You can see what the tables look like with the following queries

DESCRIBE TABLE dictionary.options;

create table DICTIONARY.OPTIONS
  (
   optname char(32) label='Option Name',
   opttype char(8) label='Option type',
   setting char(1024) label='Option Setting',
   optdesc char(160) label='Option Description',
   level char(8) label='Option Location',
   group char(32) label='Option Group'
  );

You can also access the same information with the following code.

proc print data=sashelp.voption;
run;

Note that this one is voption, because it’s a view, while the other variant is options. +1 for SAS consistency with the “s”. The result is also really long so I’ll spare you that one also.

The link below has more information.

http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002300185.htm

Leave a Reply

Your email address will not be published. Required fields are marked *