Author |
Message
|
kiranshet89 |
Posted: Sun Jul 26, 2015 9:26 pm Post subject: Fileinputnode |
|
|
Newbie
Joined: 13 Mar 2015 Posts: 8
|
Hi ,
I have a requirement in IIB where I need to read a file which contains multiple records(say an xml) delimited by a character say @@@.So I need to extract each record and put to a queue.
This has to happen within a transaction.Say If I have 100 records in the file,I have to put it as 100 different messages in the queue.If any failure occurs then all the messages have to be rolled back and not put into the queue. Please suggest me how to do it. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jul 26, 2015 10:38 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Have you looked at the FileInput Node and its options for handling records?
Have you looked at the FileInput Node and its options for transactionality?
Have you looked at the MQOutput Node and its options for how it handles transactionality?
Have you looked at the MQ documentation on the Max Number of un-comitted messages?
Then think about how you would tie all that together and you will be getting close to your solution. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
nelson |
Posted: Mon Jul 27, 2015 4:05 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
I'm afraid you can't do that with FileInput Node:
Quote: |
One or more messages can be read from a single file, and each message is propagated as a separate flow transaction. The part of a file that generates one message flow transaction is called a record. A file can be a single record, or a series of records. Properties on the node specify how the FileInput node determines the records in a file. |
|
|
Back to top |
|
 |
zpat |
Posted: Mon Jul 27, 2015 4:15 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You can process the whole file as one record, and then generate multiple MQ messages using propagate inside a ESQL loop.
Just be aware of memory size limitations if doing this. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
nelson |
Posted: Mon Jul 27, 2015 4:37 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
zpat wrote: |
You can process the whole file as one record, and then generate multiple MQ messages using propagate inside a ESQL loop.
Just be aware of memory size limitations if doing this. |
 |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jul 27, 2015 4:38 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Have you considered building a model that matches the message you actually need to read from the file? I.e. a model that includes up to 100 repeats? |
|
Back to top |
|
 |
|