View previous topic :: View next topic
|
Author |
Message |
C_Kartika_C Warnings : 1 New User
Joined: 14 Jun 2006 Posts: 3
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
C_Kartika_C Warnings : 1 New User
Joined: 14 Jun 2006 Posts: 3
|
|
|
|
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 |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
|