Dear SPSS fans, I'm doing some Monte-Carlo random sampling and want to export the results (CTABLES with one heading and one row) into a single text file. Problem: My SPSS Viewer freezes once a certain amount of output has been produced (between 500 and 1000 trials) after which SPSS has to be closed. I used OUTPUT EXPORT and OMS and it happens either way. I'm going to try some more tricks but: Did anybody experience similar limitations and how did you solve it? Any opinion is appreciated. Thanks a lot, Mario Mario Giesel Munich, Germany |
The capacity of the Viewer has increased in recent versions over what it used to be able to handle, but using OMS you can completely bypass the Viewer by specifying /DESTINATION VIEWER=NO. Since you can stack Viewer requests, you can first suppress all output and follow that with the selected table export also with VIEWER=NO. Alternatively you might want to consider generating sav files via OMS and merging them later. On Fri, Dec 15, 2017 at 8:08 AM, Mario Giesel <[hidden email]> wrote:
|
Thanks, Jon, that was exactly the trick I was looking for: * works!. OMS /SELECT TABLES /IF SUBTYPE = ' Custom Table' /DESTINATION VIEWER = NO FORMAT = TABTEXT OUTFILE = 'test.txt'. * ctables commands. OMS. I don't understand your last sentence, though. I tried this but did not get any output: * does not work. PRESERVE. SET ERRORS OFF RESULTS OFF. OMS /SELECT TABLES /IF SUBTYPE = ' Custom Table' /DESTINATION VIEWER = NO FORMAT = TABTEXT OUTFILE = 'test.txt'. * ctables commands. OMS. RESTORE. * does not work. OMS /SELECT TABLES /IF SUBTYPE = ' Custom Table' /DESTINATION VIEWER = NO FORMAT = TABTEXT OUTFILE = 'test.txt'. PRESERVE. SET ERRORS OFF RESULTS OFF. * ctables commands. RESTORE. OMS. It would be perfect to suppress any viewer output. What am I missing? Mario Giesel Munich, Germany Jon Peck <[hidden email]> schrieb am 16:16 Freitag, 15.Dezember 2017: The capacity of the Viewer has increased in recent versions over what it used to be able to handle, but using OMS you can completely bypass the Viewer by specifying /DESTINATION VIEWER=NO. Since you can stack Viewer requests, you can first suppress all output and follow that with the selected table export also with VIEWER=NO. Alternatively you might want to consider generating sav files via OMS and merging them later. On Fri, Dec 15, 2017 at 8:08 AM, Mario Giesel <[hidden email]> wrote:
|
In reply to this post by spss.giesel@yahoo.de
The last line should be
OMSEND. Not OMS. RTFM. HTH. ===================== 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 spss.giesel@yahoo.de
You should use OMSEND to finish an OMS request. With text formats, the output is written incrementally as it is created, but for a sav file, it only happens at OMSEND time. If you are generating a sav file, the tables have to have the same structure since multiple tables would be going into the same file. PRESERVE and RESTORE have no effect on OMS (but should work on the SET commands). If you want to suppress all Viewer output but direct the CTABLES output to a file, you can do OMS selecting everything with VIEWER=NO followed by OMS selecting the table with a file destination followed by CTABLES followed by OMSEND. On Sat, Dec 16, 2017 at 8:33 AM Mario Giesel <[hidden email]> wrote:
-- |
In reply to this post by David Marso-2
Thanks, guys, I got this working: OMS /SELECT ALL /DESTINATION VIEWER = NO. OMS /SELECT TABLES /IF SUBTYPE = ' Custom Table' /DESTINATION VIEWER = NO FORMAT = SAV OUTFILE = 'test.sav'. * operations. OMSEND. The clue that SAV files are written at OMSEND time was very helpful as I did not consider this. I expected repeating variable names, which of course makes no sense in a sav file. However, the stacked OMS commands did not work for a text file - it was empty. But I'm more happy with the SAV solution, anyway. Btw I only misspelled OMSEND in the reduced example I gave, not in the original syntax. Thanks again, Mario Mario Giesel Munich, Germany David Marso <[hidden email]> schrieb am 18:28 Samstag, 16.Dezember 2017: The last line should be OMSEND. Not OMS. RTFM. HTH. ===================== 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 |
Administrator
|
Hi Mario. If there is any possibility of other OMS commands being in effect,
I suggest you add /TAG sub-commands. (I'm surprised Jon didn't pester you about this--he has pestered me about it in the past!) ;-) With OMSEND, you end all currently active OMS commands. With the /TAG sub-commands, you can select which ones you want to end. OMS /SELECT ALL /DESTINATION VIEWER = NO /TAG='@SuppressAll'. OMS /SELECT TABLES /IF SUBTYPE = ' Custom Table' /DESTINATION VIEWER = NO FORMAT = SAV OUTFILE = 'test.sav' /TAG='@CustomTable'. * operations. OMSEND TAG = ['@CustomTable' '@SuppressAll']. Mario Giesel-2 wrote > Thanks, guys, > I got this working: > OMS > /SELECT ALL > /DESTINATION VIEWER = NO. > OMS > /SELECT TABLES > /IF SUBTYPE = ' Custom Table' > /DESTINATION VIEWER = NO FORMAT = SAV OUTFILE = 'test.sav'. > > * operations. > OMSEND. > The clue that SAV files are written at OMSEND time was very helpful as I > did not consider this.I expected repeating variable names, which of course > makes no sense in a sav file.However, the stacked OMS commands did not > work for a text file - it was empty.But I'm more happy with the SAV > solution, anyway. > > Btw I only misspelled OMSEND in the reduced example I gave, not in the > original syntax. > > Thanks again, Mario > Mario GieselMunich, Germany > > David Marso < > Dmmugaspss@ > > schrieb am 18:28 Samstag, 16.Dezember 2017: > > > The last line should be > OMSEND. > Not > OMS. > > RTFM. > HTH. > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@.UGA > (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 > LISTSERV@.UGA > (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 ----- -- Bruce Weaver [hidden email] http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." NOTE: My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. -- Sent from: http://spssx-discussion.1045642.n5.nabble.com/ ===================== 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
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
True, tags give you control over individual OMS requests, but in this case, I didn't think that was necessary. For a general and modular application, the tags are very good practice. In Python code, I generate them as long random numbers converted to strings. I am puzzled about the text output version not working as the selection logic should be identical, although I noticed an extra space in front of the table type. On Sat, Dec 16, 2017 at 1:10 PM, Bruce Weaver <[hidden email]> wrote: Hi Mario. If there is any possibility of other OMS commands being in effect, |
Free forum by Nabble | Edit this page |