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 » Dynamic Referencing issue

Post new topic  Reply to topic
 Dynamic Referencing issue « View previous topic :: View next topic » 
Author Message
leo>
PostPosted: Thu Jan 12, 2006 10:42 am    Post subject: Dynamic Referencing issue Reply with quote

Apprentice

Joined: 06 Oct 2004
Posts: 42

Hi All,

I facing a problem while using dynamic referencing to read a huge input file (~2 MB) that contains multiple lines of delimited data..
In a compute node, for every line in the input file I need to make an insert into a oracle table.

So my flow looks like:
Code:

           |--> FailQ
MQInputNode -----------------------> Compute Node
           |--> Catch-Error handler


My ESQL looks like:
Code:

WHILE(LASTMOVE(REFIN))

 SET OutputRoot.MRM."Field1" = REFIN."Value1";
 SET OutputRoot.MRM."Field2" = REFIN."Value2";
 SET OutputRoot.MRM."Field3" = REFIN."Value3";

  Set MsgBlob =
 ASBITSTREAM( OutputRoot.MRM,
 InputRoot.MQMD.Encoding,
 InputRoot.MQMD.CodedCharSetId,
 'E34JDR407Q001','Format1',
 'XML',
 RootBitStream);   

Set Msg = Cast(MsgBlob as Char CCSID InputRoot.MQMD.CodedCharSetId);

PASSTHRU('Insert into Table1 (KEY,XML)  values(null,Msg);
MOVE REFIN NEXTSIBLING;
END WHILE;



The problem occurs when there is no value for a field. For example, the first line in the input file, has value '10' for field2, and the second line in the input file does not have a value for field2, then field2 still retains the value it had in the previous iteration. How do I clear the values off..?

I tried putting a PROPAGATE adter the PASSTHRU call. IT WORKS. But is this the right way of clearing the old values?
Please let me know..

thanks
_________________
IBM Certified System Administrator - Websphere MQ V5.3
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Jan 12, 2006 10:47 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I really don't think you want to do a propagate, unless you want to move the insert logic into the next node.

If, instead of
Code:
set OutputRoot.MRM."Field1" = REFIN."Value1";
then you do
Code:
set OutputRoot.MRM."Field1" = COALESCE(REFIN."Value1","");


then I think you will be happy.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Thu Jan 12, 2006 8:29 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi leo>,

Try not to use a Passthru also, unless your insert had something which MB does not allow.

Also, ur while does not have a DO ?

Regards.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dynamic Referencing issue
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.