SPSS 19 shutting down on ODBC read in

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

SPSS 19 shutting down on ODBC read in

Spring, Natalie

Hi,

I’m using a version of the syntax below to read in my data from an ODBC source and then modify it within SPSS.

I have a feeling I am doing something wrong.

 

If I do not save my file after the read in, before I try to manipulate the variables, it shuts down. If I save the file first, it is fine.

 

What *Should* I be doing.

 

See below

 

 

Does not shut down

GET DATA

  /TYPE=ODBC

  /CONNECT=’Databasename'

  /SQL="select V1, from DATABASE  where CRITERIA order BY V1"

  /ASSUMEDSTRWIDTH=255.

 

SAVE OUTFILE='C:\Update.sav'

  /COMPRESSED.

 

ALTER TYPE V1 (f10).

 

SAVE OUTFILE='C:\Update.sav'

  /COMPRESSED.

 

 

Shut down

GET DATA

  /TYPE=ODBC

  /CONNECT=’Databasename'

  /SQL="select V1, from DATABASE  where CRITERIA order BY V1"

  /ASSUMEDSTRWIDTH=255.

 

ALTER TYPE V1 (f10).

 

SAVE OUTFILE='C:\Update.sav'

  /COMPRESSED.

 

 

 

Natalie Spring

Data and Market Analyst

Prospect Research, Management & Analytics

Duke University

919.681.0455 (voice)

919.684.9692 (fax)

[hidden email]

 

Reply | Threaded
Open this post in threaded view
|

Re: SPSS 19 shutting down on ODBC read in

Rick Oliver-3
Insert a CACHE command and an EXECUTE command after the GET DATA command.

GET DATA....
CACHE.
EXECUTE.


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




From:        "Spring, Natalie" <[hidden email]>
To:        [hidden email]
Date:        05/09/2012 10:55 AM
Subject:        SPSS 19 shutting down on ODBC read in
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,
I’m using a version of the syntax below to read in my data from an ODBC source and then modify it within SPSS.
I have a feeling I am doing something wrong.
 
If I do not save my file after the read in, before I try to manipulate the variables, it shuts down. If I save the file first, it is fine.
 
What *Should* I be doing.
 
See below
 
 
Does not shut down
GET DATA
  /TYPE=ODBC
  /CONNECT=’Databasename'
  /SQL="select V1, from DATABASE  where CRITERIA order BY V1"
  /ASSUMEDSTRWIDTH=255.
 
SAVE OUTFILE='C:\Update.sav'
  /COMPRESSED.
 
ALTER TYPE V1 (f10).
 
SAVE OUTFILE='C:\Update.sav'
  /COMPRESSED.
 
 
Shut down
GET DATA
  /TYPE=ODBC
  /CONNECT=’Databasename'
  /SQL="select V1, from DATABASE  where CRITERIA order BY V1"
  /ASSUMEDSTRWIDTH=255.
 
ALTER TYPE V1 (f10).
 
SAVE OUTFILE='C:\Update.sav'
  /COMPRESSED.
 
 
 
Natalie Spring
Data and Market Analyst
Prospect Research, Management & Analytics
Duke University
919.681.0455 (voice)
919.684.9692 (fax)
[hidden email]