ACCESS Procedure

FORMAT Statement

Changes a SAS format for a DBMS column
Interaction: ASSIGN, DROP, RESET


Required Arguments

specifies the column name or the positional equivalent from the LIST statement, which is the number that represents the column's place in the access descriptor. If the column name contains lowercase characters, special characters, or national characters, enclose the name in quotation marks.
specifies the SAS format to be used.


The FORMAT statement changes SAS variable formats from their default formats. The default SAS variable format is based on the data type of the DBMS column. See SAS/ACCESS documentation for your DBMS for information about default formats that SAS assigns to your DBMS data types.
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. When you use the FORMAT statement with access descriptors, the FORMAT statement also reselects columns that were previously dropped with the DROP statement.
For example, submit this statement to associate the DATE9. format with the BIRTHDATE column and with the second column in the access descriptor:
format 2=date9. birthdate=date9.;
The equal sign (=) is optional. For example, you can use the FORMAT statement to specify new SAS variable formats for four DBMS table columns:
   format productid  4.
          weight     e16.9
          fibersize  e20.13
          width      e16.9;