FORMAT Procedure

Example 7: Printing the Description of Informats and Formats

Features:

PROC FORMAT statement option:: FMTLIB

SELECT statement

Format:
Informat: EVALUATION.Evaluation

Details

This example illustrates how to print a description of an informat and a format. The description shows the values that are input and output.

Program

libname library 'SAS-library';
proc format library=library fmtlib;
   select @evaluation benefit;
   title 'FMTLIB Output for the BENEFIT. Format and the';
   title2 'EVALUATION. Informat';
run;

Program Description

Set up a SAS library reference named LIBRARY.
libname library 'SAS-library';
Print a description of EVALUATION. and BENEFIT. The FMTLIB option prints information about the formats and informats in the catalog that the LIBRARY= option specifies. LIBRARY=LIBRARY points to the LIBRARY.FORMATS catalog.
proc format library=library fmtlib;
Select an informat and a format. The SELECT statement selects EVALUATION. and BENEFIT., which were created in previous examples. The at sign (@) in front of EVALUATION. indicates that EVALUATION. is an informat.
   select @evaluation benefit;
Specify the titles.
   title 'FMTLIB Output for the BENEFIT. Format and the';
   title2 'EVALUATION. Informat';
run;

Output

FMTLIB Output for the BENEFIT Format and the EVALUATION Informat
FMTLIB Output for the BENEFIT Format and the EVALUATION Informat