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
 

 

Avoid warnings in a db2 query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Avoid warnings in a db2 query
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

Senior Member


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

PostPosted: Mon Apr 20, 2009 12:44 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Mon Apr 20, 2009 1:08 pm    Post subject: Reply to: Avoid warnings in a db2 query
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    Post subject:
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: 1013
Location: India

PostPosted: Fri Apr 24, 2009 12:51 am    Post subject:
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    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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am


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