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 » Decimal number in CWF format

Post new topic  Reply to topic
 Decimal number in CWF format « View previous topic :: View next topic » 
Author Message
ikumar
PostPosted: Sun May 25, 2008 4:18 pm    Post subject: Decimal number in CWF format Reply with quote

Newbie

Joined: 25 May 2008
Posts: 8

HI,
Am trying to convert an XML input message to a CWF output message.
Am not able to define the message set to give me a decimal value as the output. Here's what i need.

If an element has value 1234.56 The output should be similar with padded 0s to fill the length of the field.
The cobol copy book defines this field with data type as PIC 9(4).9(3). When i use this cobol copy book to create a message definition, this field data type is converted to xsd:string, instead of decimal and if i try to change it to decimal, Am not getting the expected value in the output.

Has anyone faced this issue? Please advice.

thanks in advance.
Back to top
View user's profile Send private message
harish_td
PostPosted: Sun May 25, 2008 5:46 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Edited

Last edited by harish_td on Sun May 25, 2008 5:53 pm; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
harish_td
PostPosted: Sun May 25, 2008 5:52 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Hi Kumar,

Change your copybook to read PIC9(4)V9(3) instead of the symbolic PIC 9(4).9(3). The V to indicate the virtual decimal point.

Since the definition is still valid, the missing V is causing the message set generator to represent the field as a string.

Hope that helps,
Harish
Back to top
View user's profile Send private message Yahoo Messenger
ikumar
PostPosted: Sun May 25, 2008 8:46 pm    Post subject: Reply with quote

Newbie

Joined: 25 May 2008
Posts: 8

Thanks for the reply Harish, it does convert the data type to xsd:decimal. But in the output message, i cannot see the decimal point, It just removes the decimal point. Any thoughts on how to retain the decimal point ?

thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue May 27, 2008 4:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

As far as I can tell, COBOL external decimals always use a virtual decimal point. You could try using TDS instead of CWF.
Back to top
View user's profile Send private message
ikumar
PostPosted: Tue May 27, 2008 4:39 pm    Post subject: Reply with quote

Newbie

Joined: 25 May 2008
Posts: 8

Thanks Kimbert, I didn't understand what you mean by "virtual decimal point". I was working with mainframe team and they did show me an old message which had decimal point in it and they expect the new message in the same format.
Using TDS is fine, But then i want to use the cobol copy book to define my message set. Is there no way i handle decimals as needed using CWF?

thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 27, 2008 4:48 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

"virtual decimal point" means "a string of digits without a decimal point in them, where everyone agress where the decimal point 'should' be".

So a number 123456789 could be .123456789, or 1.23456789 or 12.3456789 or etc. etc. etc. depending on what the COBOL copybook says, which will have something like 99V9999999 for the last option there.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 28, 2008 1:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
But then i want to use the cobol copy book to define my message set
Then you need to find a way to describe your numeric format using COBOL. I suggest that you speak to a COBOL expert about that.
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 » Decimal number in CWF format
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.