Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4

Output Control Data Set

The output control data set contains information that describes informats or formats. Output control data sets have a number of uses. For example, an output control data set can be edited with a DATA step to programmatically change value ranges or can be subset with a DATA step to create new formats and informats. Additionally, you can move formats and informats from one operating environment to another by creating an output control data set, using the CPORT procedure to create a transfer file of the data set, and then using the CIMPORT and FORMAT procedures in the target operating environment to create the formats and informats there.

You create an output control data set with the CNTLOUT= option in the PROC FORMAT statement. You 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 with the CNTLIN= option.

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

END

EEXCL

FILL

FMTNAME

FUZZ

HLO

LABEL

LENGTH

MAX

MIN

MULT

NOEDIT

PREFIX

SEXCL

START

TYPE

Output 23.1 shows an output control data set that contains information on all the informats and formats created in Examples: FORMAT Procedure on page 463.

Output 23.1: Output Control Data Set for PROC FORMAT Examples

An Output Control Data Set 1 D L F D D A A M E L P N D I T N T S L F E R O S E E G A G N T A A N F E M F E T E E C 3 T U O A A E B M M U G U F U I D Y X X H S S Y A b M R N E I A L T Z I L L I P C C L E E P G s E T D L N X T H Z X T L T E L L O P P E E 1 BENEFIT LOW 7304 WORDDATE20. 1 40 20 20 1E-12 0.00 0 N N N LF 2 BENEFIT 7305 HIGH ** Not Eligible ** 1 40 20 20 1E-12 0.00 0 N N N H 3 NOZEROS LOW -1 00.00 1 40 5 5 1E-12 - 100.00 0 P N N L . , 4 NOZEROS -1 0 99 1 40 5 5 1E-12 -. 100.00 0 P Y Y . , 5 NOZEROS 0 1 99 1 40 5 5 1E-12 . 100.00 0 P N Y . , 6 NOZEROS 1 HIGH 00.00 1 40 5 5 1E-12 100.00 0 P N N H . , 7 PTSFRMT 0 3 0% 1 40 3 3 1E-12 0.00 0 N N N 8 PTSFRMT 4 6 3% 1 40 3 3 1E-12 0.00 0 N N N 9 PTSFRMT 7 8 6% 1 40 3 3 1E-12 0.00 0 N N N 10 PTSFRMT 9 10 8% 1 40 3 3 1E-12 0.00 0 N N N 11 PTSFRMT 11 HIGH 10% 1 40 3 3 1E-12 0.00 0 N N N H 12 USCURR LOW HIGH 000,000 1 40 7 7 1E-12 $ 1.61 0 P N N LH . , 13 CITY BR1 BR1 Birmingham UK 1 40 14 14 0 0.00 0 C N N 14 CITY BR2 BR2 Plymouth UK 1 40 14 14 0 0.00 0 C N N 15 CITY BR3 BR3 York UK 1 40 14 14 0 0.00 0 C N N 16 CITY US1 US1 Denver USA 1 40 14 14 0 0.00 0 C N N 17 CITY US2 US2 Miami USA 1 40 14 14 0 0.00 0 C N N 18 CITY **OTHER** **OTHER** INCORRECT CODE 1 40 14 14 0 0.00 0 C N N O 19 EVAL C C 1 1 40 1 1 0 0.00 0 I N N 20 EVAL E E 2 1 40 1 1 0 0.00 0 I N N 21 EVAL N N 0 1 40 1 1 0 0.00 0 I N N 22 EVAL O O 4 1 40 1 1 0 0.00 0 I N N 23 EVAL S S 3 1 40 1 1 0 0.00 0 I N N

 

You can use the SELECT or EXCLUDE statement to control which formats and informats are represented in the output control data set. For details, see SELECT Statement on page 447 and EXCLUDE Statement on page 434.

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, then 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 Example 5 on page 472.

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 that is specified in the LIBRARY= option. The output also contains global information and the specifics of each value or range that is defined for the format or informat. You can use the SELECT or EXCLUDE statement to control which formats and informats are represented in the FMTLIB output. For details, see SELECT Statement on page 447 and EXCLUDE Statement on page 434. For an example, see Example 6 on page 476.

The FMTLIB output shown in Output 23.2 contains a description of the NOZEROS. format, which is created in Building a Picture Format: Step by Step on page 443, and the EVAL. informat, which is created in Example 4 on page 470.

Output 23.2: 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 -100.00 P- F M100 -1< 0<99 P-. F M100 0 1<99 P. F M100 1HIGH 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

NUMBER OF VALUES

MIN LENGTH

MAX LENGTH

DEFAULT LENGTH

FUZZ

START

END

INVALUE

LABEL

Категории