|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Parsed record sequence query |
« View previous topic :: View next topic » |
Author |
Message
|
kash3338 |
Posted: Sat Oct 08, 2011 9:18 am Post subject: Parsed record sequence query |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
I have a input like below,
10 name abc xyz
15 name1 abc1 xyz1
20 name2 abc2 xyz2
25 name3 abc3 xyz3
20 name4 abc4 xya4
25 name5 abc5 xyz5
30 name6 abc6 xyz6
10 name abc xyz
15 name1 abc1 xyz1
20 name2 abc2 xyz2
25 name3 abc3 xyz3
20 name4 abc4 xya4
25 name5 abc5 xyz5
30 name6 abc6 xyz6
Here, each record is the one from 10 till next 10. And under each 10, there is 1 or 0 15, multiple 20 and under each 20, 1 or 0 25 and under 10 there is 1 or 0 30. The structure is like below,
10 -> 1 to -1
15 -> 0 or 1
20 -> 1 to -1
25 -> 0 or 1
30 -> 0 or 1
I have created a message set for the above structure and I need to parse each record separatly and hence I set Parsed Record Sequence in my File Input node.
The problem is, since 20 is repeating, the records are parsed separatly for every 20 as well. But i need all the lines below 10 at once. How do i acheive this? |
|
Back to top |
|
 |
mqjeff |
Posted: Sat Oct 08, 2011 10:08 am Post subject: Re: Parsed record sequence query |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
kash3338 wrote: |
I have created a message set for the above structure and I need to parse each record separatly and hence I set Parsed Record Sequence in my File Input node. |
Well done.
kash3338 wrote: |
The problem is, since 20 is repeating, the records are parsed separatly for every 20 as well. But i need all the lines below 10 at once. How do i acheive this? |
By changing what a record is defined as. |
|
Back to top |
|
 |
kash3338 |
Posted: Sat Oct 08, 2011 6:26 pm Post subject: Re: Parsed record sequence query |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
mqjeff wrote: |
By changing what a record is defined as. |
can you please elaborate on this? how do i define block 20? |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Oct 09, 2011 5:57 am Post subject: Re: Parsed record sequence query |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
kash3338 wrote: |
mqjeff wrote: |
By changing what a record is defined as. |
can you please elaborate on this? how do i define block 20? |
It's not how you define block 20 that needs changing.
It's either what you tell the FileInput node a "record" consists of, or it's the structure of block 10 that you need to change. |
|
Back to top |
|
 |
kash3338 |
Posted: Sun Oct 09, 2011 9:11 am Post subject: Re: Parsed record sequence query |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
mqjeff wrote: |
It's not how you define block 20 that needs changing.
It's either what you tell the FileInput node a "record" consists of, or it's the structure of block 10 that you need to change. |
In my file input node, i just have 4 options, either "whole file", or "fixed length" or "parsed record seq" or "delimited". Here i need to parse each record (from one 10 till another) as one record, hence i select "parsed record seq".
For the structure of my block 10,
I have a root complex type with "All elements delimited" and I have the order as below,
Complex Type for Block 10
Block 10 - 1 to -1 (under Block 10 Cmpx Type)
Block 15 - 0 to 1 (under Block 10 Cmpx Type)
ComplexType for Block 20 (All elements delimited)
Block 20 1 to 1 (under Block 20 Cmpx Type)
Block 25 0 to 1 (under Block 20 Cmpx Type)
Block 30 0 to 1 (under Block 10 Cmpx Type)
Now, when I have the input with both 20 and 25 blocks, it works as expected. But when I dont have Block 25, i just get till Block 20 and rest is missing.
I have tried almost all options to create a proper message set for this, but it does not work as expected. |
|
Back to top |
|
 |
kash3338 |
Posted: Sun Oct 09, 2011 5:53 pm Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
It worked for me
I had set both Group Indicator and Tag value for the fields 20 and 25. Where in only the Tag value should be set. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|