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 IndexGeneral IBM MQ SupportMessage set sequence issue while trying to restrict the len.

Post new topicReply to topic
Message set sequence issue while trying to restrict the len. View previous topic :: View next topic
Author Message
dpu.gujjar
PostPosted: Wed Aug 22, 2018 5:46 am Post subject: Message set sequence issue while trying to restrict the len. Reply with quote

Newbie

Joined: 22 Aug 2018
Posts: 4

I have designed message set as below
--> Choice
--->Sequence(1)
-->Value1
-->Value2
-->Value3
-->Value4

--->Sequence(2)
-->ValueX


The sequence 1 has group indicator /AB- & Data Pattern as /[A][B]-([^\r]|(\r[^\n])){8,11}\r?$\n. Ideally this sequence1 should not be picked if the length of the value if less than 8 or more than 11 and it should be assigned to Sequence2. But Sequence1 is not accepting valid value when used this data patteren, and it is accepted with pattern /[A][B]-([^\r]|(\r[^\n]))* and invalid scenario more than 11 is also accepted with this.

Can someone please tell me where I am going wrong
Back to top
View user's profile Send private message Send e-mail
dpu.gujjar
PostPosted: Thu Aug 23, 2018 7:38 am Post subject: Reply with quote

Newbie

Joined: 22 Aug 2018
Posts: 4

below is more simplified question,

why sequence is not restricting the length when regular expression [A-Z]{8} is used in pattern, the sequence is accepting the data that has more than 8 characters which is abruptly stopping the processing of the message set
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Aug 23, 2018 7:49 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25318
Location: Ohio, USA

dpu.gujjar wrote:
below is more simplified question,

why sequence is not restricting the length when regular expression [A-Z]{8} is used in pattern, the sequence is accepting the data that has more than 8 characters which is abruptly stopping the processing of the message set


Well a sequence is just a set of DFDL fields, but a field with a pattern of [A-Z]{8} will attempt to match that. If it's presented with a field which doesn't match that pattern, it fails (as you've discovered).

So it will "restrict" the field to values which match the pattern but it will not "restrict" the values by making them conform - how could it? If it's faced with 11 lower case letters it could truncate & fold to upper case but what could it do with 8 digits? or 11 digits?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 23, 2018 7:51 am Post subject: Re: Message set sequence issue while trying to restrict the Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25318
Location: Ohio, USA

dpu.gujjar wrote:
The sequence 1 has group indicator /AB- & Data Pattern as /[A][B]-([^\r]|(\r[^\n])){8,11}\r?$\n. Ideally this sequence1 should not be picked if the length of the value if less than 8 or more than 11 and it should be assigned to Sequence2.


It also looks like you're trying to validate the 4 child fields of sequence one in a single pattern.

I don't think that's a good idea, even if it works.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportMessage set sequence issue while trying to restrict the len.
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.