Author |
Message
|
anveshmora |
Posted: Fri Jan 10, 2014 9:21 pm Post subject: Message set to handle fixed length and truncate the rest |
|
|
Newbie
Joined: 10 Jan 2014 Posts: 1
|
Recently I have came across a situation where I need to parse multiple records from a file of fixed length. Let say I have a file with multiple records of variable length. From that variable length records I have to take only first 127 characters and ignore rest of characters in each record and parse the next record. And this should be handled using a message set.
And Input node for Message flow is MQInput but not FileInput node. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Jan 10, 2014 9:48 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Is there a question ? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Jan 11, 2014 12:04 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Moderators can this be moved to the Broker Forum? _________________ 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 |
|
 |
fjb_saper |
Posted: Sat Jan 11, 2014 1:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So moved  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Sun Jan 12, 2014 7:35 am Post subject: Re: Message set to handle fixed length and truncate the rest |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
anveshmora wrote: |
Recently I have came across a situation where I need to parse multiple records from a file of fixed length. Let say I have a file with multiple records of variable length. From that variable length records I have to take only first 127 characters and ignore rest of characters in each record and parse the next record. And this should be handled using a message set. |
Congratulations. Sounds like fun. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Jan 13, 2014 1:03 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
The CWF physical format has a special setting for LengthUnits. If you declare an element with type 'xs:hexBinary' and set LengthUnits to 'endOfParent' then it should do what you need. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
|