Date: Thu, 29 Apr 2004 08:41:53 -0500
Reply-To: "Cardwell, Susan" <susan.cardwell@mwsu.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Cardwell, Susan" <susan.cardwell@mwsu.edu>
Subject: Import and save
Good morning folks,
I'm attempting to import/convert about 50 txt files, by semester, into .sav
files. I then need to combine them followed by running command syntax. I've
got the command syntax all set. My question is how to write a macro that
will get each file, convert it, then merge them. The path will remain
constant but in this example transfer901 will change to transfer902,
transfer903 and on up to transfer035.
I'm looking at ray's book, pg 217, on combining many files but that example
would be if each file is saved separately. I've also looked on his website
but find the macros use variables within the file.
Tia,
susan
GET DATA /TYPE = TXT
/FILE = 'C:\Documents and Settings\susan.cardwell\My
Documents\transfer901.txt'
/DELCASE = LINE
/DELIMITERS = ", "
/QUALIFIER = '"'
/ARRANGEMENT = DELIMITED
/FIRSTCASE = 2
/IMPORTCASE = ALL
/VARIABLES =
var002 F15
colcode F12
college A31
atttrans F8
course A8
credits F5.2
applied F8
var001 F8 .
EXECUTE.
Susan Cardwell, M.A.
Assistant Director, Institutional Research and Planning
Midwestern State University
3410 Taft Blvd.
Hardin 301
Wichita Falls, TX 76308
940-397-4533
http://web.mwsu.edu/institutionalresearch/
<http://web.mwsu.edu/institutionalresearch/>
"We who cut mere stones must always be envisioning cathedrals." - anonymous
|