Chapter Contents

Previous

Next
The FORMAT Procedure

Results


Output Control Data Set
The output control data set contains information that describes informats or formats. You can use output control data sets, or a set of observations from an output control data set, as an input control data set in a subsequent PROC FORMAT step. You create an output control data set with the CNTLOUT= option in the PROC FORMAT statement.

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

DEFAULT
numeric variable that indicates the default length for format or informat

END
character variable that gives the range's ending value

EEXCL
character variable that indicates whether the range's ending value is excluded. Values are
Y the range's ending value is excluded
N the range's ending value is not excluded

FILL
numeric variable whose value is the value of the FILL= option

FMTNAME
character variable whose value is the format or informat name

FUZZ
numeric variable whose value is the value of the FUZZ= option

HLO
character variable that contains range information about the format or informat in the form of eight different letters that can appear in any combination. Values are
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

LABEL
character variable whose value is the informatted or formatted value or the name of a standard SAS informat or format

LENGTH
numeric variable whose value is the value of the LENGTH= option

MAX
numeric variable whose value is the value of the MAX= option

MIN
numeric variable whose value is the value of the MIN= option

MULT
numeric variable whose value is the value of the MULT= option

NOEDIT
character variable whose value indicates whether the NOEDIT option is in effect. Values are
1 NOEDIT option is in effect
0 NOEDIT option is not in effect

PREFIX
character variable whose value is the value of the PREFIX= option

SEXCL
character variable that indicates whether the range's starting value is excluded. Values are
Y the range's starting value is excluded
N the range's starting value is not excluded

START
character variable that gives the range's starting value

TYPE
character variable that indicates the type of format. Possible values are
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
[HTML Output]  [Listing Output]


Input Control Data Set
You specify an input control data set with the CNTLIN= option in the PROC FORMAT statement. The FORMAT procedure uses the data in the input control data set to construct informats and formats. Thus, you can create informats and formats without writing INVALUE, PICTURE, or VALUE statements.

The input control data set must have these characteristics:

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 FORMAT procedure prints output only when you specify the FMTLIB option or the PAGE option in the PROC FORMAT statement. The printed output is a table for each format or informat entry in the catalog specified in the LIBRARY= option. The output also contains global information and the specifics of each value or range defined for the format or informat.

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
the name of the informat or format. Informat names begin with an at-sign (@).

LENGTH
the length of the informat or format. PROC FORMAT determines the length in the following ways:

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
the number of values or ranges associated with the informat or format. NOZEROS. has 4 ranges, EVAL. has 5.

MIN LENGTH
the minimum length of the informat or format. The value for MIN LENGTH is 1 unless you specify a different minimum length with the MIN= option.

MAX LENGTH
the maximum length of the informat or format. The value for MAX LENGTH is 40 unless you specify a different maximum length with the MAX= option.

DEFAULT LENGTH
the length of the longest value in the INVALUE or LABEL field, or the value of the DEFAULT= option.

FUZZ
the fuzz factor. For informats, FUZZ always is 0. For formats, the value for this field is STD if you do not use the FUZZ= option. STD signifies the default fuzz value.

START
the beginning value of a range. FMTLIB prints only the first 16 characters of a value in the START and END columns.

END
the ending value of a range. The exclusion sign (<) appears after the values in START and END, if the value is excluded from the range.

INVALUE
LABEL
INVALUE appears only for informats and contains the informatted values. LABEL appears only for formats and contains either the formatted value or picture. The release of the SAS System and the date on which the format or informat was created are in parentheses after INVALUE or 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.