|
Hi,
Using SPSS 15 at the moment, I was wondering how to save text files from single columns of tables using OMS. My simplified OMS command so far: OMS /SELECT TABLES /IF COMMANDS = ["Summarize"] SUBTYPES = ["Report"] /DESTINATION FORMAT = TABTEXT OUTFILE = "Pathname\outfile.txt". SUMMARIZE /TABLES=MyVariable /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100 /TITLE='Case Summaries' /MISSING=VARIABLE /CELLS=COUNT . OMSEND . This produces a tab delimited text file looking like this: " Summarize Case Summaries(a) MyVariable 1 56.00 2 66.00 3 68.00 4 70.00 5 76.00 6 184.00 7 192.00 8 198.00 9 200.00 10 202.00 Total N 10 a Limited to first 100 cases. " However, all I need is a file with numbers from column MyVariable ("56, 66, etc."), no strings or anything else. I can't seem to figure out how to do that using OMS (or SPSS in general). Thanks in advance! Esther ===================== 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 |
|
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Esther Fujiwara Sent: Wednesday, January 21, 2009 9:02 PM To: [hidden email] Subject: [SPSSX-L] OMS text Hi, Using SPSS 15 at the moment, I was wondering how to save text files from single columns of tables using OMS. My simplified OMS command so far: OMS /SELECT TABLES /IF COMMANDS = ["Summarize"] SUBTYPES = ["Report"] /DESTINATION FORMAT = TABTEXT OUTFILE = "Pathname\outfile.txt". SUMMARIZE /TABLES=MyVariable /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100 /TITLE='Case Summaries' /MISSING=VARIABLE /CELLS=COUNT . OMSEND . This produces a tab delimited text file looking like this: " Summarize Case Summaries(a) MyVariable 1 56.00 2 66.00 3 68.00 4 70.00 5 76.00 6 184.00 7 192.00 8 198.00 9 200.00 10 202.00 Total N 10 a Limited to first 100 cases. " However, all I need is a file with numbers from column MyVariable ("56, 66, etc."), no strings or anything else. I can't seem to figure out how to do that using OMS (or SPSS in general). Thanks in advance! Esther [>>>Peck, Jon] OMS works only at the level of entire objects. You can't use it to save or parts of a table. But you can do this by combining OMS with other SPSS data manipulation commands. First, direct your OMS output to a dataset, e.g., DATASET DECLARE somename. OMS ... /DESTINATION OUTFILE=somename FORMAT=SAV. ... OMSEND. Then activate this dataset and save just the column you want as text. Something like DATASET ACTIVATE somename. SAVE TRANSLATE OUTFILE="c:/Pathname/outfile.txt" /TYPE=TAB /KEEP = somevariablename. HTH, Jon Peck ===================== 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 |
|
In reply to this post by Esther Fujiwara
You could use OMS to write the table contents to an SPSS dataset, then use SAVE TRANSLATE to write the data to a tab-delimited file.
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Esther Fujiwara Sent: Wednesday, January 21, 2009 10:02 PM To: [hidden email] Subject: OMS text Hi, Using SPSS 15 at the moment, I was wondering how to save text files from single columns of tables using OMS. My simplified OMS command so far: OMS /SELECT TABLES /IF COMMANDS = ["Summarize"] SUBTYPES = ["Report"] /DESTINATION FORMAT = TABTEXT OUTFILE = "Pathname\outfile.txt". SUMMARIZE /TABLES=MyVariable /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100 /TITLE='Case Summaries' /MISSING=VARIABLE /CELLS=COUNT . OMSEND . This produces a tab delimited text file looking like this: " Summarize Case Summaries(a) MyVariable 1 56.00 2 66.00 3 68.00 4 70.00 5 76.00 6 184.00 7 192.00 8 198.00 9 200.00 10 202.00 Total N 10 a Limited to first 100 cases. " However, all I need is a file with numbers from column MyVariable ("56, 66, etc."), no strings or anything else. I can't seem to figure out how to do that using OMS (or SPSS in general). Thanks in advance! Esther ===================== 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 |
|
In reply to this post by Esther Fujiwara
As ViAnn Beadle politely pointed out to me, you don't need OMS to solve this problem at all. Just use the WRITE command:
write outfile="Pathname\outfile.txt" /myvariable. execute. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Esther Fujiwara Sent: Wednesday, January 21, 2009 10:02 PM To: [hidden email] Subject: OMS text Hi, Using SPSS 15 at the moment, I was wondering how to save text files from single columns of tables using OMS. My simplified OMS command so far: OMS /SELECT TABLES /IF COMMANDS = ["Summarize"] SUBTYPES = ["Report"] /DESTINATION FORMAT = TABTEXT OUTFILE = "Pathname\outfile.txt". SUMMARIZE /TABLES=MyVariable /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100 /TITLE='Case Summaries' /MISSING=VARIABLE /CELLS=COUNT . OMSEND . This produces a tab delimited text file looking like this: " Summarize Case Summaries(a) MyVariable 1 56.00 2 66.00 3 68.00 4 70.00 5 76.00 6 184.00 7 192.00 8 198.00 9 200.00 10 202.00 Total N 10 a Limited to first 100 cases. " However, all I need is a file with numbers from column MyVariable ("56, 66, etc."), no strings or anything else. I can't seem to figure out how to do that using OMS (or SPSS in general). Thanks in advance! Esther ===================== 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 |
|
In reply to this post by Esther Fujiwara
This looks to me you just want to save a particular variable's value for
each case in a text file. If that's true, then use WRITE command to do this. Note that WRITE is a transformation and needs a following EXECUTE command to force a data pass. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Esther Fujiwara Sent: Wednesday, January 21, 2009 9:02 PM To: [hidden email] Subject: OMS text Hi, Using SPSS 15 at the moment, I was wondering how to save text files from single columns of tables using OMS. My simplified OMS command so far: OMS /SELECT TABLES /IF COMMANDS = ["Summarize"] SUBTYPES = ["Report"] /DESTINATION FORMAT = TABTEXT OUTFILE = "Pathname\outfile.txt". SUMMARIZE /TABLES=MyVariable /FORMAT=VALIDLIST NOCASENUM TOTAL LIMIT=100 /TITLE='Case Summaries' /MISSING=VARIABLE /CELLS=COUNT . OMSEND . This produces a tab delimited text file looking like this: " Summarize Case Summaries(a) MyVariable 1 56.00 2 66.00 3 68.00 4 70.00 5 76.00 6 184.00 7 192.00 8 198.00 9 200.00 10 202.00 Total N 10 a Limited to first 100 cases. " However, all I need is a file with numbers from column MyVariable ("56, 66, etc."), no strings or anything else. I can't seem to figure out how to do that using OMS (or SPSS in general). Thanks in advance! Esther ===================== 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 |
|
In reply to this post by Esther Fujiwara
Great, thanks a lot! I am using the SAVE TRANSLATE OUTFILE command now,
without OMS and that works nicely. ===================== 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 |
| Free forum by Nabble | Edit this page |
