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 » XML to Packed decimal

Post new topic  Reply to topic
 XML to Packed decimal « View previous topic :: View next topic » 
Author Message
WBI_user
PostPosted: Sun Jun 06, 2004 8:10 pm    Post subject: XML to Packed decimal Reply with quote

Partisan

Joined: 07 Aug 2001
Posts: 386

I have to map a XML message to a COBOL copy book

The Inout XML is
<AA><BB>2004-05-31</BB><CC>2004-05-31T13:05:15</CC><DD>118.12</DD></AA>

The Copybook has 3 packed decimal fields
05 WW
10 XX PIC 9(05) COMP-3.
10 YY PIC S9(11)V99 COMP-3.
10 ZZ PIC 9(04)V9 COMP-3.

I think the esql should look like:

SET OuputRoot.MRM.WW.XX = InputRoot.XML.AA.BB...
SET OuputRoot.MRM.WW.YY = InputRoot.XML.AA.cc...
SET OuputRoot.MRM.WW.ZZ = InputRoot.XML.AA.DD...

I need the help on the InputRoot side. Do I need to cast the characters inside the XML tag ? I can not find castiing between character to packed decimal. Any suggestion ?
Back to top
View user's profile Send private message
EddieA
PostPosted: Sun Jun 06, 2004 10:09 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Normally, you don't need to CAST to get Packed Decimal, because you would only be trying to move numeric values into the field.

However, in your case, you are trying to put Dates and Times that contain characters other than numerics. So, you will have to use SUBSTRING to ensure that you only have the numeric characters before you SET the Output fields.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » XML to Packed decimal
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.