Syntactically change variable format to a specific width and/or format.

Technote (FAQ)


Question

How can I syntactically or via the user interface change all of my String variables to a specific Width, or my Numeric variables to a specific Format.

Cause

For Example, I have 600 string variables and I do not want to change the width one by one in the variable tab. I need a more streamlined method.

Answer

* The following ALTER TYPE command will change all of your String Variables in your data set to a Width of 50.
ALTER TYPE ALL (A=A50).

* The following ALTER TYPE command will change all of your Numeric Variables in your data set to a Format of 8.5.
ALTER TYPE ALL (F=F8.5).

For more information and examples of the 'ALTER TYPE' syntax command, from within SPSS Statistics Help menu launch help topics and search on 'Overview (ALTER TYPE command)'.

Note:
The ALTER TYPE command was introduced is SPSS Statistics version 16.0.


Rate this page:

(0 users)Average rating

Document information


More support for:

SPSS Statistics

Software version:

18.0, 19.0, 20.0, 21.0

Operating system(s):

Platform Independent

Reference #:

1625154

Modified date:

2013-05-09

Translate my page

Machine Translation

Content navigation