IBM Support

How to reorder and drop variables within a SPSS syntax command?

Troubleshooting


Problem

Is it possible to drop some variables in an IBM SPSS Statistics data file without having to do this manually? ie: The data file includes 10 variables named v1 to v10. The variables that should be dropped are: v2, v3, v4, v5, v7, v8 and v9. The remaining variables in the active file should be reordered into v10, v1 and v6. How can this be done using Syntax?

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

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 the link to actual document below to access the full document. You will be asked to log on if you are not already logged in. 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

19992

Document Information

More support for:
IBM SPSS Statistics

Software version:
22.0, 21.0, 20.0, 19.0

Document number:
418225

Modified date:
16 April 2020

UID

swg21476727

Manage My Notification Subscriptions