Previous Page | Next Page

The FSVIEW Procedure

INFORMAT Statement


Associates informats with variables in the input data set. Informats are patterns that the SAS System uses to determine how values that are entered in variable columns are interpreted. The informats can be either SAS informats or custom informats that you have defined with the FORMAT procedure.
Reminder: INFORMAT statements are ignored if you use the NEW= option in the PROC FSVIEW statement.
Note: If you load an existing FORMULA entry, any informats that are recorded in the FORMULA entry take precedence over the informats that are specified in the INFORMAT statement.

INFORMAT variable-list informat <... variable-list-n informat-n>;

Arguments

At least one pair of the following arguments is required:

variable-list

consists of one or more variable names from the input data set.

informat

is the SAS informat or user-defined informat to associate with the specified variable or variables.


Using the INFORMAT Statement

You can use a single INFORMAT statement to assign the same informat to several variables or to assign different informats to different variables. You can use any number of INFORMAT statements with each PROC FSVIEW statement.

Informats that are specified in an INFORMAT statement take precedence over informats that are defined in the data set itself. Informats that are assigned in an INFORMAT statement remain in effect only for the duration of the procedure; the INFORMAT statement does not affect any informat assignments that are stored in the data set. You can use the INFORMAT command in the FSVIEW window to override informats that were specified in the INFORMAT statement.

When using INFORMAT statements with the FSVIEW procedure, you should make sure the informats that you assign to variables are compatible with the formats for those variables. That is, the output that the format produces should be valid input for the informat. Otherwise, you complicate the process of editing variable values. For example, suppose the data set that is displayed by the FSVIEW procedure contains a variable AMOUNT that is assigned the informat 10.2 and the format DOLLAR10.2. Because of the format, values in the AMOUNT column are displayed with commas and a leading dollar sign, so the value 1250 would be displayed as $1,250.00. However, if you edit this value (for example, changing it to $1,150.00) and press ENTER, an error condition occurs. The 10.2 informat does not permit the dollar sign ($) or comma characters in entered values. An appropriate informat for this variable is COMMA., which does permit these characters.

Refer to SAS Language Reference: Dictionary for more detailed information on informats and on the INFORMAT statement. See the description of the FORMAT procedure in Base SAS Procedures Guide for information on defining your own informats with the FORMAT procedure.

Previous Page | Next Page | Top of Page