Overview (NUMERIC command)
NUMERIC
declares
new numeric variables that can be referred to in the transformation
language before they are assigned values. Commands such as COMPUTE
, IF
, RECODE
, and COUNT
can be used to assign values to the
new numeric variables.
Basic Specification
The basic
specification is the name of the new variables. By default, variables
are assigned a format of F8.2
(or the format that is specified on the SET
command).
Syntax Rules
- A FORTRAN-like format can be specified in parentheses following a variable or variable list. Each specified format applies to all variables in the list. To specify different formats for different groups of variables, separate each format group with a slash.
- Keyword
TO
can be used to declare multiple numeric variables. The specified format applies to each variable that is named and implied by theTO
construction. -
NUMERIC
can be used within an input program to predetermine the order of numeric variables in the dictionary of the active dataset. When used for this purpose,NUMERIC
must precedeDATA LIST
in the input program.
Operations
-
NUMERIC
takes effect as soon as it is encountered in the command sequence. Special attention should be paid to the position ofNUMERIC
among commands. See the topic Command Order for more information. - The specified formats (or the defaults) are used as both print and write formats.
- Permanent or temporary variables are initialized to the system-missing value. Scratch variables are initialized to 0.
- Variables that are named on
NUMERIC
are added to the working file in the order in which they are specified. The order in which they are used in transformations does not affect their order in the active dataset.