Author |
Message
|
suraj |
Posted: Thu Jan 17, 2008 4:32 pm Post subject: Files nodes in v6.1 |
|
|
Acolyte
Joined: 31 Jul 2007 Posts: 56
|
I am currently working on the WBM v6.1 and have few problems using the file nodes.
I have to read in from a file record by record.The records are of CWF format and their structure can defined by copybooks.Each record has a different structure and length. Now i have to read certain number of specific records identified by their record number an then construct a single xml message from all those records.
Now when i read a record, using the file input node and pass it downstream, the flow is not over untill i write this to a output. So how do combine the records into a single mesasge. is there a way to read a record from a file while my flow is still processing the last record?? or how do i persist records in a flow so that they can be acessed at the time of constructing the o/p xml message???
Any idieas how to do this??? |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Jan 18, 2008 1:37 pm Post subject: A few options |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
1) You could try putting the records into the Shared Storage ESQL
Declare some ESQL Variables as Shared.
2) Another way would be to put them into a database in BLOB format.
Then when you read the last record, you can format the message.
Finally, you could read the whole file in ONE go and then separate out the records by parsing the data for the record delimiter. _________________ 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 |
|
 |
jefflowrey |
Posted: Fri Jan 18, 2008 1:41 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Or you could use the collector node.
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
suraj |
Posted: Mon Jan 21, 2008 10:02 am Post subject: |
|
|
Acolyte
Joined: 31 Jul 2007 Posts: 56
|
thanks!!
Thats what i am trying to do..store them in shared variables.
Can collector node be used in this case??? i am just wondering how..cause collect node helps when the messages are coming from different sources... whereas i am reading all the records from the same file.. |
|
Back to top |
|
 |
mqmatt |
Posted: Tue Jan 22, 2008 6:54 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Yes, Collector wouldn't be appropriate if you're reading from the same file. Could you define your message format so that one collection==one record? |
|
Back to top |
|
 |
|