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 » Unable to compare fields in Msg with the fields in DB table

Post new topic  Reply to topic
 Unable to compare fields in Msg with the fields in DB table « View previous topic :: View next topic » 
Author Message
vinod_sri
PostPosted: Wed Feb 20, 2008 7:06 am    Post subject: Unable to compare fields in Msg with the fields in DB table Reply with quote

Apprentice

Joined: 10 Dec 2003
Posts: 42
Location: Atlanta

Hello Folks,

I have a hard time to establish a relationship between the fields from the incoming message and the columns in the table.

Let me explain it in detail. I have a msgflow with MQInput --->> Compute -->> MQOutput structure, that processes a fixed length messages of 500 bytes each. A bill can have multiple containers and all the containers for that bill is grouped and made a message. First time, hen a message has a Bill Number 123 and 5 containers A, B, C, D, E, it populates the table with all the container numbers for bill number 123. Till that part is everything looks fine.

Later, when one of the containers for this bill is deleted or no longer exist, then we get an update message with the list of remaining containers. Here say container 'B' is deleted and now I get a new message with Containers A, C, D, E for the same bill number 123. Now I pull the records from DB table for the Bill number. I get all the 5 containers. Then I compare these containers with the new list of containers from the update message. Since, container 'B' is no longer exist, I have to set the Delete_Flag to 'Yes' for the container number 'B' in the table and to refresh the other containers with the new timestamp.

Here the problem is, I am able to refresh the records in the table for the containers that are present in the update message, say A, C, D, E. But I am not able to identify the record for container 'B' and set the Delete_Flag to 'Yes'.

Here is what I have done so far,

1. create a while Loop based on each container number from the message.
2. pull all the containers for the Bill number 123 from the table
3. then the container in the loop checks with all the available container from the table for a match.
4. If it finds the match, then I update the record with a new timestamp.
5. But I do not know how to identify the container number which is there in the table and doesn't exist in the update message.

Please help me to identify the container numbers in the table which no longer exist and do not see them in the update message. This is sort of urgent.

Thanks in advance..

Regards,

Vinod
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Feb 20, 2008 7:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

This is a business logic/programming question.

It comes down to
a) you need a list of containers in the table
b) you need a list of containers in the message
c) you need to loop over one, and mark the other, and then loop over the unmarked ones

A simple way to do this is to remove each item from a as you loop over b. That will product a list that holds what's in a but not in b. Then you can loop over that list and do whatever you need.
_________________
I am *not* the model of the modern major general.
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 » Unable to compare fields in Msg with the fields in DB table
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.