Chapter Contents

Previous

Next
The FORMAT Procedure

Example 3: Writing a Format for Dates Using a Standard SAS Format


Procedure features:
VALUE statement:
HIGH keyword
Data set:
PROCLIB.STAFF .
Formats:
USCURR. and $CITY. .

This example uses an existing format that is supplied by SAS as a formatted value.

Tasks include


Program

libname proclib 'SAS-data-library-1';
libname library 'SAS-data-library-2';
options nodate pageno=1 linesize=80 pagesize=40;
 Note about code
   proc format library=library;
 Note about code
      value benefit  low-'31DEC79'd=[worddate20.]
 Note about code
                    '01JAN80'd-high='  ** Not Eligible **';
   run;





 Note about code
proc print data=proclib.staff noobs label;
   label salary='Salary in U.S. Dollars';
   format salary uscurr. site $city. hiredate benefit.;
   title 'PROCLIB.STAFF with a Format for the Variables';
   title2 'Salary, Site, and HireDate';
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.