The ACCESS Procedure for PC Files

FORMAT Statement

Changes a SAS format for a PC file column.
Notes: When you use the FORMAT statement with access descriptors, the FORMAT statement also re-selects columns that were previously dropped with the DROP statement.

for DBF, DIF, WK1, WK3, WK4, Excel 4, Excel 5, and Excel 95 file formats under Windows operating environments access descriptor or view descriptor ASSIGN, DROP, RESET

Syntax

FORMAT | FMT 'column-identifier1' SAS format-name 'column-identifierN' SAS format-name

Details

The Format Statement changes a SAS format for a PC file column.
The FORMAT statement changes a SAS variable format from its default format. The default SAS variable format is based on the data type and format of the PC file column. (See your PC file's chapter for information about the default data types and formats that SAS assigns to PC files data.)
An editing statement, such as FORMAT, must follow the CREATE statement and the database-description statements when you create a descriptor.
See "Create Statement" for additional information .
The column-identifier argument can be either the column name or the positional equivalent from the LIST statement. This is the number that represents the column's place in the access descriptor. To associate the DATE9. format with the BIRTHDATE column, and the second column in the access descriptor, submit this statement:
FORMAT 2=DATE9. birthdate=DATE9.;
The column identifier is specified on the left and the SAS format is specified on the right of the expression. The equal sign is optional. If the column name contains lowercase characters, special characters, or national characters, enclose the name in quotation marks. You can enter formats for as many columns as you want in one FORMAT statement.
You can use the FORMAT statement with a view descriptor only if the ASSIGN statement that was used when creating the access descriptor was specified with the NO value.