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 Problem

Post new topic  Reply to topic
 Padding Problem « View previous topic :: View next topic » 
Author Message
nik_iway
PostPosted: Fri Feb 23, 2007 8:33 am    Post subject: Padding Problem Reply with quote

Centurion

Joined: 21 Jul 2005
Posts: 115

Hi I have a Messages A and B ( Both Fixed Length), The following are the structures.

Message A has fields

field1 - length 4 data type String left padding zero
field2 - length 4 data type String left padding zero

Message B has field

field3 Length 8 data type String.

I want to populate the field3 in Message B with the values of field1 and field2

when i send the field1 with data 01(With 2 spaces) and field2 with data 02 (With 2 spaces) and populate the field3 it shows as below
01 02
Its not padding with zeros...

Can anybody tell me how to pad with zeros.
Regards
Nik
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 23, 2007 9:14 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

- Set the message set property 'Tim Fixed Length String' to 'Trim both'. That will get the leading spaces removed.
- Model your fields as xsd:integer instead of xsd:string. They will be successfully parsed as '1' and '2' in the message tree ( now that the spaces have been removed).
- Split your 8-character output field into two integer fields with length 4.

The end result should be '00010002' in the output bitstream.
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 Problem
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.