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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm


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