ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing IATA/SITA Type B Messages

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 Parsing IATA/SITA Type B Messages « View previous topic :: View next topic » 
Author Message
whydieanut
PostPosted: Mon Jul 16, 2012 5:03 am    Post subject: Reply with quote

Disciple

Joined: 02 Apr 2010
Posts: 186

Whoa!
Aaaargh! The parser allows you to do things that you intuitively assume shouldn't work!

I was assuming that setting COM_LINE3 to all elements delimited would override the WTS setting...


Anyways got this working!


COM_LINE3 [All elements delimited; delimiter=<SP> ]
WTS [Tagged delimited; delimiter=<SP> ]
CWT:CHARACTER:262143
UWT:CHARACTER:251845
CAW:CHARACTER:011770
UAW:CHARACTER:003114
WTS2 [All elemients delimited; delimiter=<SP>]
WTN1:CHARACTER:WTN1
KG:CHARACTER:KG
TCI:CHARACTER:TCI



Thanks all for your patience
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Jul 16, 2012 5:13 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

for what it's worth,
From my reading of your message it is a hightly customised IATA Type B message.

The 'COMAI' at the start gives it away. This one message has all sorts of data that would normall be sent in separate messages. This is very much an airline specific message. The spec allows for this as long as you don't expect anyone else apart from that airline to understand it.

It contains PAX and Load information and normally a destination airport is terminated by a - character. Here is a more 'normal' LDM message example


Code:

LDM
AA950/29.85769.C32Y98.4/5
-DEN.184/6/2.265.T302.1/302.B302.CNIL.MNIL.ENIL
.PAX/4/12/176.PAD/0/0
SI T4 BALL 6600
 TTL.CB1Y
 VIP3C/2Y/1TKNE
 TB1/19
 MB/18
 BAG19/302
 DISP.PASUTINA


good luck with you modeling.
_________________
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
View user's profile Send private message
adubya
PostPosted: Mon Jul 16, 2012 6:01 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

My current project parses very similar airline reservation messages. We use a custom parser node implemented in Java to parse the messages into XML.

Good luck with your modelling
Back to top
View user's profile Send private message Send e-mail
whydieanut
PostPosted: Tue Jul 17, 2012 12:07 am    Post subject: Reply with quote

Disciple

Joined: 02 Apr 2010
Posts: 186

@smdavies99,

The message in the my first post is an LDM type message.
The one that I posted above is another type called a Closeout Message (COM).

I did read somewhere that these messages aren't too strict in format and that many systems use variants of the original standard.


@adubya,
Are you using regex of some sort to parse the message in Java?
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Jul 17, 2012 2:08 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Closeout messages are AFAIK, not very common at all. In fact, I can't recall ever seeing one 'out in the wild'. MVT, PTM and LDM are by far the most common ones on all the systems I know about.

You are correct in that there is some 'flexibility' in the format of the messages.

One operator might put a field at column 21 whilst another might put it a column 24.
_________________
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
View user's profile Send private message
whydieanut
PostPosted: Tue Jul 17, 2012 4:02 am    Post subject: Reply with quote

Disciple

Joined: 02 Apr 2010
Posts: 186

I am frequently getting data in this format:

F4C35Y303

Which needs to be split as:

Code:

<SEATS>
  <SEAT class='F'>4<SEAT>
  <SEAT class='C'>35<SEAT>
  <SEAT class='Y'>303<SEAT>
</SEATS>

OR

<SEATS>
  <SEAT>
    <CLASS>F</CLASS>
    <COUNT>4</COUNT>
  </SEAT>
  <SEAT>
    <CLASS>C</CLASS>
    <COUNT>35</COUNT>
  </SEAT>
  <SEAT>
    <CLASS>Y</CLASS>
    <COUNT>303</COUNT>
  </SEAT>
</SEATS>


Whats the best way to do it without too much nesting structures?
Does it warrant creating a 'group'?
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 17, 2012 11:29 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Sure - insert a local sequence group with Data Element Separation set to "Fixed Length".

You may get an error telling you that you're not allowed 'Fixed Length' within 'Delimited'. If you do, then set the parent complex type to 'Tagged Delimited' with an empty delimiter, then add *two* local sequence groups. The first one contains the non-fixed length elements and has Data Element Separation set to whatever the complex type used to have. The second one contains the fixed length elements and has Data Element Separation set to 'Fixed Length'.

Dirty tricks, but they work.
Back to top
View user's profile Send private message
whydieanut
PostPosted: Wed Jul 18, 2012 2:15 am    Post subject: Reply with quote

Disciple

Joined: 02 Apr 2010
Posts: 186

The line is not fixed length.
Am using Data Pattern to parse the line.

Have created a Type as follows and reusing it:
Code:

SEATS
 +- SEAT   (Pattern: [A-Z][0-9]+) (Min:1 MAX:3)
       +- CLASS   (Pattern: [A-Z])
       +- COUNT   (Pattern: [0-9]+)


Works fine.
How is this different from using Groups?
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jul 18, 2012 4:31 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Have created a Type...How is this different from using Groups?
If you use a type then in order to use it in a message definition you must assign that type to an element. That will cause an element to be created in the message tree.
If you define it as a sequence group then you can simply insert a reference to your global sequence group inline in any other complex type or group. A group does not cause an element to be created in the message tree.

In other words, your document will parse successfully either way - you can control the depth of nesting in the message tree by using groups versus elements/types.
Back to top
View user's profile Send private message
whydieanut
PostPosted: Wed Jul 18, 2012 8:52 pm    Post subject: Reply with quote

Disciple

Joined: 02 Apr 2010
Posts: 186

Thanks kimbert.

If only the documentation was as clear as you explained
Back to top
View user's profile Send private message
arronlee
PostPosted: Wed Jun 25, 2014 6:45 pm    Post subject: Reply with quote

Newbie

Joined: 25 Jun 2014
Posts: 2

Hi, Thanks for sharing, but I also have another question.
Back to top
View user's profile Send private message
arronlee
PostPosted: Wed Jun 25, 2014 6:48 pm    Post subject: Reply with quote

Newbie

Joined: 25 Jun 2014
Posts: 2

arronlee wrote:
Hi, Thanks for sharing, but I also have another question.


As for me, I am testing the related
java code 128 barcode generator these days. Do you have any ideas about it? Or any good suggestion? I am totally a green hand on barcode generating field. Any suggestion will be appreciated. Thanks in advance.


Best regards,
Arron
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Jun 25, 2014 10:07 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

What has the Barcode issue to do with IATA/SITA messages? What STX Message type are your talking about?

If there is none, the please repost your question in a new thread.
_________________
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
View user's profile Send private message
pennharris
PostPosted: Wed Jul 02, 2014 6:26 pm    Post subject: Reply with quote

Newbie

Joined: 02 Jul 2014
Posts: 2
Location: Orange

adubya wrote:
My current project parses very similar airline reservation messages. We use a custom parser node implemented in Java to parse the messages into XML.

Good luck with your modelling


This sounds helps to solve my issue in java. Thanks.

Penn
Life is getting better!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing IATA/SITA Type B Messages
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.