Previous Page | Next Page

The FORMAT Procedure

Examples: 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-library';

 Note about code
data proclib.staff;
   input Name & $16. IdNumber $ Salary 
         Site $ HireDate date7.;
   format hiredate date7.;
   datalines;
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
;
The variables are about a small subset of employees who work for a corporation that has sites in the U.S. and Britain. The data contain the name, identification number, salary (in British pounds), location, and date of hire for each employee.
[continuerule]

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

Example 10: Creating a Format in a non-English Language

Previous Page | Next Page | Top of Page