Chapter Contents |
Previous |
Next |
The FSVIEW Procedure |
Reminder: | The FORMAT statement is ignored when you use the NEW= option in the PROC FSVIEW statement. |
Note: | If you load an existing FORMULA entry, any formats that are recorded in the FORMULA entry take precedence over the formats that are specified in the FORMAT statement. |
FORMAT variable-list format <... variable-list-n format-n>; |
Arguments |
At least one pair of the following arguments is required:
Using the FORMAT Statement |
You can use a single FORMAT statement to assign the same format to several variables or to assign different formats to different variables. You can use any number of FORMAT statements with each PROC FSVIEW statement.
Formats that are specified in a FORMAT statement take precedence over formats that are defined in the data set itself. Formats that are assigned in a FORMAT statement remain in effect only for the duration of the procedure; the FORMAT statement does not affect any format assignments that are stored in the data set. You can use the FORMAT command in the FSVIEW window to override formats that were specified in the FORMAT statement.
Format widths determine the width of the columns for the associated variables in the FSVIEW display.
Be aware that the format you assign a variable affects the informats you can assign with the INFORMAT statement. For example, suppose the data set that is displayed by the FSVIEW procedure contains a variable AMOUNT that is assigned the format DOLLAR10.2 but an informat of 10.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 formats and on the FORMAT statement. See the description of the FORMAT procedure in SAS Procedures Guide for information on defining your own formats with the FORMAT procedure.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.