Need help for SPSS Syntax about database capture

Need help for SPSS Syntax about database capture

Post by Jenn » Thu, 28 Jan 1999 04:00:00



I use SPSS 8.0 Asia version. I am trying to do a batch job from get
data to finishing a simple table.
I use the database capture wizard and then paste it into a syntax file
as follow.
************************
GET CAPTURE ODBC /CONNECT='DSN=Oracle for SPSS'+
 ' Base;UID=demo;PWD=#50137;DBQ=ora8;DBA=W;APA=T;PFC=1;TLO=0;' /
SELECT  "T10"."CREATETIME"
AS "CREATETI",
"T10"."WORKSTATN"
AS "WORKSTAT",
"T10"."SEQNUM" AS
"SEQNUM",  "T10"."BLKNUM"
AS "BLKNUM",
"T10"."UPDATETIME"
AS "UPDATETI",
"T10"."temp" AS
"temp",  "T10"."pressure"
AS "pressure",
"T10"."date" AS
"date",    "T10"."time"
AS "time",  "T10"."shift"
AS "shift",  "T10"."operator"
AS "operator"
 FROM  "DEMO"."test" "T10".
Execute.
******************************

After running the product facility I got the following message.

Quote:>Error # 9303 on line 24 in column 64.  Text: (End of Command)
>The syntax of the GET CAPTURE ODBC command is incorrect.  It requires two
>subcommands - CONNECT and SELECT.  Each subcommand must have one or more
>quoted strings as its parameter(s).
>This command not executed.
>Note # 214 on line 24.  Command name: GET
>Due to an error, INCLUDE file processing has been terminated and the
>working file has been lost.  You may either redefine your data or leave
>SPSS.
>Note # 236
>All outstanding macros have been terminated, all include processing has
>been terminated, and all outstanding PRESERVE commands have been undone.

What's wrong with it? Sorry,I could not understand the syntax guide
about "get capture"
 
 
 

Need help for SPSS Syntax about database capture

Post by Jaap Vin » Sat, 30 Jan 1999 04:00:00


I am not sure if this is a solution. However you may want to try it.
In production mode SPSS is sensitive to the position of the first character
of a line. If it is on the first position it assumes that a new command
starts. So if you want to have a command spanning multiple lines you need to
indent the continuing lines with at least one space.

Quote from helpfile on Syntax rules in production:
Each command must begin in the first column of a new line.
Continuation lines must be indented at least one space.
The period at the end of the command is optional.

for you it means that all lines except the GET and the Execute should be
indented with 1 space.

GET CAPTURE ODBC /CONNECT='DSN=Oracle for SPSS'+
  ' Base;UID=demo;PWD=#50137;DBQ=ora8;DBA=W;APA=T;PFC=1;TLO=0;' /
SELECT  "T10"."CREATETIME"
AS "CREATETI",
"T10"."WORKSTATN"
AS "WORKSTAT",
"T10"."SEQNUM" AS
"SEQNUM",  "T10"."BLKNUM"
AS "BLKNUM",
"T10"."UPDATETIME"
AS "UPDATETI",
"T10"."temp" AS
"temp",  "T10"."pressure"
AS "pressure",
"T10"."date" AS
"date",    "T10"."time"
AS "time",  "T10"."shift"
AS "shift",  "T10"."operator"
AS "operator"
FROM  "DEMO"."test" "T10".
Execute.

Good Luck !!!

--
Jaap Vink
Quantitative Information Consultants

http://www.xs4all.nl/~jgavink


>I use SPSS 8.0 Asia version. I am trying to do a batch job from get
>data to finishing a simple table.
>I use the database capture wizard and then paste it into a syntax file
>as follow.
>************************
>GET CAPTURE ODBC /CONNECT='DSN=Oracle for SPSS'+
> ' Base;UID=demo;PWD=#50137;DBQ=ora8;DBA=W;APA=T;PFC=1;TLO=0;' /
>SELECT  "T10"."CREATETIME"
>AS "CREATETI",
>"T10"."WORKSTATN"
>AS "WORKSTAT",
>"T10"."SEQNUM" AS
>"SEQNUM",  "T10"."BLKNUM"
>AS "BLKNUM",
>"T10"."UPDATETIME"
>AS "UPDATETI",
>"T10"."temp" AS
>"temp",  "T10"."pressure"
>AS "pressure",
>"T10"."date" AS
>"date",    "T10"."time"
>AS "time",  "T10"."shift"
>AS "shift",  "T10"."operator"
>AS "operator"
> FROM  "DEMO"."test" "T10".
>Execute.
>******************************

>After running the product facility I got the following message.

>>Error # 9303 on line 24 in column 64.  Text: (End of Command)
>>The syntax of the GET CAPTURE ODBC command is incorrect.  It requires two
>>subcommands - CONNECT and SELECT.  Each subcommand must have one or more
>>quoted strings as its parameter(s).
>>This command not executed.

>>Note # 214 on line 24.  Command name: GET
>>Due to an error, INCLUDE file processing has been terminated and the
>>working file has been lost.  You may either redefine your data or leave
>>SPSS.

>>Note # 236
>>All outstanding macros have been terminated, all include processing has
>>been terminated, and all outstanding PRESERVE commands have been undone.

>What's wrong with it? Sorry,I could not understand the syntax guide
>about "get capture"


 
 
 

1. SPSS Syntax Help- need just a bit

Hi,

I'm new to the syntax of SPSS.  I have only ever used the windows based
functions.  However, now I have been given a task with a large database that
requires the use of some syntax.  I am hoping someone can quickly help me.

I have to do two different things.  The data is from a questionnaire.  There
are some ordinal scale questions with Likert scales.  It is those that I
have to work with.

1. Is to combine the scores from 2 questions (both with participants coded
as 0 or 1) to form a new score and variable of disordered = 1 and
non-disordered = 0.  For instance subjects have scored 1 on questions 15 &
13 then they are coded as disordered (1) on the new variable.  If they have
scored 1 on question 15, but 0 on 13, then they will be coded as
non-disordered on the new variable (0).

2. One question is already coded into (0) and (1).  I have to combined those
results with those from an ordinally scaled question from 1 to 5, to
classify participants into disordered and non-disordered.  For instance, if
a participant is coded as (1) on question 13 and score 1, 2 on question 14
then they are coded as disordered (1) on the new variable.  If a participant
is coded as (1) on question 13 and score 4, 5 on question 14 then they are
coded as non-disordered (0) on the new variable.  Those who scored 3 on
question 14 are ignored as they cannot be diagnosed.

Any help would be very much appreciated.

Steve Feelgood.

Berlin

2. How can I solve this error?

3. SPSS 10 and database capture problem?

4. Need ethernet vendor

5. spss 8.0/student version (win 95): database capture won't....

6. Unix and Win2k tcp/ip question

7. Database Capture from MS Access - I can't capture queries

8. Stay away from HP scanners .. potential problems!

9. Need syntax for saving the output file in Windows SPSS

10. Spss syntax help

11. Capture Plug-in vs. Capture HELP!

12. Help: Need to capture an Edit event in Excel VBA

13. need help with firewire capture