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 » Problem in XML to Fixed Length Format Conversion

Post new topic  Reply to topic
 Problem in XML to Fixed Length Format Conversion « View previous topic :: View next topic » 
Author Message
srindies
PostPosted: Fri Jan 06, 2006 4:40 am    Post subject: Problem in XML to Fixed Length Format Conversion Reply with quote

Apprentice

Joined: 06 Jan 2006
Posts: 28

Hi All,

I am trying to convert XML format message to fixed length format using message broker V5.0.1. I got XML Definitions from XML Schemas and I defined TDS format messageset with fixed length for Output. I used compute node and ESQL (attached below) for conversion. But, in runtime Output message has not been padded with Padding character defined in Message Definition File. I am afraid I couldn’t find reason for it.

I have also changed element datatype to specific (String) in XML Definition format and Treat Length Facet as MaxLength is set to True.

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();

SET OutputRoot.Properties.MessageSet = 'DOOATE0002001';
SET OutputRoot.Properties.MessageType = 'MESGTYPE';
SET OutputRoot.Properties.MessageFormat = 'TDS';

SET OutputRoot.MRM.TransactionCode = InputRoot.MRM.ApplicationHeader.TransactionCode;
SET OutputRoot.MRM.TransactionType = InputRoot.MRM.ApplicationHeader.TransactionType;
SET OutputRoot.MRM.TransmissionMode = InputRoot.MRM.ApplicationHeader.TransmissionMode;
SET OutputRoot.MRM.TransactionDateTime = InputRoot.MRM.ApplicationHeader.TransactionDateTime;
SET OutputRoot.MRM.ExpatCPRNumber = InputRoot.MRM.Body.ExpatCPRnumber;
SET OutputRoot.MRM.BlockNo = InputRoot.MRM.Body.AddressXXYYZZ.Block;
SET OutputRoot.MRM.RoadNo = InputRoot.MRM.Body.AddressXXYYZZ.RoadNumber;
SET OutputRoot.MRM.RoadName = InputRoot.MRM.Body.AddressXXYYZZ.RoadName;
SET OutputRoot.MRM.BuildingNo = InputRoot.MRM.Body.AddressXXYYZZ.BuildingNumber;
SET OutputRoot.MRM.BuildingName = InputRoot.MRM.Body.AddressXXYYZZ.BuildingName;
SET OutputRoot.MRM.FlatNo = InputRoot.MRM.Body.AddressXXYYZZ.Flat;
SET OutputRoot.MRM.POBoxNo = InputRoot.MRM.Body.AddressXXYYZZ.POBoxNumber;
SET OutputRoot.MRM.POBoxArea = InputRoot.MRM.Body.AddressXXYYZZ.POBoxArea;
SET OutputRoot.MRM.XXYYZZAddressConfirmationCode = InputRoot.MRM.Body.XXYYZZAddressConfirmationCode;
SET OutputRoot.MRM.EntityUnitNo_Old = InputRoot.MRM.Body.OldOccupationDetails.EntityUnitNumber;
SET OutputRoot.MRM.SponsorCPRNo_Old = InputRoot.MRM.Body.OldOccupationDetails.SponsorCPRNumber;
SET OutputRoot.MRM.EntityStatusCode_Old = InputRoot.MRM.Body.OldOccupationDetails.EntityStatusCode;
SET OutputRoot.MRM.OccupationCode_Old = InputRoot.MRM.Body.OldOccupationDetails.OldOccupationCode;
SET OutputRoot.MRM.EntityUnitNo_New = InputRoot.MRM.Body.NewOccupationDetails.EntityUnitNumber;
SET OutputRoot.MRM.SponsorCPRNo_New = InputRoot.MRM.Body.NewOccupationDetails.SponsorCPRNumber;
SET OutputRoot.MRM.EntityStatusCode_New = InputRoot.MRM.Body.NewOccupationDetails.EntityStatusCode;
SET OutputRoot.MRM.OccupationCode_New = InputRoot.MRM.Body.NewOccupationDetails.NewOccupationCode;

RETURN TRUE;
END;

Any help to solve this error will be appreciated. Thanks a lot.

Regards,

Sridhar H
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 06, 2006 5:03 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

1. Which element is exhibiting this problem?
2. In the TDS physical format properties for the element, please give the values of the following properties :
- Length
- Justification
- Padding Character
3. In the TDS physical format properties for the complex type which contains the element, what have you set for 'Data Element Separation'?

A couple of other points:
- Changing the XML physical format will have absolutely no effect on the TDS output. Physical formats are completely independent
- The 'Treat Length Facet as MaxLength' property is a logical property, and it only affects the logical validation of messages.
- If you are still using v5 CSD1 then you should plan to upgrade to the latest CSD as soon as possible.
Back to top
View user's profile Send private message
srindies
PostPosted: Fri Jan 06, 2006 5:14 am    Post subject: Reply with quote

Apprentice

Joined: 06 Jan 2006
Posts: 28

Hi Kimbert,

Thanks for your reply.. I am getting this problem from element 1. I will post sample Input and output messages tomorrow.

Also,

Length property is set accordingly based on elements ...
Justification isLeft ...
Padding Character is BLANK ..
Data Element Seperation is Fixed Length ..

Regards,

Sridhar H
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 » Problem in XML to Fixed Length Format Conversion
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.