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 » Pattern in DFDL IIB 9

Post new topic  Reply to topic
 Pattern in DFDL IIB 9 « View previous topic :: View next topic » 
Author Message
varun6
PostPosted: Tue Nov 18, 2014 6:36 am    Post subject: Pattern in DFDL IIB 9 Reply with quote

Newbie

Joined: 25 Oct 2012
Posts: 9

From the source we are receiving a value with Exponential as 1.2345e3 and the output value should be 1234, I'm able to give the pattern for this and also able to get the exact value. For the same filed we may except two type of input values above mentioned is one set and other is 3840000.1234 and the output for this value should be 384000012, where we should eliminate the last two digits and also the decimal point.

Can we specify two patterns for the same field in DFDL?
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 18, 2014 11:33 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So for the first type of input value you want to take the logical value of 1234.5 and convert it to 1234. So you are simply removing the fractional part ( not rounding ).

For the second type of input value in the same field you want to take the logical value of 3840000.1234, multiply by 100 and truncate.

So - how do you tell the difference between these two 'types' of input value?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
varun6
PostPosted: Tue Nov 18, 2014 11:43 am    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2012
Posts: 9

Sometimes i may get with exponent and sometimes as decimal number.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 18, 2014 1:44 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you want to process this field using the following rules:
Code:
IF the number is expressed in scientific notation ( with an exponent )
THEN truncate the result
ELSE multiply the number by 100 and truncate the result
Is that correct?
_________________
Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too.
Back to top
View user's profile Send private message
varun6
PostPosted: Thu Nov 20, 2014 7:14 am    Post subject: Reply with quote

Newbie

Joined: 25 Oct 2012
Posts: 9

I have found a solution for this. The only way is to write a custom esql file and use for the fields which we need to modify. I have created two patterns in which one pattern is, when we get a number with exponent and the other is when we get a decimal number. We can change the pattern in the DFDL but it only works for only one input.


Thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Pattern in DFDL IIB 9
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.