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.
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.