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 » Padding / Encoding Null question

Post new topic  Reply to topic
 Padding / Encoding Null question « View previous topic :: View next topic » 
Author Message
dschott
PostPosted: Fri Sep 06, 2002 9:37 am    Post subject: Padding / Encoding Null question Reply with quote

Newbie

Joined: 06 Sep 2002
Posts: 2

I have an integer mrm field defined for my input data as having a physical type of extended decimal with a length of 6. The input data is not always a length of six, but the output needs to be a length of 6 so I need to pad the data with zeros. On the CWF tab, I have tried using the Encoding Null parameters of NULLPadFill and NULLLogialValue but neither one will pad the number with zeros. I have also tried using Padding Characters of '0' and 0. Am I missing something or is there another way to accomplish this? My output for this is xml.

Thanks.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Sep 06, 2002 10:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Padding is applied only when you create output message.
For Extended Decimal elements, you must specify the size of the element. In your example, your input data must be 6 bytes long (either padded with 0's or NULL's). You will have to change your source application to generate 6 bytes of integer data.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
sgopal
PostPosted: Fri Sep 06, 2002 3:44 pm    Post subject: Reply with quote

Acolyte

Joined: 30 Jul 2002
Posts: 63

Quote:
your input data must be 6 bytes long (either padded with 0's or NULL's). You will have to change your source application to generate 6 bytes of integer data.


Kiran, i feel it is not necessarily that input data should be of length 6. If i have an input element with size less than 6, say 4. If i want to move that to 6 bytes long element, which is defined as extended decimal, size of 6 and padding zeros then the output element should be of 4 + 2 zeros padded.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Sep 06, 2002 4:05 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Gopal,

Sorry, if i wasn't clear enough in my post. I was talking with reference to element in the input message set.

For example, if you define only one element of lenght 6 in a message set and if you try to send 4 bytes integer number, it will fail to parse input message. You must send 6 bytes of input data.
In dschott's post, it says
dschott wrote:

...The input data is not always a length of six, but the output needs to be a length of 6...


If I understand the post correctly, their input integer data lengh is not fixed. So, first they will have to find out a way to read variable lengh of integer data. After that, they will have to reformat it to a fixed length data with appropriate padding char before converting it to XML format.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
wolstek
PostPosted: Thu Sep 12, 2002 7:53 am    Post subject: Reply with quote

Acolyte

Joined: 25 Jun 2001
Posts: 52
Location: Bristol, UK

How about this to get the result in a different way
Code:
DECLARE dec1 DECIMAL;
SET dec1 = CAST(InputRoot.MRM."InputField" AS DECIMAL(6,0));
SET OutputRoot.MRM."OutputField" = dec1;

I have used this technique to transform data from any input format with/without decimals to a required format with a fixed number of decimals.
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 » Padding / Encoding Null question
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.