| IBM MAINFRAME HELP & SUPPORT FORUMS Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
|
| View previous topic :: View next topic |
| Author |
Message |
bhaskar_kanteti
Joined: 01 Feb 2007
Posts: 87
Location: India
|
| Posted: Thu Aug 21, 2008 10:01 am Post subject: Result of decimal multiplication may cause overflow |
|
|
Hi,
In my STORED PROC i had fetch query as follows:
Code:
EXEC SQL
DECLARE CSR1 CURSOR WITH RETURN FOR
SELECT DISTINCT
DCLGEN1.BRAND
,(CASE
WHEN DCLGEN1.ACCOUNT_TYPE = 'XX' THEN
DCLGEN2.AMOUNT
ELSE
(CASE
WHEN(DCLGEN1.AMOUNT1 + DCLGEN1.AMOUNT2
>= 0
THEN 0
ELSE
((DCLGEN1.AMOUNT1 + DCLGEN1.AMOUNT2)
*-1.0)
END)END) AS AMOUNT
.............
In the above sql there is an arthematic calculation as
(DCLGEN1.AMOUNT1 + DCLGEN1.AMOUNT2) * -1.0
When we bind the element i am getting the following warning.
Code:
DSNX104I -DOA1 BIND SQL WARNING
USING GRP AUTHORITY
PLAN=(NOT APPLICABLE)
DBRM=ZKCAFQ07
STATEMENT=152
THE RESULT OF DECIMAL MULTIPLICATION
MAY CAUSE OVERFLOW
What changes to be done for this arthematic calculation inorder not to get this warning. |
|
| Back to top |
|
dbzTHEdinosauer
Joined: 20 Oct 2006
Posts: 1639
Location: germany
|
| Posted: Thu Aug 21, 2008 10:26 am Post subject: |
|
|
| you might look at the scalar built-in function MULTIPLY_ALT. It might apply. |
|
| Back to top |
|
bhaskar_kanteti
Joined: 01 Feb 2007
Posts: 87
Location: India
|
| Posted: Thu Aug 21, 2008 11:02 am Post subject: Reply to: Result of decimal multiplication may cause overflo |
|
|
Hi Dick Brenholtz,
MULTIPLY_ALT worked for my requirement.
Thank you so much. |
|
| Back to top |
|
| |
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
|