Friday, January 1, 2016

Dealing with SAS format catalog

libname library "the directory where formats catalog is stored";
libname out "the directory where the transformed format is stored";
*** To simply read a format catalog;
proc format library=library.formats fmtlib;
run;

*** To copy a existing format from one area to another and add some more formats;
*** to read a format data set;
proc format library=library.formats fmtlib cntlin=out.formats;
  format ...;
run;

*** to read a catalog;
proc format library=library.formats fmtlib cntlin=out.formats
memtype=catalog;
run;

*** to print out a catalog;
proc format library=library.formats cntlout=out.formats;
run;

proc print data=out.formats;
run;



*** to convert the SAS catalog into SAS data set;
libname dest 'c:\temp\test';

options nofmterr;
proc format library=dest.formats fmtlib cntlout=dest.formats;
run;

***For more information, see the following link;
http://www.ats.ucla.edu/stat/sas/library/formats.htm

No comments:

Post a Comment