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

Avoid warnings in a db2 query


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

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Mon Apr 20, 2009 11:11 am
Reply with quote

Hi,
I have written a DB2 query which is giving me the expected output but with some warnings in between.Can anybody tell me if there is any way to avoid DB2 warnings in a query?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Apr 20, 2009 12:44 pm
Reply with quote

And what those warnings are...may be sharing them give us a clue to suggest something . . .
Back to top
View user's profile Send private message
shchan

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Mon Apr 20, 2009 12:53 pm
Reply with quote

Hi Anuj,
In my query iam trying to add years and days to a date field.Iam getting a warning 01506 when the record has 29th Feb and Iam tring to add years and days to it as it is a leap year.And this warning is displayed in my query output.Is there any way to avoid this??
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Apr 20, 2009 1:08 pm
Reply with quote

it would be a good experience for You to look at the manual to
find out the meaning of the warning messages
and not expect us to do the reading for You

usually for each message there are the actions/suggestions
on how to proceed to get rid of the message
Back to top
View user's profile Send private message
shchan

New User


Joined: 06 Jun 2007
Posts: 58
Location: Hyderabad

PostPosted: Tue Apr 21, 2009 12:55 pm
Reply with quote

Hi i tried to use TOLWARN parameter but as per my understanding this just tolerates the warnings and just allows the SQL statement to process even in case of warnings.But as per my requirement i do not want te warnings to be displayed in the middle of the output of my query .
Code:
DSNT400I SQLCODE = 000,  SUCCESSFUL EXECUTION                           
DSNT418I SQLSTATE   = 01506 SQLSTATE RETURN CODE                         
DSNT415I SQLERRP    = DSN SQL PROCEDURE DETECTING ERROR                 
DSNT416I SQLERRD    = 0 0  0  -1  0  0 SQL DIAGNOSTIC INFORMATION       
DSNT416I SQLERRD    = X'00000000'  X'00000000'  X'00000000'  X'FFFFFFFF'
         X'00000000'  X'00000000' SQL DIAGNOSTIC INFORMATION             
DSNT417I SQLWARN0-5 = W,,,,, SQL WARNINGS                               
DSNT417I SQLWARN6-A = W,,,,   SQL WARNINGS           

is there any way to suppress the above warnings in my output?
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Apr 24, 2009 12:51 am
Reply with quote

This article is regarding SQLWARNINGs. Just give it a read, might help.

Sushanth
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts How to avoid duplicating a CICS Web S... CICS 0
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top