importing txt fixed width files into SPSS 16.0.1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

importing txt fixed width files into SPSS 16.0.1

sue porter
Hello:

Does anyone know a fix for this problem?

When importing fixed width .txt file into the new SPSS, the program can't
see blanks.  For example, if positions 1 through 9 are a social security
number, and some records have no SSN, SPSS 16 does not see the spaces and
shoves the whole record 9 positions to the left.  It's a little hard to cut
records into variable when that happens.

We used the same .txt file in SPSS 15 and it worked fine.

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: importing txt fixed width files into SPSS 16.0.1

Lemon, John S.
Sue

Are you using the wizard to generate the code - if so I would check the settings on the delimiters . about the third, or fourth, screen of the dialog where you can specify the delimiters for strings etc. I believe that by default spaces are used as delimiters and if you check the box all should be OK. I have learnt from bitter experience that it pays to go slowly with the wizard and to also look at the snapshot of the data that appears at the bottom of the screen.

On the other hand if you are running from existing syntax it may be that you will have to add spaces as delimiters to that. ( I would run the wizard to see what it generates and then compare )


Best Wishes

John S. Lemon
Student Liaison Officer
Directorate of Information Technology (DIT) - University of Aberdeen
Edward Wright Building: Room G51
Tel:  +44 1224 273350
Fax: +44 1224 273372


> -----Original Message-----
> From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
> sue porter
> Sent: Wednesday, January 30, 2008 10:36 PM
> To: [hidden email]
> Subject: importing txt fixed width files into SPSS 16.0.1
>
> Hello:
>
> Does anyone know a fix for this problem?
>
> When importing fixed width .txt file into the new SPSS, the program can't
> see blanks.  For example, if positions 1 through 9 are a social security
> number, and some records have no SSN, SPSS 16 does not see the spaces and
> shoves the whole record 9 positions to the left.  It's a little hard to cut
> records into variable when that happens.
>
> We used the same .txt file in SPSS 15 and it worked fine.
>
> =====================
> 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

=====================
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