Chapter Contents

Previous

Next
The FORMAT Procedure

Informat and Format Options

This section discusses options that are valid in the INVALUE, PICTURE, and VALUE statements. These options appear in parentheses after the informat or format name. They affect the entire informat or format that you are creating.
DEFAULT=length
specifies the default length of the informat or format. The value for DEFAULT= becomes the length of the informat or format if you do not give a specific length when you associate the informat or format with a variable.

The default length of a format is the length of the longest formatted value.

The default length of an informat depends on whether the informat is character or numeric. The default length of character informats is the length of the longest informatted value. The default of a numeric informat is 12 if you have numeric data to the left of the equals sign. If you have a quoted string to the left of the equals sign, the default length is the length of the longest string.

FUZZ=fuzz-factor
specifies a fuzz factor for matching values to a range. If a number does not match or fall in a range exactly but comes within fuzz-factor, the format considers it a match. For example, the following VALUE statement creates the LEVELS. format, which uses a fuzz factor of .2:
value levels (fuzz=.2) 1='A'
                       2='B'
                       3='C';

FUZZ=.2 means that if a variable value falls within .2 of a value on either end of the range, the format uses the corresponding formatted value to print the variable value. So the LEVELS. format formats the value 2.1 as B.

If a variable value matches one value or range without the fuzz factor, and also matches another value or range with the fuzz factor, the format assigns the variable value to the value or range that it matched without the fuzz factor.
Default: 1E-12 for numeric formats and 0 for character formats.
Tip: Specify FUZZ=0 to save storage space when you use the VALUE statement to create numeric formats.
Tip: A value that is excluded from a range using the < operator does not receive the formatted value, even if it falls into the range when you use the fuzz factor.

MAX=length
specifies a maximum length for the informat or format. When you associate the format with a variable, you cannot specify a width greater than the MAX= value.
Default: 40
Range: 1-40

MIN=length
specifies a minimum length for the informat or format.
Default: 1
Range: 1-40

NOTSORTED
stores values or ranges for informats or formats in the order that you define them. If you do not specify NOTSORTED, values or ranges are stored in sorted order by default. Use NOTSORTED if

Tip: SAS automatically sets the NOTSORTED option when you use the CPORT and the CIMPORT procedures to transport informats or formats between host platforms with different standard collating sequences. This can occur when you transport informats or formats between ASCII and EBCDIC host platforms.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.