Jessica
Jessica

Reputation: 11

Syntax for suppressing SPSS output

I am trying to analyze a very large amount of variables in SPSS and I have created syntax to export the tables I want to a .sav file, but the program gets hung up and freezes trying to generate the results in the output file. I am trying to find SPSS syntax that will do this so I can just get the .sav file of the results without it using up all the local memory trying to create the tables in the output file. All I could find was the following for suppressing the output:

OMS /SELECT ALL EXCEPT = [WARNINGS]      
/DESTINATION VIEWER = NO      
/TAG = 'NoJunk'. 
*Your Commands here. 
OMSEND TAG = 'NoJunk'.

The Syntax I am using to run my analysis and export the results to a .sav file is pasted below, and it works perfectly, but I need help incorporating this with the syntax above to suppress the output file so I just get the .sav file and it doesn't use up all my memory trying to create the tables in the output file.

* OMS.
DATASET DECLARE  GLM_genomicTables.
OMS
/SELECT TABLES
/IF COMMANDS=['GLM'] SUBTYPES=['Test of Between Subjects Fixed Effects' ' Test 
of Between '+ 'Subjects Mixed Effects']
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_
OUTFILE='GLM_genomicTables' VIEWER=NO.


DATASET ACTIVATE DataSet1.
GLM A_42_P454311
A_42_P456851
A_42_P458530
A_42_P458661
A_42_P461946
Y Region Condition Timepoint
/METHOD=SSTYPE(3)
/INTERCEPT=INCLUDE
/EMMEANS=TABLES(Condition) 
/EMMEANS=TABLES(Region*Condition) 
/EMMEANS=TABLES(Region*Condition*Timepoint) 
/PRINT=DESCRIPTIVE ETASQ OPOWER
/CRITERIA=ALPHA(.05)
/DESIGN= Region Condition Timepoint Region*Condition Region*Timepoint 
Condition*Timepoint 
Region*Condition*Timepoint.


OMSEND. 
DATASET ACTIVATE GLM_genomicTables. 

SAVE OUTFILE='M:\Users\jessicanielson\Desktop\Ferguson Lab\Preclinical TBI 
datasets\UTMB Data\GLM_genomicTables.sav' 
/COMPRESSED. 
DATASET CLOSE GLM_genomicTables.

Upvotes: 1

Views: 1375

Answers (1)

JKP
JKP

Reputation: 5417

I don't know why the system would hang unless the Viewer objects are so big that you run out of memory. But you can nest OMS commands with the most recent one taking priority if there are conflicts. So you could do something like this.

OMS /SELECT ALL EXCEPT = [WARNINGS] /DESTINATION VIEWER = NO.      
OMS /SELECT TABLES
/IF COMMANDS=['GLM'] SUBTYPES=['Test of Between Subjects Fixed Effects' ' 
Test of Between '+ 'Subjects Mixed Effects']
/DESTINATION FORMAT=SAV NUMBERED=TableNumber_
OUTFILE='M:\Users\jessicanielson\Desktop\Ferguson Lab\Preclinical TBI 
datasets\UTMB Data\GLM_genomicTables.sav'  VIEWER=NO.

*Your Commands here....

OMSEND.

(with proper quote continuation as needed). That will suppress everything but warnings and will write the selected table objects directly to the designated sav file. However, with three different table types selected, you should write each type to a separate sav file. Just used three OMS commands before the GLM each one selecting a different type.

And note that using just one untagged OMSEND command will terminate all active OMS requests and write the selected objects at that time.

Upvotes: 1

Related Questions