fixed ASCII

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

fixed ASCII

Handel, Richard W.

Hi All,

 

Is it possible to have SPSS write data out to a file in fixed ASCII format with control over the number of columns?  I am trying to save a file in .dat format to read into MPlus, but Mplus does not accept files that exceed 40 characters per line.  Any thoughts?  The data file is way too large for me to do manual returns at the end of each line.

 

Thanks!

 

 

 

Richard W. Handel, Ph.D.

Associate Professor

Department of Psychiatry and Behavioral Sciences

Eastern Virginia Medical School

825 Fairfax Avenue, Hofheimer Hall

Norfolk, VA 23507

Phone (757)-446-7992

 

Reply | Threaded
Open this post in threaded view
|

Re: fixed ASCII

Handel, Richard W.

Disregard the email below.  I made an error reading the data into Mplus.  

 

Richard W. Handel, Ph.D.

Associate Professor

Department of Psychiatry and Behavioral Sciences

Eastern Virginia Medical School

825 Fairfax Avenue, Hofheimer Hall

Norfolk, VA 23507

Phone (757)-446-7992

 


From: Handel, Richard W.
Sent: Monday, March 08, 2010 1:13 PM
To: '[hidden email]'
Subject: fixed ASCII

 

Hi All,

 

Is it possible to have SPSS write data out to a file in fixed ASCII format with control over the number of columns?  I am trying to save a file in .dat format to read into MPlus, but Mplus does not accept files that exceed 40 characters per line.  Any thoughts?  The data file is way too large for me to do manual returns at the end of each line.

 

Thanks!

 

 

 

Richard W. Handel, Ph.D.

Associate Professor

Department of Psychiatry and Behavioral Sciences

Eastern Virginia Medical School

825 Fairfax Avenue, Hofheimer Hall

Norfolk, VA 23507

Phone (757)-446-7992

 

Reply | Threaded
Open this post in threaded view
|

Re: fixed ASCII

Jon K Peck
In reply to this post by Handel, Richard W.

Take a look at the WRITE command.
Jon Peck
SPSS, an IBM Company
[hidden email]
312-651-3435



From: "Handel, Richard W." <[hidden email]>
To: [hidden email]
Date: 03/08/2010 11:16 AM
Subject: [SPSSX-L] fixed ASCII
Sent by: "SPSSX(r) Discussion" <[hidden email]>





Hi All,
 
Is it possible to have SPSS write data out to a file in fixed ASCII format with control over the number of columns?  I am trying to save a file in .dat format to read into MPlus, but Mplus does not accept files that exceed 40 characters per line.  Any thoughts?  The data file is way too large for me to do manual returns at the end of each line.
 
Thanks!
 
 
 
Richard W. Handel, Ph.D.
Associate Professor
Department of Psychiatry and Behavioral Sciences
Eastern Virginia Medical School
825 Fairfax Avenue, Hofheimer Hall
Norfolk, VA 23507
Phone (757)-446-7992
 

Reply | Threaded
Open this post in threaded view
|

Re: fixed ASCII

Michael Kruger
In reply to this post by Handel, Richard W.
Richard,

You could use the Data Restructure feature in SPSSand convert any
columns that are beyond the 40 columns to a 2nd row of data for each
case and then export to an ASCII text file. If needed you could use Exce
as an intermediary step between SPSS and ASCII, but you shouldn't have
to do that. If you do this I think you need to make sure you don't have
any blank data fields.


MK

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