ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Difference between Time

Post new topic  Reply to topic
 Difference between Time « View previous topic :: View next topic » 
Author Message
Vgowda
PostPosted: Tue Jan 31, 2012 4:10 am    Post subject: Difference between Time Reply with quote

Acolyte

Joined: 11 Dec 2007
Posts: 61
Location: Bengaluru

Hi,

I am trying to find the difference between Time in the ESQL code. My ESQL code look like this :

Quote:
DECLARE duration INTERVAL;
DECLARE sttime TIME SvcInfoRef.StartTime;
DECLARE endtime TIME SvcInfoRef.EndTime;
SET duration = (sttime - endtime) MINUTE TO SECOND ;


In Debug mode the values are

Quote:
sttime :17:34:01.350
endtime :17:34:03.798


But the duration value is NULL. Not able to figure it out where is the error.

Can anybody throw me the thoughts on the same
_________________
Regards
Vinay
Back to top
View user's profile Send private message
adubya
PostPosted: Tue Jan 31, 2012 4:14 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

Don't you want to subtract starttime from endtime ? You're currently the "wrong" way round.
Back to top
View user's profile Send private message Send e-mail
mgk
PostPosted: Tue Jan 31, 2012 4:29 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
But the duration value is NULL


Try looking at the output in a message or in Usertrace. I believe the debugger cannot display an INTERVAL type correctly, but the data really is there...

Kind Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Vgowda
PostPosted: Tue Jan 31, 2012 4:48 am    Post subject: Reply with quote

Acolyte

Joined: 11 Dec 2007
Posts: 61
Location: Bengaluru

@adubya : Its the same if i place the other round as well.

@mgk : I am assigning the duration value to Environment Variable as shown below, still the value is NULL.

Quote:
SET Environment.SvcDetails.ServiceInfo.Duration = duration

_________________
Regards
Vinay
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 31, 2012 4:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vgowda wrote:
@mgk : I am assigning the duration value to Environment Variable as shown below, still the value is NULL.

Quote:
SET Environment.SvcDetails.ServiceInfo.Duration = duration

That doesn't change the fact that the value is an Interval, and that it's likely that the debugger can't display INTERVAL values.

User Trace will show you this data clearly.
Back to top
View user's profile Send private message
Vgowda
PostPosted: Tue Jan 31, 2012 5:08 am    Post subject: Reply with quote

Acolyte

Joined: 11 Dec 2007
Posts: 61
Location: Bengaluru

@mqjeff : I am passing SvcDetails Environment reference from my code for logging, now i casted the duration to Character now it is able to display the difference.

Quote:
DECLARE Var CHARACTER CAST(duration AS CHARACTER).
INTERVAL '0.061464' SECOND


Dont you feel this is a bug in WMBtoolkit? Wasted half day to check why it was getting value NULL .

Anyways Thank you
_________________
Regards
Vinay
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 31, 2012 5:24 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vgowda wrote:
@mqjeff : I am passing SvcDetails Environment reference from my code for logging, now i casted the duration to Character now it is able to display the difference.

Quote:
DECLARE Var CHARACTER CAST(duration AS CHARACTER).
INTERVAL '0.061464' SECOND


Dont you feel this is a bug in WMBtoolkit? Wasted half day to check why it was getting value NULL .


Well, yes, I would personally consider this a bug in the Toolkit. And if I had been running into it, I would have a) opened a PMR, b) taken a user trace anyway just to confirm that I wasn't hitting issues with the debugger. But despite the best efforts of the Toolkit team, I'm still suspicious of the debugger. but then again, I'm still smarting from the dead-on-arrival of Broker version 5.0, so I probably hold onto things too long.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 31, 2012 6:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Vgowda wrote:
Dont you feel this is a bug in WMBtoolkit? Wasted half day to check why it was getting value NULL .


So you've discovered what all WMB people discover; the debugger has limitations.

You'll find any number of posts on this forum on this subject. All of them result in the advice "take a user trace".
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Difference between Time
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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.