TEMPORARY is used to make the effects of transformations
following its execution temporary. These transformations will
affect only the execution of the next procedure or procedure-like
command. Their effects will not be saved to the active dataset.
The only specification on
TEMPORARY is the command name.
TEMPORARY may not appear within a
DO IF or
construct. It may appear only once between procedures and
Scratch variables cannot be used following
An example may help to clarify:
DATA LIST /X 1-2. BEGIN DATA. 2 4 10 15 20 24 END DATA. COMPUTE X=X/2. TEMPORARY. COMPUTE X=X+3. DESCRIPTIVES X. DESCRIPTIVES X.
The data read by the first
DESCRIPTIVES are 4, 5, 8,
10.5, 13, 15. The data read by the first
DESCRIPTIVES are 1, 2,
5, 7.5, 10, 12.