AT_BANNER([AUTORECODE procedure]) AT_SETUP([AUTORECODE numbers and short strings]) AT_DATA([autorecode.sps], [data list /X 1-5(a) Y 7. begin data. lasdj 1 asdfk 0 asdfj 2 asdfj 1 asdfk 2 asdfj 9 lajks 9 asdfk 0 asdfk 1 end data. autorecode x y into A B/descend. list. compute Z=trunc(y/2). autorecode z into W. list. ]) AT_CHECK([pspp -O format=csv autorecode.sps], [0], [Table: Reading 1 record from INLINE. Variable,Record,Columns,Format X,1,1- 5,A5 Y,1,7- 7,F1.0 Table: Data List X,Y,A,B lasdj,1,1.00,3.00 asdfk,0,3.00,4.00 asdfj,2,4.00,2.00 asdfj,1,4.00,3.00 asdfk,2,3.00,2.00 asdfj,9,4.00,1.00 lajks,9,2.00,1.00 asdfk,0,3.00,4.00 asdfk,1,3.00,3.00 Table: Data List X,Y,A,B,Z,W lasdj,1,1.00,3.00,.00,1.00 asdfk,0,3.00,4.00,.00,1.00 asdfj,2,4.00,2.00,1.00,2.00 asdfj,1,4.00,3.00,.00,1.00 asdfk,2,3.00,2.00,1.00,2.00 asdfj,9,4.00,1.00,4.00,3.00 lajks,9,2.00,1.00,4.00,3.00 asdfk,0,3.00,4.00,.00,1.00 asdfk,1,3.00,3.00,.00,1.00 ]) AT_CLEANUP AT_SETUP([AUTORECODE long strings and check the value labels]) AT_DATA([ar.sps], [data list notable list /s (a16) x *. begin data. widgets 1 thingummies 2 oojars 3 widgets 4 oojars 5 thingummies 6 oojimiflips 7 end data. autorecode s into new. list. display dictionary. ]) AT_CHECK([pspp -O format=csv ar.sps], [0], [Table: Data List s,x,new widgets ,1.00,4.00 thingummies ,2.00,3.00 oojars ,3.00,1.00 widgets ,4.00,4.00 oojars ,5.00,1.00 thingummies ,6.00,3.00 oojimiflips ,7.00,2.00 Variable,Description,,Position s,Format: A16,,1 ,Measure: Nominal,, ,Display Alignment: Left,, ,Display Width: 16,, x,Format: F8.2,,2 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, new,Format: F8.2,,3 ,Measure: Scale,, ,Display Alignment: Right,, ,Display Width: 8,, ,1,oojars, ,2,oojimiflips, ,3,thingummies, ,4,widgets, ]) AT_CLEANUP AT_SETUP([AUTORECODE group subcommand]) AT_DATA([ar-group.sps], [data list notable list /x * y *. begin data. 11 10 12 12 13 15 14 11 15 12 16 18 end data. autorecode x y into a b /group. list. ]) AT_CHECK([pspp -O format=csv ar-group.sps], [0], [Table: Data List x,y,a,b 11.00,10.00,2.00,1.00 12.00,12.00,3.00,3.00 13.00,15.00,4.00,6.00 14.00,11.00,5.00,2.00 15.00,12.00,6.00,3.00 16.00,18.00,7.00,8.00 ]) AT_CLEANUP AT_SETUP([AUTORECODE group - string variables]) AT_DATA([strings.sps], [data list notable list /x (a8) y (a16). begin data. fred bert charlie " " delta echo " " windows " " nothing end data. autorecode x y into a b /group. delete variables x y. list. ]) AT_CHECK([pspp -O format=csv strings.sps], [0], [Table: Data List a,b 7.00,3.00 4.00,1.00 5.00,6.00 2.00,9.00 2.00,8.00 ]) AT_CLEANUP