Author |
Message
|
datspats |
Posted: Tue Oct 16, 2007 11:02 pm Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
I have similar problem, message with the structure
Header <CR><LF>
repeating message data[0]<CR><LF>
repeating message data[2]<CR><LF>
.
.
.
repeating message data[n]<CR><LF>
footer
I have already developed and tested complex type for the TDS message body structure which is repeated message data,
But message has got header and footer, as advised by jeff the header length is known so this can be parsed.
But How do I take care of the message body end and footer, Has anyone found the solution for the same.
Regards |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 17, 2007 3:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Hopefully a moderator will split this off into it's own thread, as even if it's a "similar" problem, it's still likely entirely different.
You need a type for each of HEADER, BODY, and FOOTER.
Then you need to be able to tell the parser how to determine which of those three pieces it's looking for. How this is done depends a lot on a) which parser you are using, and b) what the data specifically looks like. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 17, 2007 3:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
|
Back to top |
|
 |
datspats |
Posted: Wed Oct 17, 2007 3:31 am Post subject: message set design : TDS : header + repeating body + footer |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
Thanks moderator for spliting, thanks jeff for the reply....
Message set is of type TDS.
Header is formed using 10 simple type field so header type is complex type.
Repeating message body structure is the complex type.
Footer is formed using 5 simple type field so footer type is also complex type.
But not sure how parser come to know about the end of message body and start of the footer. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Oct 17, 2007 3:36 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You have a tag, yes? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
datspats |
Posted: Wed Oct 17, 2007 3:41 am Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
Header, message body and footer is fixed length.
and each ends with the <CR><LF> |
|
Back to top |
|
 |
kimbert |
Posted: Thu Oct 18, 2007 12:36 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Please post an example message. You can change the data if it is commercially sensitive or private. |
|
Back to top |
|
 |
datspats |
Posted: Thu Oct 18, 2007 1:24 am Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
HI, this is the sample message
JJJMFXE 20070607113614 0000 ANDXXX
G01812070830UERKRWN000926.70000000000000925.40000000000
F35357E070625CNYASDN000007.65020000000000007.63000000000
K060UI070716USDZHRN000007.19000000000000007.21860000000
RMTSFXE 01840000644867819.77 0001901739872.21
Message got the header + message body + footer
header is single line end with <CR><LF>
footer is single line end with <CR><LF>
Message body has records of the fixed length each end with the <CR><LF>, in the above example message has got the 3 records, it can be 'n' in number.
Regards |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 18, 2007 2:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Does the header always start with "J", and the trailer always start with "R"? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
datspats |
Posted: Thu Oct 18, 2007 2:41 am Post subject: |
|
|
Voyager
Joined: 12 Apr 2007 Posts: 80 Location: Mumbai
|
yes jeff, we have some pattern for start of the header and footer
e.g. ABCDEF-H for the header and ABCDEF-F for the footer |
|
Back to top |
|
 |
kimbert |
Posted: Thu Oct 18, 2007 7:29 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
we have some pattern for start of the header and footer
e.g. ABCDEF-H for the header and ABCDEF-F for the footer |
Those patterns do not match the data which you posted.
Anyway, if the header, body and footer can be identified by their first N characters, set Data Element Separation to 'Tagged Delimited', and assign a tag to header/body/footer.
Otherwise, set Data Element Separation to 'Use Data Pattern' and set a data pattern on header, body and footer. |
|
Back to top |
|
 |
|