MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with MODIFIES SQL DATA

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Joy
Beginner


Joined: 09 May 2005
Posts: 7
Topics: 6
Location: Kolkata

PostPosted: Thu May 12, 2005 8:02 am    Post subject: Problem with MODIFIES SQL DATA Reply with quote

Hi ,
Can u please tell me whats wrong with this UDF.Its encountering the following error message Multiple or conflicting keywords involving the "MODIFIES SQL DATA " clause are present.The SQLCODE and SQLSTATE are given below:

sqlcode : -628

sqlstate : 42613


Code:

CREATE FUNCTION PPD.GET_CER_REC_COUNT(GROUP_NO INT,
                  DEP_CITY_IATA_CD VARCHAR(5),
                  ARR_CITY_IATA_CD VARCHAR(5),
                  NO_OF_RECS INT)
RETURNS INT

LANGUAGE SQL
MODIFIES SQL DATA           
NOT DETERMINISTIC
SPECIFIC GET_CER_REC_COUNT

BEGIN ATOMIC
DECLARE RETURN_VAR INT;
SET RETURN_VAR = NO_OF_RECS;
    
UPDATE PPD.LEG_SEG L
SET L.CER_GR_NO = GROUP_NO
WHERE
L.DEP_CITY_IATA_CD = DEP_CITY_IATA_CD AND
L.ARR_CITY_IATA_CD = ARR_CITY_IATA_CD;

RETURN RETURN_VAR;

END
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu May 12, 2005 8:28 am    Post subject: Reply with quote

Joy,

You are creating a "SQL scalar" function and you cannot use "modifies sql data" on it. You can use that parm only when creating "external scalar" function.

Check this link for SQL Scalar Function.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/5.29?DT=20010718164132

Check this link for "external scalar" function.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNSQH11/5.26?DT=20010718164132

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group