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 » problem with date function in test environment

Post new topic  Reply to topic
 problem with date function in test environment « View previous topic :: View next topic » 
Author Message
credospirit
PostPosted: Wed Dec 13, 2017 11:06 pm    Post subject: problem with date function in test environment Reply with quote

Newbie

Joined: 13 Dec 2017
Posts: 1

Hi guys,

I have got a different behavior between dev environment ( IIB 10.0.0.7) and test environment ( IIB 10.0.0.3).

I write this code to compare 3 date and take the max date. It work very well in my dev environment but when i deploy to test, he didn't work. If somebody have idea to fix this , i will be very glad

Code:
CREATE FUNCTION maxDate(IN dateOne DATE, IN dateTwo DATE, IN dateThree DATE)
      RETURNS DATE
      BEGIN
      
      DECLARE result DATE;
      IF (dateOne >= dateTwo AND dateOne >= dateThree) OR (dateOne >= dateTwo AND dateThree <= dateTwo ) THEN
         SET result = dateOne;
      
      ELSEIF (dateTwo >= dateThree AND dateTwo >= dateOne) OR (dateTwo >= dateThree AND  dateOne <= dateThree) THEN
         SET result = dateTwo;
      
      ELSEIF (dateThree >= dateOne AND dateThree >= dateTwo) OR (dateThree >= dateOne AND dateTwo <= dateOne) THEN
         SET result =  dateThree;
      END IF;
      
      RETURN result;
   END;
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Fri Dec 15, 2017 1:31 am    Post subject: Reply with quote

Knight

Joined: 17 Jul 2017
Posts: 516
Location: UK

Hi...first of all having different broker versions across the environment is never a good idea as you've already seen that a code developed on a higher fixpack level may not work at a lower one.

What you could do is collect user traces at both Dev & Test and compare the trace to detect any difference, along with that go through the 'Problems fixed' list between 10.0.0.3 and 10.0.0.7 fixpack and see.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Fri Dec 15, 2017 10:55 am    Post subject: Re: problem with date function in test environment Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

credospirit wrote:
... when i deploy to test, he didn't work.

Describe in more detail what "he didn't work" means.

credospirit wrote:
Code:
-- ...
      IF (dateOne >= dateTwo AND dateOne >= dateThree) OR (dateOne >= dateTwo AND dateThree <= dateTwo ) THEN
-- ...
      ELSEIF (dateTwo >= dateThree AND dateTwo >= dateOne) OR (dateTwo >= dateThree AND  dateOne <= dateThree) THEN
-- ...
      ELSEIF (dateThree >= dateOne AND dateThree >= dateTwo) OR (dateThree >= dateOne AND dateTwo <= dateOne) THEN
-- ...

The right hand side of the OR clauses are redundant; it is impossible for the right hand side to be TRUE when the left hand side is FALSE. The last IF clause is also redundant; it is impossible for all three IF clauses to be FALSE.
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 » problem with date function in test environment
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.