Chapter Contents |
Previous |
Next |
FORMAT |
Optional statement | |
Applies to: | access descriptor and view descriptor |
Syntax | |
Details |
Syntax |
FORMAT variable-identifier
<=>
SAS-format-name
<...variable-identifier-n<=>SAS-format-name-n>; |
Details |
The FORMAT statement changes a SAS variable format from its default format; the default format is based on the database item's data type. You can enter formats for as many items as necessary using one FORMAT statement.
You cannot specify the FORMAT statement for a record.
The variable-identifier argument can be one of the following:
Note: Any name on the lefthand side of the equal sign must
be a SAS name, not a SYSTEM 2000 name. In an access descriptor, if the ASSIGN
statement is omitted, you must use the item number or component number (C-number)
on the lefthand side of the equal sign.
For example, if you want to associate the DATE9. format with the fifth item in the access descriptor, issue the following statement:
format 5 date9.;
You can only use the FORMAT statement with a view descriptor if the ASSIGN statement used when creating the access descriptor was specified with the NO value. When used in a view descriptor, the FORMAT statement automatically selects the reformatted item. That is, if you change the format associated with an item, you do not have to issue a SELECT statement for that item.
FMT is an alias for the FORMAT statement.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.