You can use user-defined
formats in a DATA step by using the CATALOG procedure to copy the
format catalog to a library. This example copies the format library
to Work:
/* Enable DATA step parallel processing using the system option */
/* and enable messages to view non-compliant code in the SAS log. */
options dsaccel=any msglevel=i;
/* Create a libref for the in-memory tables. */
libname lasr sasiola host="grid001.example.com" port=10010 tag='hps';
/* Create a libref for the input data and format catalog that is */
/* stored on disk. */
libname score '/myScoreData/';
/* Copy the demx format catalog to the Work library */
proc catalog catalog=score.dmex;
copy out=work.formats;
quit;
/* Enable in-memory processing (dsaccel) and load the input table */
/* into memory. */
data lasr.dmex;
set score.dmex;
run;
/* Enable in-memory processing (dsaccel) and execute the score code .*/
/* using the in-memory tables. */
data lasr.dmexout;
set lasr.dmex;
%inc "dmex.sas";
run;
SAS automatically searches
the Work and Library libraries for a format catalog. If you copy the
format library to a library other than Work or Library, then you must
use the FMTSEARCH= system option to let SAS know the location of the
format library.
options fmtsearch=(myFmtLib);
You must also specify
the FMTSEARCH= system option if the format catalog name is not
format:options fmtsearch=(myFmtLib.myFmts);