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
 

 

Dynamic SQL, adding two variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Dynamic SQL, adding two variables
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

http://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: 1278
Location: Belgium

PostPosted: Wed Dec 28, 2011 1:44 pm    Post subject:
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    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 REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm


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