|
I am trying to import several 1000 ascii (*.TXT ) raster files into
into single variable SPSS files (syntax below for 1 file). I am new to SPSS scripting so I am looking for samples (basic or vb) that I can learn from? Thanks, Malanding Jaiteh GET DATA /TYPE=TXT /FILE='G:\*2.txt' /DELCASE=VARIABLES 1 /DELIMITERS="\t " /ARRANGEMENT=DELIMITED /FIRSTCASE=1 /IMPORTCASE=ALL /VARIABLES= Variable1 F13.3. CACHE. EXECUTE. DATASET NAME DataSet1 WINDOW=FRONT. SAVE OUTFILE='G:\*2.sav' /COMPRESSED. ===================== 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 |
|
if there is an identifier in each .txt file that tells you which .txt
file it is, or if this is a highly unusual situation, and you don't need to go back to the .txt data during data prep, you can use the copy command from your OS. For example, in Windows put all of the files in one folder. Go to the command prompt. Navigate to the folder. In teh command prompt window type copy *.txt all.asc. Exit the command prompt. Use explorer to go to the folder. Move all.asc to the place you want it. Rename it to .txt or just read it in as .asc. How are you using the word raster? I would usually associate it with binary or jpeg type data. Scripts are now considered by many to be obsolete, you may want to stick with syntax and use Python to generlize. If this does not meet your needs please repost and ask specifically about using python. Art Kendall Social Research Consultants On 6/28/2010 10:31 AM, Malanding Jaiteh wrote: > I am trying to import several 1000 ascii (*.TXT ) raster files into > into single variable SPSS files (syntax below for 1 file). I am new to > SPSS scripting so I am looking for samples (basic or vb) that I can > learn from? > > Thanks, > Malanding Jaiteh > > > GET DATA > /TYPE=TXT > /FILE='G:\*2.txt' > /DELCASE=VARIABLES 1 > /DELIMITERS="\t " > /ARRANGEMENT=DELIMITED > /FIRSTCASE=1 > /IMPORTCASE=ALL > /VARIABLES= > Variable1 F13.3. > CACHE. > EXECUTE. > DATASET NAME DataSet1 WINDOW=FRONT. > SAVE OUTFILE='G:\*2.sav' > /COMPRESSED. > > ===================== > 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
Art Kendall
Social Research Consultants |
|
|
In reply to this post by Art Kendall
http://listserv.uga.edu/archives/spssx-l.html There should also be info there on "devcentral". Art On 6/28/2010 1:11 PM, Ramón López wrote: Hello Sirs:===================== 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
Art Kendall
Social Research Consultants |
|
Raynald Levesque’s book: http://www.spss.com/sites/dm-book/ very good intro. Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art Kendall Similar questions have appeared on this list. I
suggest you check the archives from this list at Hello Sirs: 2010/6/28 Art Kendall <[hidden email]> if there is an identifier in each .txt file that tells
you which .txt
I am trying to import
several 1000 ascii (*.TXT ) raster files into
|
| Free forum by Nabble | Edit this page |
