Chapter Contents

Previous

Next
The FORMAT Procedure

Example 7: Retrieving a Permanent Format


Procedure features:
PROC FORMAT statement options:
LIBRARY=
Other features:
FMTSEARCH= system option
Data sets:
SAMPLE .

This example uses the LIBRARY= option and the FMTSEARCH= system option to store and retrieve a format stored in a catalog other than WORK.FORMATS or LIBRARY.FORMATS.


Program

libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=64 pagesize=60;
 Note about code
proc format library=proclib;
 Note about code
   picture nozeros
              low   -     -1  =  '00.00' (prefix='-'          )
               -1  <-<     0  =     '99' (prefix='-.' mult=100)
                0   -<     1  =     '99' (prefix='.'  mult=100)
                1   -   high  =  '00.00';
run;
 Note about code
   options  fmtsearch=(proclib);


 Note about code
proc print data=sample;
   format amount nozeros.;
   title1 'Retrieving the NOZEROS. Format from PROCLIB.FORMATS';
   title2 'The SAMPLE Data Set';
run;


Output
[HTML Output]  [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.