saving data and labels

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

saving data and labels

wsu_wright
I have a client who wants a pasw syntax file to export sav files as tab delimited in which factors that have value labels will export BOTH the data value and label value (in separate columns of course but adjacent columns).

For example:

id  female
123   0
124   1

id   female   female_desc
123    0    male
124    1    female

The SAVE TRANSLATE command provides the option to save values or labels but doesn't appear to provide both and even if it did I don't see how it would get around the different variable names (orig & orig_desc, although the client would be ok with orig & orig.1, a naming convention pasw uses when restructuring data).

My current method seems long handed & was wondering about alternatives:

>open the original sav file.
>rename those variables which have value labels with the %_desc & save out the data file with labels
>close original sav file & reopen to reinstate variable labels
>import the saved tab delimited file.
>then match files to bring both together  on a common id
> then save out as tab delimited with a /keep subcomand to make columns adjacent when needed.

Client does not have python so I'd be restricted to standard pasw syntax.

Thanks for any assistance.

David

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD