Thanks for your prompt reply. Let me brief you about floating data, may be
it's not a right word which create confusion.
respondent answer 1,2,4,6,8th categories. with my below code I can capture
respondent.
(3rd and 5th in above case) which I am saying floating data.
Hope this make it more clear. Please revert me ASAP.
> Perhaps you would be so kind and enlighten us to what you mean by a
> "floating data file"?
> I have never heard that particular expression before in 30 years of doing
> data analysis ;-).
> I am not even going to attempt to apply my incomparable ESPss intuitions
> to second guess.
> Note FWIW: SPSS respects the ancient FORTRAN record specifications in case
> it helps.
> What the following shall convey is that you can (and should) instruct SPSS
> to place *ANY* variable into *ANY* location you desire in the output file
> (Fd.w,A,N,X etc).
> DATA LIST FREE / A B C D (4F).
> BEGIN DATA
> 1 2 3 4
> end data
> STRING ALPHA (A8).
> COMPUTE alpha="abcdefgh".
> WRITE OUTFILE "C:\test1.txt" /A B C D (4(F8.3,1X/)).
> 1.000
> 2.000
> 3.000
> 4.000
>
> WRITE OUTFILE "C:\test2.txt" /A alpha B alpha C alpha D alpha
> (4(F8.3,1X,A8/)).
> EXE.
>
> 1.000 abcdefgh
> 2.000 abcdefgh
> 3.000 abcdefgh
> 4.000 abcdefgh
>
> WRITE OUTFILE "C:\test3.txt" /A alpha B alpha C alpha D alpha
> (2(F8.3,1X,A8/N4,1X,A8/)).
> EXE.
> 1.000 abcdefgh
> 0002 abcdefgh
> 3.000 abcdefgh
> 0004 abcdefgh
>
> GauravSrivastava wrote
> Hi ALL,
>
> I am trying to convert the SPSS data into ASCII card data. I am using
> below code to convert it:
>
> GET FILE ='C:\Users\Gaurav S\Documents\Projects\Data Check\5687 - J&J Mega
> Tracker\Adult\HONGKONG\Data\p752065020_gsrivastava_20562058.sav'.
> WRITE OUTFILE = 'C:\Users\Gaurav S\Documents\Projects\Data Check\5687 -
> J&J Mega Tracker\Adult\HONGKONG\Data\DataCrd.dat'
> RECORDS=10
> /1 RespID 1-6 (N) '01' 7-8 R1 9 R2 10-11 (N) Respondent_ID 12-62 (A)
> /2 RespID 1-6 (N) '02' 7-8 Q1 9 Q21 10 Q22 11 Q23 12 Q24 13
> /3 RespID 1-6 (N) '03' 7-8 Data2 9-13 (comma,2)
> /4 RespID 1-6 (N) '04' 7-8 R1_01 11-12(N) R1_02 13-14(N) R1_03 15-16(N)
> R1_04 17-18(N) R1_05 19-20(N)R1_06 21-22(N)R1_07 23-24(N)R1_08
> 25-26(N)R1_09 27-28(N)R1_10 29-30(N)R1_99 31-32(N).
> Execute.
>
> It's working fine but it giving me a fixed width card ASCII data. I need
> the floating data file.
>
> Please help. I need it urgently.
>
> Regards,
> Gaurav
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
>
http://spssx-discussion.1045642.n5.nabble.com/SPSS-data-file-to-ASCII-card-data-file-tp5599936p5600089.html