Author |
Message
|
SKK |
Posted: Thu May 23, 2013 8:00 am Post subject: Message Set Definition |
|
|
 Acolyte
Joined: 09 May 2005 Posts: 67
|
All
We have requirement to create message set for multi line delimited message
eg
1:data1:somedata1:yymmdd:<LF>
2:dataaaaa2:somedata2:value:currency:<LF>
3:somedata3:type3:yymmdd:<LF>
First field indicates the type of transaction and they are of cardinality 0 to -1
we had defined as below
Parent ( All elements delimited / delimiter <U+000A>)
Child 1 : All element Delimited, (Group indicator as 1: and delimiter as ":")
Child 2: All element Delimited, (Group indicator as 2: and delimiter as ":")
Child 3: All element Delimited, (Group indicator as 3: and delimiter as ":")
For a normal case , its working fine.
but, since they are optional, in case child 2 or 3 are not present, in output message a blank line is getting generated.
Kindly advice. _________________ Regards,
SKK |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu May 23, 2013 8:05 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
What version of Broker are you using?
The answer will be different if it is V7 (or V8 using the MRM parser) than if you are using V8 and the DFDL Parser. _________________ 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 |
|
 |
SKK |
Posted: Thu May 23, 2013 8:12 am Post subject: |
|
|
 Acolyte
Joined: 09 May 2005 Posts: 67
|
We are using WMB 6.1 _________________ Regards,
SKK |
|
Back to top |
|
 |
kimbert |
Posted: Thu May 23, 2013 8:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You will need to upgrade very soon, or you will be out of support.
When you do, you might want to consider moving to v8. It uses the DFDL parser for CSV, and is much easier to work with.
For now though...
- 1:, 2:, 3: are tags on the records.
- The message consists of a sequence of 'Records' which are complex elements.
- Records have a Group Terminator of <CR><LF> ( or whatever is appropriate for your platform )
- Optional Records have minOccurs=1.
I am assuming that the records will always be in the order 1:, 2:, 3:.
If they can appear in random order then you will need a choice group instead of a sequence group.
There may well be other things that you need to get right. If it doesn't work then you will need to carefully describe *all* of the rules about your input data format.
Don't expect a reply from me, though. I'm off on leave for 2 weeks starting now... |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 23, 2013 9:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kimbert wrote: |
Don't expect a reply from me, though. I'm off on leave for 2 weeks starting now... |
It's alright for some. Bank Holiday weekend shows up and everyone's off.
Still, I do have my 2 weeks booked for later in the year and a much more interesting destination than I normally manage for the first week.... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
SKK |
Posted: Tue May 28, 2013 12:44 am Post subject: |
|
|
 Acolyte
Joined: 09 May 2005 Posts: 67
|
We tried with choice, still same. we are getting blank spaces for the optional complex.
any suggestions?! _________________ Regards,
SKK |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 28, 2013 4:17 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
SKK wrote: |
We tried with choice, still same. we are getting blank spaces for the optional complex.
any suggestions?! |
Have you tried with optional records have minoccurs=0?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
SKK |
Posted: Tue May 28, 2013 4:27 am Post subject: |
|
|
 Acolyte
Joined: 09 May 2005 Posts: 67
|
Yes, that's right
optional complex has minoccurs "0", problem is with parent (All elements delimited) and has delimiter as CRLF _________________ Regards,
SKK |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 28, 2013 4:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
SKK wrote: |
Yes, that's right
optional complex has minoccurs "0", problem is with parent (All elements delimited) and has delimiter as CRLF |
You should have a sequence starting with
record terminator crlf being the "envelope" type.
Then further define the record with it's delimiters being ":" and listing the subtypes. Maybe this will give you the schema you are looking for...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|