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

Suppress Warning messages in SPUFI


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

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu Apr 04, 2013 1:01 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Apr 04, 2013 1:49 pm
Reply with quote

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
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu Apr 04, 2013 2:40 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Sat Apr 06, 2013 2:28 am
Reply with quote

--#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
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 DELETE SPUFI DB2 1
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Beautifying the SPUFI output DB2 5
No new posts REXX GETMSG does not return £HASP880... CLIST & REXX 2
No new posts Read 4MB message and split into multi... COBOL Programming 9
Search our Forums:

Back to Top