space
Previous Page | Next Page

ACCESS Procedure Reference

FORMAT Statement



Changes the SAS format for a DBMS column.
Optional statement
Applies to: access descriptor or view descriptor

Syntax
Details

Syntax

FORMAT <">column-identifier-1<"> <=> SAS-format-name
<...<">column-identifier-n<"> <=> SAS-format-name>;


Details

The FORMAT statement changes a SAS column format from its default format; the default SAS column format is based on the data type of the DBMS column. (See ACCESS Procedure Data Conversions for information about the default formats that the ACCESS procedure assigns to your DBMS data types.)

The column-identifier argument can be either the CA-Datacom/DB field name or the positional equivalent from the LIST statement, which is the number that represents the column's place in the access descriptor. For example, to associate the DATE9. format with the BIRTHDATE column and with the second column in the access descriptor, submit the following 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 CA-Datacom/DB field name contains 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.

Note:   You do not have to issue a SELECT statement in a view descriptor for the columns included in the FORMAT statement. The FORMAT statement selects the columns. When you use the FORMAT statement in access descriptors, the FORMAT statement reselects columns that were previously dropped with the DROP statement.   [cautionend]

FMT is the alias for the FORMAT statement.

space
Previous Page | Next Page | Top of Page