Convert SPSS data to Winsteps format using SPSS syntax
2006-09-08    Zhang, Z.   
Print from: Zhiyong Zhang \'s Psychometric Website
Address: https://www.psychstat.org/us/article.php/63
Convert SPSS data to Winsteps format using SPSS syntax

This SPSS syntax can be used to convert SPSS data into Winsteps format.

A typical SPSS data set may look like,

v1 v2 v3 v4

p1       M               0        1
p2       F               1        1

A typical Winsteps data set looks like,

p1      M 01
p2      F 11

To convert data, the following syntax can be used,

WRITE OUTFILE='C:\test.dat'
  TABLE
  /v1 v2  (A8 A1) v3 11 v4 12.
EXECUTE.

"test.dat" is the file you want to save the data after conversion. A8 means v1 takes 8 columns and from col1-col8 is the frist variable. A1 means v2 takes one column. Thus it will be on colum 9. v3 11 means put the data of v3 on 11th column and similiarly v4 12 put variable v4 on the 12th column.

Editor: johnny