IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Dynamic SQL, adding two variables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satishboddu

New User


Joined: 02 Aug 2011
Posts: 17
Location: India

PostPosted: Wed Dec 28, 2011 1:19 pm
Reply with quote

We are trying to add two variables using Dynamic SQL

CASE WHEN TIPS > 0 AND TIP = "Y" THEN
(UNCOL_AMT + UNCOL_MED )
ELSE 0
END

TIPS is a Decimal (11,2) field
UNCOL_AMT & UNCOL_MED are Decimal (11,2) fields
We declared all variables as NOT NULL.

The below abend was recieved in FETCH Statement

CONDITION HANDLER RETURNING
CEE3250C The system or user abend S04E R=00E7000C was issued.
From compile unit PQYXCTR2 at entry point PQYXCTR2 at compile unit offset

Also we noticed that in Prepare for above statement, SQLTYPE = 485 was recieved, wheresas for usual other decimal fields we receieved SQLTYPE = 484.

I already tried referring to below link and other material in this forum, but was unable to make out anything

publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2z9.doc.codes/src/tpc/00e7000c.htm

Please help.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Dec 28, 2011 1:44 pm
Reply with quote

Quote:
In FETCH, OPEN, EXECUTE, and CALL, an even value of SQLTYPE means no indicator variable is provided, and an odd value means that SQLIND contains the address of an indicator variable.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Adding first / last acct numerber to ... DFSORT/ICETOOL 7
No new posts JCL Dynamic System Symbols JCL & VSAM 3
Search our Forums:

Back to Top