|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Problem in XML to Fixed Length Format Conversion |
« View previous topic :: View next topic » |
Author |
Message
|
srindies |
Posted: Fri Jan 06, 2006 4:40 am Post subject: Problem in XML to Fixed Length Format Conversion |
|
|
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 |
|
 |
kimbert |
Posted: Fri Jan 06, 2006 5:03 am Post subject: |
|
|
 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 |
|
 |
srindies |
Posted: Fri Jan 06, 2006 5:14 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|