IBM Support

Which SPSS commands convert string to numeric variables?

Troubleshooting


Problem

I'm using SPSS for Windows. In the past, I've been able to convert variables I have stored in a string format to numeric variables simply by opening a Define Variable menu and checking the appropriate option under the Type button. SPSS echoes in my Output Viewer (or Navigator, or Window) a FORMATS command specifying my string variable name and a format of F8. Now I'd like to do the same thing in an SPSS command file. Yet when I include the very command SPSS claims to have used in converting my previous variable, I get a message saying FORMATS strngvar (F8). >Error # 4836 in column 9. Text: STRNGVAR >Only the formats A and AHEX can be applied to string variables. >This command not executed. If this command works when SPSS changes the format in the Define Variable menu, why doesn't it work when I invoke it through command syntax?

Symptom

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"19.0","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Historical Number

14810

Document Information

More support for:
IBM SPSS Statistics

Software version:
19.0

Document number:
417605

Modified date:
16 April 2020

UID

swg21476065

Manage My Notification Subscriptions