Thursday, January 22, 2009

How to check format exist?

The popular method to identify the format is using dictionary tables (catalogs and formats).
What is the difference between them?
If you check the existence only from the format searchpath, dictionary.formats is the key. Otherwise, you can get ALL formats using dictionary.catalogs.

proc sql;
select libname, memname, objname
from dictionary.catalogs
where objtype contains 'FORMAT' and objname = 'FMTNAME' ;

proc sql;
select libname, memname, objname
from dictionary.formats
where objname = 'FMTNAME' ;
quit;

No comments: