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

-4700 sqlcode- DB2 ATTEMPT TO USE NEW FUNCTION BEFORE


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

New User


Joined: 21 Nov 2007
Posts: 19
Location: hyderabad

PostPosted: Mon Aug 11, 2008 12:33 pm
Reply with quote

Hi,

I am trying to write a Coorealted subquery to update the description of a table column using below query:

update picsh_ms_loss loss
set loss.loss_desc = (select CASE C.LOSS_DESC_CODE
WHEN '481' THEN 'DUE TO TORNADO'
WHEN '482' THEN 'DUE TO APPLIANCE FAILURE'
WHEN '483' THEN 'DUE TO PLUMBING FAILURE'
WHEN '485' THEN 'DUE TO ICE DAM'
FROM TPLCC2.COM_CLAIMS C , TPIX15.PICSH_MS_POLSTAT P,
TPIX15.PICSH_MS_LOSS L
WHERE C.CLAIM_NO = L.CLAIM_NO
AND L.CLAIM_NO <> ' ' AND L.LOSS_DESCR_30 = ' '
AND P.STATUS_CODE IN ('A' , 'R')
AND P.POL_NUM = C.POLICY_NO
and loss.policy_ref_num = p.policy_ref_num
and loss.claim_no = c.claim_no)

when i am trying to excute the above query,

I am getting an error with sqlcode = -4700
DB2 ATTEMPT TO USE NEW FUNCTION BEFORE NEW FUNCTION MODE.

Please let me know, if there is any error in the above query.

Thanks in advance.

Thanks,
SK
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Aug 11, 2008 2:34 pm
Reply with quote

The primary error is that you are trying to use a new function before it has been activated. Talk to your DBA about it.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Mon Aug 11, 2008 6:43 pm
Reply with quote

Which version of DB2 are you using.???. I guess this error message comes on DB2 V8 Compatible mode.

Are you running on V8 CM.??
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 Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top