Chapter Contents


The FORMAT Procedure


Several examples in this section use the PROCLIB.STAFF data set. In addition, many of the informats and formats that are created in these examples are stored in LIBRARY.FORMATS. The output data set shown in Output Control Data Set contains a description of these informats and the formats.
libname proclib 'SAS-data-library';
 Note about code
data proclib.staff;
   input Name & $16. IdNumber $ Salary 
         Site $ HireDate date7.;
   format hiredate date7.;
Capalleti, Jimmy  2355 21163 BR1 30JAN79
Chen, Len         5889 20976 BR1 18JUN76
Davis, Brad       3878 19571 BR2 20MAR84
Leung, Brenda     4409 34321 BR2 18SEP74
Martinez, Maria   3985 49056 US2 10JAN93
Orfali, Philip    0740 50092 US2 16FEB83
Patel, Mary       2398 35182 BR3 02FEB90
Smith, Robert     5162 40100 BR5 15APR86
Sorrell, Joseph   4421 38760 US1 19JUN93
Zook, Carla       7385 22988 BR3 18DEC91


Example 1: Creating a Picture Format

Example 2: Creating a Format for Character Values

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

Example 4: Converting Raw Character Data to Numeric Values

Example 5: Creating a Format from a Data Set

Example 6: Printing the Description of Informats and Formats

Example 7: Retrieving a Permanent Format

Example 8: Writing Ranges for Character Strings

Example 9: Filling a Picture Format

Chapter Contents



Top of Page

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