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 inconsistent data

Post new topic  Reply to topic
 Parsing inconsistent data « View previous topic :: View next topic » 
Author Message
EvolutionQuest
PostPosted: Wed Feb 25, 2004 6:37 am    Post subject: Parsing inconsistent data Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

I am trying to figure out the best method in handling a lastname with a suffix. For example the suffix could look like: ' CPA ', ',CPA', ' CPA.', or ',CPA.' minus the single quote. I am thinking the firstname, lastname, and suffix should be within a compound type fullname. The thing that throws me is the different patterns that the suffix could be coming in. Any suggestions would be greatly appreciated.

chris
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Missam
PostPosted: Wed Feb 25, 2004 6:42 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Can you be more familiar with your requirement ,what are you try to do ,are you constructing a MRM(TDS) if it is ,is it fixed length or tagged delimited.
Back to top
View user's profile Send private message
EvolutionQuest
PostPosted: Wed Feb 25, 2004 7:16 am    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

This would be an MRM that would look something like:

TAG|Prefix|FirstName|LastNameSuffix|Rest of fields delimited by pipe symbol~
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Missam
PostPosted: Wed Feb 25, 2004 7:20 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Is there a PIPE delimiter between lastname and suffix
Back to top
View user's profile Send private message
EvolutionQuest
PostPosted: Wed Feb 25, 2004 7:23 am    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

nope
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
wmqiguy
PostPosted: Wed Feb 25, 2004 1:10 pm    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 145
Location: Florida

Chris:

It sounds like you have two variable-length fields being treated as one. Hunt down the designer of this format and explain why another pipe character would be handy! I hate to say this, but I'm not sure there is a way to do this....at least not elegantly.

I'm shooting from the hip here, but is the data coming in camel-case? Assuming that the first charater of the suffix is capitalized (Phd, Jr, CPA, etc.), you could walk through the field and look for the second Capitalized character and then treat all characters from that point forward as the Suffix. (Like I said, this isn't elegant.) Otherwise, I'm not sure there is a way to do this.

Good Luck!
Back to top
View user's profile Send private message
Missam
PostPosted: Wed Feb 25, 2004 1:32 pm    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Quote:

Assuming that the first charater of the suffix is capitalized (Phd, Jr, CPA, etc.), you could walk through the field and look for the second Capitalized character

Just Curious to ask,IS there any function in ESQL that tell whether a character in a string is Caps or Lows
Back to top
View user's profile Send private message
wmqiguy
PostPosted: Wed Feb 25, 2004 1:46 pm    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 145
Location: Florida

Nope. You would have to check each character against the alphabet. I never said this was pretty!
Back to top
View user's profile Send private message
wooda
PostPosted: Thu Feb 26, 2004 3:55 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

This should be able to be modelled in TDS.

You have a delimted structure.
within which you need to model the Lastname-suffix part as a substructure and use data element separation of Pattern.

This will allow you to use regular expresion to separate the suffix from the lastname.

I'm sure this should be possible but may require a bit of thought to figure out the best patterns to use.


This will depend on exactly which forms the suffix may take.

Do you always get a suffix?
Is it always of one of the following forms ?

' CPA '
',CPA'
' CPA.'
',CPA.'
Back to top
View user's profile Send private message
EvolutionQuest
PostPosted: Thu Feb 26, 2004 10:23 am    Post subject: Reply with quote

Voyager

Joined: 18 Sep 2001
Posts: 88
Location: Billings, MT

There are a number of suffixes, but the CPA suffix seems to be the odd ball of the group. Don't ask me why they did this, and one solution that I think will go forward is to move this logic into a Stored Procedure which is able to handle the &#^# better.

I still am going to pursue a solution via TDS, but at least my headache is over
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Parsing inconsistent data
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.