|
View previous topic :: View next topic
|
| Author |
Message |
Dsingh29
Active User

Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
hi,
I am trying to suppress warning messages in SPUFI, while searching on net I found that --#SET TOLWARN YES, can do it. But when I code this line before my query, spufi still prints the warning messages as below.
| 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 |
I dont want these messages in my output. I guess spufi is rejecting line --#SET TOLWARN YES, because it treats line starting with two hyphens as comment. Is there a way around, or am I doing something wrong here.
Thanks. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
If you look for the explanation of SQLSTATE=01506, it tells that an adjustment was made to a DATE or TIMESTAMP value to correct an invalid date resulting from an arithmetic operation. So how your SQL query looks like?
What level of DB2 are you at? And this article might just interest you. |
|
| Back to top |
|
 |
Dsingh29
Active User

Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
hi Anuj,
Thanks for the link, I have already gone through it.
My query looks something like this.
select CURRENT DATE - 6 months from sysibm.sysdummy1;
On 31st March when it ran, March 31, 2013 - 6 MONTHS would be September 31, 2012 which does not exist (September has only 30 days) so the date adjustment, hence the warnings.
Our DBA says , "The messages are just telling you that DB2 corrected the invalid date to allow the SQL to run. The fact that it generates 8 lines for every record, this is what is filling up the JES2 spool and causing the system issue. "
To avoid using up system resources, we were looking at supressing the warning messages. Other option before us is to schedule job on 27 or 28 every month, so it never encounters the 30/31 days issue.
We know to put PARMS('SQL,1,TOLWARN(YES)') in batch job, can serve our purpose, but I was just testing the same parm in SPUFI, but not getting the desired result because of reason mentioned in my previous post.
In spufi I am testing for this query.
| Code: |
--#SET TOLWARN NO
SELECT MONTH(DATE('2013-03-31') - 6 MONTHS) from sysibm.sysdummy1;
|
We have DB2 Version 9 Release 1 |
|
| Back to top |
|
 |
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 767 Location: Whitby, ON, Canada
|
|
|
|
--#SET TOLWARN YES is a called a 'functional comment'. It is supported by DSNTEP2/4.
DSNTEP2 <> SPUFI. It is commonly called 'batch SPUFI' but it is not the same program that you invoke via the DB2I panel. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|