OMS commands in large syntax files

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

OMS commands in large syntax files

NicoDW
Hi there

i have a very large syntax file (up to 15000 lines) The purpose is to create tables and export them into seperate xls files.

For each table, i've specified OMS commands(eg. oms select tables /if subtypes='Notes'
/destination viewer=no., etc) and at the end i've typed OMSEND.
All oms commands are the same for each table.

My question is, can I start with my OMS commands at the start of the syntax and type OMSEND at the end of the syntax.
This will reduce the number of lines in my syntax, as I encounter memory problems (I guess, spss crashes when running the whole syntax)

Thanks in advance

N.
Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

Bruce Weaver
Administrator
Be an empiricist!  Give it a try, and see what happens.  Then report back here!  ;-)  

(You might be surprised at how often folks that answer questions on this list arrive at their answers by that exact method.)


NicoDW wrote
Hi there

i have a very large syntax file (up to 15000 lines) The purpose is to create tables and export them into seperate xls files.

For each table, i've specified OMS commands(eg. oms select tables /if subtypes='Notes'
/destination viewer=no., etc) and at the end i've typed OMSEND.
All oms commands are the same for each table.

My question is, can I start with my OMS commands at the start of the syntax and type OMSEND at the end of the syntax.
This will reduce the number of lines in my syntax, as I encounter memory problems (I guess, spss crashes when running the whole syntax)

Thanks in advance

N.
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

David Marso
Administrator
In reply to this post by NicoDW
"i have a very large syntax file (up to 15000 lines) "
This is an incredibly horrible practice!
How do you ever edit/maintain such a monster.
1. Analyze your code into logically independent sub tasks.
2. Abstract it if possible look for repetition and special cases where things are repeated.
3. Factor these into either MACROs or if you insist on being a modernist Python.
4. Look at INSERT and/or INCLUDE.
5.  Comment the H out of it!.
I will refrain from any comment on OMS.


---
NicoDW wrote
Hi there

i have a very large syntax file (up to 15000 lines) The purpose is to create tables and export them into seperate xls files.

For each table, i've specified OMS commands(eg. oms select tables /if subtypes='Notes'
/destination viewer=no., etc) and at the end i've typed OMSEND.
All oms commands are the same for each table.

My question is, can I start with my OMS commands at the start of the syntax and type OMSEND at the end of the syntax.
This will reduce the number of lines in my syntax, as I encounter memory problems (I guess, spss crashes when running the whole syntax)

Thanks in advance

N.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

Ruben Geert van den Berg
In reply to this post by NicoDW
Dear Nico,

What's the entire OMS command you're using? Especially, what does it output? And please tell us you didn't copy-paste 15.000 lines, OK?

As David already suggested, Python is probably the way to go here (or perhaps a MACRO is workable if the situation is not too complicated).

Best,

Ruben

> Date: Tue, 11 Dec 2012 11:30:28 -0800

> From: [hidden email]
> Subject: OMS commands in large syntax files
> To: [hidden email]
>
> Hi there
>
> i have a very large syntax file (up to 15000 lines) The purpose is to create
> tables and export them into seperate xls files.
>
> For each table, i've specified OMS commands(eg. oms select tables /if
> subtypes='Notes'
> /destination viewer=no., etc) and at the end i've typed OMSEND.
> All oms commands are the same for each table.
>
> My question is, can I start with my OMS commands at the start of the syntax
> and type OMSEND at the end of the syntax.
> This will reduce the number of lines in my syntax, as I encounter memory
> problems (I guess, spss crashes when running the whole syntax)
>
> Thanks in advance
>
> N.
>
>
>
> --
> View this message in context: http://spssx-discussion.1045642.n5.nabble.com/OMS-commands-in-large-syntax-files-tp5716881.html
> Sent from the SPSSX Discussion mailing list archive at 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
Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

Jon K Peck
In reply to this post by NicoDW
Apart from the need to modularize this syntax, if the OMS commands are just generic things like killing the logs, why would you repeat them for each table?  OMS is designed to work over large blocks of commands.  That's why it has such a rich selection model.

Look also at your Edit > Options settings, where you can control visibility of various object types, including the log.




Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        NicoDW <[hidden email]>
To:        [hidden email],
Date:        12/11/2012 12:33 PM
Subject:        [SPSSX-L] OMS commands in large syntax files
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi there

i have a very large syntax file (up to 15000 lines) The purpose is to create
tables and export them into seperate xls files.

For each table, i've specified OMS commands(eg. oms select tables /if
subtypes='Notes'
/destination viewer=no., etc) and at the end i've typed OMSEND.
All oms commands are the same for each table.

My question is, can I start with my OMS commands at the start of the syntax
and type OMSEND at the end of the syntax.
This will reduce the number of lines in my syntax, as I encounter memory
problems (I guess, spss crashes when running the whole syntax)

Thanks in advance

N.



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/OMS-commands-in-large-syntax-files-tp5716881.html
Sent from the SPSSX Discussion mailing list archive at 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


Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

Rick Oliver-3
In reply to this post by NicoDW
The simple answer is yes. An OMS command at the start of the syntax block applies to all output until OMSEND is encountered, so:

OMS SELECT TABLES /IF SUBTYPES=['Notes'] /DESTINATION VIEWER=NO.
[bunch of commands that produce output]
OMSEND

will remove all Notes tables.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        NicoDW <[hidden email]>
To:        [hidden email],
Date:        12/11/2012 01:36 PM
Subject:        OMS commands in large syntax files
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi there

i have a very large syntax file (up to 15000 lines) The purpose is to create
tables and export them into seperate xls files.

For each table, i've specified OMS commands(eg. oms select tables /if
subtypes='Notes'
/destination viewer=no., etc) and at the end i've typed OMSEND.
All oms commands are the same for each table.

My question is, can I start with my OMS commands at the start of the syntax
and type OMSEND at the end of the syntax.
This will reduce the number of lines in my syntax, as I encounter memory
problems (I guess, spss crashes when running the whole syntax)

Thanks in advance

N.



--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/OMS-commands-in-large-syntax-files-tp5716881.html
Sent from the SPSSX Discussion mailing list archive at 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


Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

Ryan
In reply to this post by Bruce Weaver
hear hear!

On Tue, Dec 11, 2012 at 2:48 PM, Bruce Weaver <[hidden email]> wrote:
Be an empiricist!  Give it a try, and see what happens.  Then report back
here!  ;-)

(You might be surprised at how often folks that answer questions on this
list arrive at their answers by that exact method.)



NicoDW wrote
> Hi there
>
> i have a very large syntax file (up to 15000 lines) The purpose is to
> create tables and export them into seperate xls files.
>
> For each table, i've specified OMS commands(eg. oms select tables /if
> subtypes='Notes'
> /destination viewer=no., etc) and at the end i've typed OMSEND.
> All oms commands are the same for each table.
>
> My question is, can I start with my OMS commands at the start of the
> syntax and type OMSEND at the end of the syntax.
> This will reduce the number of lines in my syntax, as I encounter memory
> problems (I guess, spss crashes when running the whole syntax)
>
> Thanks in advance
>
> N.





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

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/OMS-commands-in-large-syntax-files-tp5716881p5716883.html
Sent from the SPSSX Discussion mailing list archive at 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

Reply | Threaded
Open this post in threaded view
|

Re: OMS commands in large syntax files

NicoDW
In reply to this post by Rick Oliver-3
Thanks to all of you

Now i can reduce my (horrible ;-)) syntax.
I will dive into the Python programming by reading the book i've found on spss/devcentral "Programming and Data Management for IBM SPSS Statistics 20"