OMS Crosstab table to .sav file

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

OMS Crosstab table to .sav file

Art Kendall
While considering a post on this list I generated some syntax to test my
suggestion.
I would like to be  able to to get a crosstab table as a SAV FILE.

When I run the syntax below I get this error.

Warnings
Stub sizes of all the tables must matchup.  OutFile "biggie".
Execution of this command stops.

set seed = 20120503.
input program.
    loop match= 1 to 50.
       compute Home = rnd(rv.uniform(.51, 50.49)).
       compute Away = rnd(rv.uniform(.51, 50.49)).
       end case.
    end loop.
    end file.
end input program.
dataset name input.
formats match (f5) Home Away (f3).
select if home ne away.
dataset declare xtab.
procedure output outfile = "c:\project\xtab.txt".
dataset declare biggie.
oms /select tables
     /destination format = sav outfile= biggie.
crosstabs variables = home away (1,50)
  /tables = home by away
  /missing = include
  /statistics = none
  /write = all.
omsend.


--
Art Kendall
Social Research Consultants

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: OMS Crosstab table to .sav file

Rick Oliver-3
There's a section in the OMS documentation that explains conditions under which OMS cannot create a SAV file. Crosstabs creates more than one table type, and the different table types are incompatible since they have differing numbers of row dimension elements. Your OMS request will try to include all tables produced by the procedure.

If all you want is the crosstabulation table, then just identify that in the OMS request, by adding an IF subcommand:

/if subtypes=['Crosstabulation']

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        Art Kendall <[hidden email]>
To:        [hidden email]
Date:        05/03/2012 12:08 PM
Subject:        OMS Crosstab table to .sav file
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




While considering a post on this list I generated some syntax to test my
suggestion.
I would like to be  able to to get a crosstab table as a SAV FILE.

When I run the syntax below I get this error.

Warnings
Stub sizes of all the tables must matchup.  OutFile "biggie".
Execution of this command stops.

set seed = 20120503.
input program.
   loop match= 1 to 50.
      compute Home = rnd(rv.uniform(.51, 50.49)).
      compute Away = rnd(rv.uniform(.51, 50.49)).
      end case.
   end loop.
   end file.
end input program.
dataset name input.
formats match (f5) Home Away (f3).
select if home ne away.
dataset declare xtab.
procedure output outfile = "c:\project\xtab.txt".
dataset declare biggie.
oms /select tables
    /destination format = sav outfile= biggie.
crosstabs variables = home away (1,50)
 /tables = home by away
 /missing = include
 /statistics = none
 /write = all.
omsend.


--
Art Kendall
Social Research Consultants

=====================
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 Crosstab table to .sav file

Jon K Peck
Adding to Rick's explanation, if you actually want multiple types of tables, you can issue multiple OMS requests, each creating a different dataset
OMS .../if subtypes=['crosstabulation']
...
oms .../if subtypes=[''Chi Square Tests'']
crosstabs ...
omsend.



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




From:        Rick Oliver/Chicago/IBM@IBMUS
To:        [hidden email]
Date:        05/03/2012 12:02 PM
Subject:        Re: [SPSSX-L] OMS Crosstab table to .sav file
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




There's a section in the OMS documentation that explains conditions under which OMS cannot create a SAV file. Crosstabs creates more than one table type, and the different table types are incompatible since they have differing numbers of row dimension elements. Your OMS request will try to include all tables produced by the procedure.

If all you want is the crosstabulation table, then just identify that in the OMS request, by adding an IF subcommand:


/if subtypes=['Crosstabulation']


Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]
Phone: 312.893.4922 | T/L: 206-4922




From:        
Art Kendall <[hidden email]>
To:        
[hidden email]
Date:        
05/03/2012 12:08 PM
Subject:        
OMS Crosstab table to .sav file
Sent by:        
"SPSSX(r) Discussion" <[hidden email]>




While considering a post on this list I generated some syntax to test my
suggestion.
I would like to be  able to to get a crosstab table as a SAV FILE.

When I run the syntax below I get this error.

Warnings
Stub sizes of all the tables must matchup.  OutFile "biggie".
Execution of this command stops.

set seed = 20120503.
input program.
  loop match= 1 to 50.
     compute Home = rnd(rv.uniform(.51, 50.49)).
     compute Away = rnd(rv.uniform(.51, 50.49)).
     end case.
  end loop.
  end file.
end input program.
dataset name input.
formats match (f5) Home Away (f3).
select if home ne away.
dataset declare xtab.
procedure output outfile = "c:\project\xtab.txt".
dataset declare biggie.
oms /select tables
   /destination format = sav outfile= biggie.
crosstabs variables = home away (1,50)
/tables = home by away
/missing = include
/statistics = none
/write = all.
omsend.


--
Art Kendall
Social Research Consultants

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