Chapter Contents

Previous

Next
The DATASETS Procedure

FORMAT Statement


Permanently assigns, changes, and removes variable formats in the SAS data set specified in the MODIFY statement.

Restriction: Must appear in a MODIFY RUN group
Featured in: Modifying SAS Data Sets


FORMAT variable-list-1 <format-1>
<...variable-list-n <format-n>>;


Required Arguments

variable-list
specifies one or more variables whose format you want to assign, change, or remove. If you want to disassociate a format with a variable, list the variable last in the list with no format following. For example:
   format x1-x3 4.1 time hhmm2.2 age;


Options

format
specifies a format to apply to the variable or variables listed before it. If you do not specify a format, the FORMAT statement removes any format associated with the variables in variable-list.

Note:    You can use shortcut methods for specifying variables, such as the keywords _NUMERIC, _CHARACTER_, and _ALL_. See Shortcuts for Specifying Lists of Variable Names for more information.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.