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 » JText to WBIMB - delimited format

Post new topic  Reply to topic
 JText to WBIMB - delimited format « View previous topic :: View next topic » 
Author Message
wbiadp
PostPosted: Wed Aug 24, 2005 9:44 am    Post subject: JText to WBIMB - delimited format Reply with quote

Newbie

Joined: 17 Aug 2005
Posts: 9

Hi All,
I have to configure JText Adapter to process the below fiile format and put it as 1 message on a queue............ so that WBI Message Broker will use it.

Here is a file format that I have to make it work. Except for the last Record of the file (TRAILER) other records are considered as BODY. All records are delimited by EOL and fields are delimited by ','.
I created 2 B.Os (BODYRec,TRAILERRec) representing Body and Trailer. Added them to JText connector. Also added MO_myJTextConnector_BODYRec, MO_myJTextConnector_TRAILERRec with EventHandler as 'MO_DataHandler_DefaultDelimitedConfig' for above.

Pls give me some suggestions.
Below is sample format of my file with 10 records. + trailer.

Quote:

StatusCode, Status Value, IPNCode, Comments
StatusCode, Status Value, IPNCode, Comments
StatusCode, Status Value, IPNCode, Comments
StatusCode, Status Value, IPNCode, Comments
....... 10 Records
Trailer, Date,TimeStamp,END
Back to top
View user's profile Send private message
recallsunny
PostPosted: Wed Aug 24, 2005 2:38 pm    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

Are you familiar with JText...? Have you customized DataHandlers before?
Back to top
View user's profile Send private message
wbiadp
PostPosted: Thu Aug 25, 2005 8:00 am    Post subject: Reply with quote

Newbie

Joined: 17 Aug 2005
Posts: 9

Hi Sunny
This is like my 1st JText implementation.
No, I haven't done customized DataHandlers before. Do u think this one requires customized code ? In this case, is it a difficult task to write customize code ? can we not get away using the basic delimited datahandler ? pls enlighten me as much as u can

I am reading that datahandlers pdf now.

I assumed JText is primarily serves Queue to File & File - Queue scenarios.
Back to top
View user's profile Send private message
hopsala
PostPosted: Thu Aug 25, 2005 12:03 pm    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

wbiadp wrote:
I assumed JText is primarily serves Queue to File & File - Queue scenarios.

Nope. It's also used for polling a directory for file events (that is, new files), for logging, for looking at log files and more - and it doesn't have to convert these to a message, in ICS it can be sent directly to the server as a GBO (if this sounds like chinese, nevermind).
wbidp wrote:
No, I haven't done customized DataHandlers before. Do u think this one requires customized code ?

I don't think that's what sunny meant, he meant "customize" in the sense of "customizing the configuration of" not writing code...

Maybe you should keep reading the pdf
Back to top
View user's profile Send private message
recallsunny
PostPosted: Thu Aug 25, 2005 2:24 pm    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

hopsala wrote:
I don't think that's what sunny meant, he meant "customize" in the sense of "customizing the configuration of" not writing code...
Maybe you should keep reading the pdf

Have you any idea how a Delimited Datahandler processes the serialised string read from a file to a Business Object?
Quote:
in ICS it can be sent directly to the server as a GBO

How can it convert the message to a GBO without even processing the ASBO, unless you just process the whole file as a Single attribute in your object definition.

The jist of all this is, JText needs to build a Business Object out of the data read from a file. The main hurdles for this are
1. It needs the Business Object Name & Verb in the File.
2. Datahandler cannot differentiate between the Types of BO's (BODYRec,TRAILERRec) unless you provide the BO names along with Data.
3.Delimited Datahandler does not handle CR/LF between the data lines.

To Overcome all these you have 2 options:
a)You will need to customize the delimited Datahandler.
OR
b)You build a Single BO with Only 1 attribute and pick up the file as Long text.

