Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SQL Code -104 when calling the cursor second time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
C_Kartika_C
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 3

PostPosted: Tue Jan 16, 2007 9:22 am    Post subject: SQL Code -104 when calling the cursor second time
Reply with quote

I have a service that is working fine when called for the first time from a calling programs. But when a call is made to it for the second time, it is returning -104 as SQL Code for thr first Cursor.
The cursor was properly closed but still returning the same error.
Thanks in advance
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Tue Jan 16, 2007 10:17 am    Post subject: Re: SQL Code -104 when calling the cursor second time
Reply with quote

Did you mean a cursor when fetched in a called program and opened in a calling program works fine for the first time, but gives SQL -104 for the second time.

Please post cursor declaration:-
Back to top
View user's profile Send private message
C_Kartika_C
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 3

PostPosted: Wed Jan 17, 2007 6:57 am    Post subject:
Reply with quote

the cursor is opened, fetched and closed in second program only.
Just the program is called by another calling program.
For first call, everything went fine, after the second call is made, when control goes to called program, at the open of first cursor -104 is returned.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Jan 17, 2007 7:59 am    Post subject: Re: SQL Code -104 when calling the cursor second time
Reply with quote

C_Kartika_C,

I don't see any reason that the cursor shouldn't be able to be opened/cloded multiple times. Is it possible that you may be corrupting storage the first pass through?
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Jan 17, 2007 8:05 am    Post subject: Re: SQL Code -104 when calling the cursor second time
Reply with quote

SQL -104 is a syntax error problem... here is some details about -104 from abend assist...

Reason:-
ILLEGAL SYMBOL token VALID SYMBOLS ARE token-list
Description of -104:-A syntax error in the SQL statement was detected at 'token'.A partial list of valid tokens, 'token-list', is provided. This list assumes that the statement is correct up to that point, and only as many tokens are listed as will fit.
Response:-Examine the statement in the area of the specified token.If you are executing the SQL statement dynamically under TSO, be sure that if the data set containing the DSNHDECP load module has not been included in your LINKLSTxx, it has been included in STEPLIB statements in:1. The DB2 start-up procedure 2. The TSO logon procedure or batch job JCL.
Quote:
when control goes to called program, at the open of first cursor -104 is returned.

Can you post your cursor declaration... and code...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us