302 LIST Statement Appendix 1
Details
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
the 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 re–selects columns that were previously dropped with the DROP
statement.
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 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;
LIST Statement
Lists columns in the descriptor and gives information about them
Applies to:
access descriptor or view descriptor
Default: ALL
LIST <ALL | VIEW |<’>column-identifier<’>>;
ALL
lists all the DBMS columns in the table, the positional equivalents, the SAS variable
names, and the SAS variable formats that are available for a descriptor.
VIEW
lists all the DBMS columns that are selected for a view descriptor, their positional
equivalents, their SAS names and formats, and any subsetting clauses.
column-identifier
lists information about a specified DBMS column, including its name, positional
equivalent, SAS variable name and format, and whether it has been selected. If the
column name contains lowercase characters, special characters, or national
characters, enclose the name in quotation marks.
The column-identifier argument can be either the column name or the positional
equivalent, which is the number that represents the column’s place in the descriptor.
For example, to list information about the fifth column in the descriptor, submit the
following statement:
list 5;