Chapter Contents |
Previous |
Next |
The FORMAT Procedure |
Output Control Data Set |
Output control data sets contain an observation for every value or range in each of the informats or formats in the LIBRARY= catalog. The data set consists of variables that give either global information about each format and informat created in the PROC FORMAT step or specific information about each range and value.
The variables in the output control data set are
Y |
the range's ending value is excluded |
N |
the range's ending value is not excluded |
F |
standard SAS format or informat used for formatted value or informatted value |
H |
range's ending value is HIGH |
I |
numeric informat range (informat defined with unquoted numeric range) |
L |
range's starting value is LOW |
N |
format or informat has no ranges, including no OTHER= range |
O |
range is OTHER |
R |
ROUND option is in effect |
S |
NOTSORTED option is in effect |
1 |
NOEDIT option is in effect |
0 |
NOEDIT option is not in effect |
Y |
the range's starting value is excluded |
N |
the range's starting value is not excluded |
C |
character format |
I |
numeric informat |
J |
character informat |
N |
numeric format (excluding pictures) |
P |
picture format |
Output Control Data Set for PROC FORMAT Examples shows an output control data set that contains information on all the informats and formats created in Examples .
Output Control Data Set for PROC FORMAT Examples
Input Control Data Set |
The input control data set must have these characteristics:
Y
. Inclusion
is the default.
You can create more than one format from an input control data set if the observations for each format are grouped together.
You can use a VALUE, INVALUE, or PICTURE statement in the same PROC FORMAT step with the CNTLIN= option. If the VALUE, INVALUE, or PICTURE statement is creating the same informat or format that the CNTLIN= option is creating, the VALUE, INVALUE, or PICTURE statement creates the informat or format and the CNTLIN= data set is not used. You can, however, create an informat or format with VALUE, INVALUE, or PICTURE and create a different informat or format with CNTLIN= in the same PROC FORMAT step.
For an example featuring an input control data set, see Creating a Format from a Data Set .
Procedure Output |
The FMTLIB output shown in Output from PROC FORMAT with the FMTLIB Option contains a description of the NOZEROS. format, which is created in Building a Picture Format: Step by Step , and the EVAL. informat, which is created in Converting Raw Character Data to Numeric Values .
Output from PROC FORMAT with the FMTLIB Option
FMTLIB Output for the NOZEROS. Format and the 1 EVAL. Informat ---------------------------------------------------------------------------- | FORMAT NAME: NOZEROS LENGTH: 5 NUMBER OF VALUES: 4 | | MIN LENGTH: 1 MAX LENGTH: 40 DEFAULT LENGTH 5 FUZZ: STD | |--------------------------------------------------------------------------| |START |END |LABEL (VER. 7.00 29MAY98:10:00:24) | |----------------+----------------+----------------------------------------| |LOW | -1|00.00 P- F M100 | | -1< 0<99 P-. F M100 | | 0| 1<99 P. F M100 | | 1|HIGH |00.00 P F M100 | ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | INFORMAT NAME: @EVAL LENGTH: 1 NUMBER OF VALUES: 5 | | MIN LENGTH: 1 MAX LENGTH: 40 DEFAULT LENGTH 1 FUZZ: 0 | |--------------------------------------------------------------------------| |START |END |INVALUE(VER. 7.00 29MAY98:10:00:25) | |----------------+----------------+----------------------------------------| |C |C | 1| |E |E | 2| |N |N | 0| |O |O | 4| |S |S | 3| ---------------------------------------------------------------------------- |
The fields are described below in the order they appear in the output, from left to right:
INFORMAT NAME
FORMAT NAME
LENGTH
In the output for @EVAL., the length is 1 because 1 is the length of the longest raw data value on the left side of the equals sign.
In the output for NOZEROS., the LENGTH is 5 because the longest picture is 5 characters.
NUMBER OF VALUES
MIN LENGTH
MAX LENGTH
DEFAULT LENGTH
FUZZ
START
END
INVALUE
LABEL
For picture formats, such as NOZEROS., the LABEL section contains the
PREFIX=, FILL=, and MULT= values. To note these values, FMTLIB prints the
letters P
, F
,
and M
to represent each option, followed by
the value. For example, in the LABEL section, P-.
indicates that the prefix value is a dash followed by a period.
FMTLIB prints only 40 characters in the LABEL column.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.