|
Hello all,
I have a dinosaur-version 9 SPSS package and need to be able to read a pipe-delimited .txt file (an example follows). Do you know whether the later versions of SPSS can read this type of a file? I know that Excel can, but the file has more than 65,000 records so I cannot use Excel.
Sample of a pipe-delimited .txt file:
LastName|FrstName|EasyID|ApID|SexCode|RaceCode|RecruitNum1|RecruitNum2|RecruitNum3|DOB|JobTitle|
MCCCCCC|PAUL|MCK-88-4996|943134|M|5|60944|00108446|0001|1969-08-18 00:00:00|CADET, DOG CATCHER
KAAAAA|JOYCE|KAT-23-0632|1149334|F|3|50941|00108446|0001|1965-12-03 00:00:00|CADET, BASKET WEAVER
SAAAA|PAUL|SAN-52-9169|1323144|M|4|30983|00108446|0001|1978-05-12 00:00:00|CADET, COOK
CHP Human Resources Section (077) Manager, Selection Research (916) 843-3783 |
|
Piece of cake: GET DATA /TYPE=TXT /FILE="C:\temp\pipedelimited.txt" /DELCASE=LINE /DELIMITERS=" ,|" /ARRANGEMENT=DELIMITED /FIRSTCASE=2 /IMPORTCASE=ALL /VARIABLES= LastName A7 FrstName A5 EasyID A11 ApID F7.0 SexCode A1 RaceCode F1.0 RecruitNum1 F5.0 RecruitNum2 F8.0 RecruitNum3 F4.0 DOB A10 JobTitle A8 V12 A5 V13 F1.0 V14 A6 V15 A7. Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Hello all, I have a dinosaur-version 9 SPSS package and need to be able to read a pipe-delimited .txt file (an example follows). Do you know whether the later versions of SPSS can read this type of a file? I know that Excel can, but the file has more than 65,000 records so I cannot use Excel. Sample of a pipe-delimited .txt file: LastName|FrstName|EasyID|ApID|SexCode|RaceCode|RecruitNum1|RecruitNum2|RecruitNum3|DOB|JobTitle| MCCCCCC|PAUL|MCK-88-4996|943134|M|5|60944|00108446|0001|1969-08-18 00:00:00|CADET, DOG CATCHER KAAAAA|JOYCE|KAT-23-0632|1149334|F|3|50941|00108446|0001|1965-12-03 00:00:00|CADET, BASKET WEAVER SAAAA|PAUL|SAN-52-9169|1323144|M|4|30983|00108446|0001|1978-05-12 00:00:00|CADET, COOK Kathy Marshall CHP Human Resources Section (077) Manager, Selection Research (916) 843-3783 |
|
In version 9, you can do this with the
DATA LIST command, by specifying a list of quoted delimiters in parentheses,
as in:
data list list ("|", ",") /var1 var2 var3. begin data 1|2|3 4,5,6 end data. list.
Piece of cake: GET DATA /TYPE=TXT /FILE="C:\temp\pipedelimited.txt" /DELCASE=LINE /DELIMITERS=" ,|" /ARRANGEMENT=DELIMITED /FIRSTCASE=2 /IMPORTCASE=ALL /VARIABLES= LastName A7 FrstName A5 EasyID A11 ApID F7.0 SexCode A1 RaceCode F1.0 RecruitNum1 F5.0 RecruitNum2 F8.0 RecruitNum3 F4.0 DOB A10 JobTitle A8 V12 A5 V13 F1.0 V14 A6 V15 A7. Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Hello all, I have a dinosaur-version 9 SPSS package and need to be able to read a pipe-delimited .txt file (an example follows). Do you know whether the later versions of SPSS can read this type of a file? I know that Excel can, but the file has more than 65,000 records so I cannot use Excel. Sample of a pipe-delimited .txt file: LastName|FrstName|EasyID|ApID|SexCode|RaceCode|RecruitNum1|RecruitNum2|RecruitNum3|DOB|JobTitle| MCCCCCC|PAUL|MCK-88-4996|943134|M|5|60944|00108446|0001|1969-08-18 00:00:00|CADET, DOG CATCHER KAAAAA|JOYCE|KAT-23-0632|1149334|F|3|50941|00108446|0001|1965-12-03 00:00:00|CADET, BASKET WEAVER SAAAA|PAUL|SAN-52-9169|1323144|M|4|30983|00108446|0001|1978-05-12 00:00:00|CADET, COOK Kathy Marshall CHP Human Resources Section (077) Manager, Selection Research (916) 843-3783 |
| Free forum by Nabble | Edit this page |