However with Option 2, You will have to reset the content to BLOB in your messae flow and then build a Message Set in TDS to reparse this.
Back to top
View user's profile Send private message
hopsala
PostPosted: Thu Aug 25, 2005 3:06 pm    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

recallsunny wrote:
Have you any idea how a Delimited Datahandler processes the serialised string read from a file to a Business Object?

Is this question directed at me? If so then yes, I do, I just did it two weeks back, why?
recallsunny wrote:
How can it convert the message to a GBO without even processing the ASBO

Of course it can't convert to GBO without first processing the ASBO, that's why one has to use datahandlers and build maps, nespa? What I meant was that the flow subscribes to the GBO not ASBO, and that it is not necessarily received as a message on queue.
I was simplifying the answer for the sake of wbiadp here, who is still in the learning process - that's why I told him to go on reading. No need to get all red-font on me

Aside from that, everything you said is true - he will have a problem with the CR/LF, although I remember it is supposed to be solvable without writing code, although I never tried it.
Back to top
View user's profile Send private message
recallsunny
PostPosted: Fri Aug 26, 2005 10:13 am    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

Quote:
No need to get all red-font on me

Was just making a point ! no hard feelings...
However the idea of customizing the Datahandler is not soo appealing as you have limited options for debugging it and its a bit complicated the first time.

The sample "Delimited.java" file used to be provided in the Development kits of the ICS installation in previous versions. But I was not able to find that in ICS 4.3. Check if its available in your installation of Adapter framework.
Back to top
View user's profile Send private message
djeripo
PostPosted: Sun Aug 28, 2005 2:09 pm    Post subject: Reply with quote

Master

Joined: 25 Jan 2004
Posts: 225

Quote:
recallsunny wrote:
How can it convert the message to a GBO without even processing the ASBO


Why do you need a ASBO as long as the requirement doesnt need to convert ASBO-GBO.You can get away using GBO.No maps involved.
Back to top
View user's profile Send private message Visit poster's website
RocknRambo
PostPosted: Sun Aug 28, 2005 8:01 pm    Post subject: Reply with quote

Partisan

Joined: 24 Sep 2003
Posts: 355

Are You Guys missing something....

wbiadp wrote:
Quote:
I have to configure JText Adapter to process the below fiile format and put it as 1 message on a queue............ so that WBI Message Broker will use it.



Its the Message Broker... a Message flow will process from the JText Adapter Delivery queue..

there wasn't a question abt ASBO or GBO (NO WICS world).


-RR
Back to top
View user's profile Send private message
wbiadp
PostPosted: Mon Aug 29, 2005 7:16 am    Post subject: Reply with quote

Newbie

Joined: 17 Aug 2005
Posts: 9

hi there,
The client is concerned about maintaining of a Custom Code solution and support given for it by IBM.

I am thinking of loading the file into queue as binary data. (by setting the DataProcessingMode of the my BO- 'MOmyJTextConnector_Default' as BINARY) And later use Reset Content Descriptor Node in MessageBroker to convert and use message set to parse it.


In the MO, usually, what should be the settings for the EventDataHandler and OutputDataHandler fields if I set DataProcessingMode as BINARY ??




Thanks in adv.
Back to top
View user's profile Send private message
kishoreraju
PostPosted: Tue Aug 30, 2005 12:52 am    Post subject: Reply with quote

Disciple

Joined: 30 Sep 2004
Posts: 156

By setting DataProcessingMode to Binary it will reads the content byte by byte.it is not going to do any conversion from string to binary or binary to string. Generally we use DataProcessingMode =Binary when we have special characters in our input data.

If there is anything worng please correct Me.
Back to top
View user's profile Send private message
recallsunny
PostPosted: Tue Aug 30, 2005 9:02 am    Post subject: Reply with quote

Disciple

Joined: 15 Jun 2005
Posts: 163
Location: Massachusetts

What Kishore says is true, this option will not help you.
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 » JText to WBIMB - delimited format
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.