Author |
Message
|
ktg |
Posted: Tue Dec 14, 2010 10:36 pm Post subject: Getting unexpected output in CWF format |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Hi All,
I have a field in CWF message set and it is of type decimal. When the message is sent to the queue,
1. The decimal point (dot) is not coming in the message.
2. The fraction part is not there
So, I checked the video rental sample to cross check. In the video rental sample also, the output message in the queue is not having decimal point and fraction part. Here is the output
Code: |
Mr Fred Bloggs 12 Willow Avenue Salisbury Fast Cars 2003-05-240006Cut To The Chase 2003-05-240007Message in a Bottle 2003-05-250007 |
I expected below output: (Pls. ignore white space mismatch)
Mr Fred Bloggs 12 Willow Avenue Salisbury Fast Cars 2003-05-246.00Cut To The Chase 2003-05-247.50Message in a Bottle 2003-05-257.00
Is this correct behavior? Could some one please explain.
Thanks in advance,
Kalpana |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Dec 15, 2010 1:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
First of all, can you please share the exact definition of your decimal?
Definition and CWF characteristics please(from the message set)
Did it come from a COBOL copy book?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ktg |
Posted: Wed Dec 15, 2010 1:40 am Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Thanks for the reply.
Sorry, I could not understand the meaning of "Exact defination of decimal". I got field description from a document: The field name is "BuyRate" and it should accupy 6 bytes(including decimal point) and 3 bytes should come after decimal point. Ex. 25.287
I created the message set my self with out using COBOL.
Thank you.
-Kalpana |
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 15, 2010 1:49 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You said:
Quote: |
I created the message set my self with out using COBOL. |
fjb_saper is simply asking you to quote the values all relevant CWF properties.
However...I don't think CWF is the right choice here. CWF is mainly aimed at COBOL applications, where the decimal point is implied, and does not appear in the data. TDS can do everything that you need. |
|
Back to top |
|
 |
good_bee |
Posted: Wed Dec 15, 2010 2:59 am Post subject: |
|
|
Newbie
Joined: 15 Nov 2010 Posts: 5
|
ktg
How have you defined your message set for CWF?
I mean what is the Type of the field? Is it decimal?
and what are the values in fields
VirtualDecimalPoint and Lenght?
If all these are set correctly then it can be
An issue with the CodedCharSetId and encoding.
what CCSID and Encoding are you using?
and what CCSID is MQ manager/channel converting it to?
check your CCSID and encoding for these kind of decimal or packed decimal data deformations. |
|
Back to top |
|
 |
ktg |
Posted: Wed Dec 15, 2010 3:11 am Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Quote: |
fjb_saper is simply asking you to quote the values all relevant CWF properties. |
I have set BuyRate->Properties->Logical Properties->Type: Decimal
BuyRate->Properties->Physical Properties->(CWF)->Local Element-> Physical Type: External Decimal
BuyRate->Properties->Physical Properties->(CWF)->Local Element-> Length: 6
All other values are default
@good_bee
I have not set any field in MQMD
CCSID of queue manager: 437
As Kimbert confirmed that the decimal point does not appear in CWF format, am trying to use TDS. Because, I need decimal point in output message.
Kalpana |
|
Back to top |
|
 |
ktg |
Posted: Wed Dec 15, 2010 4:03 am Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Choosing TDS message set almost solved my problem. But one thing is left: For a field of type float, I need to ensure the decimal point comes after 3rd number from right. Is it possible to add such constraint in the TDS message set?
Thanks,
Kalpana |
|
Back to top |
|
 |
kimbert |
Posted: Wed Dec 15, 2010 7:09 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
ktg |
Posted: Wed Dec 15, 2010 10:42 pm Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Thanks a lot
As there was a drop down list for Precision property, I was under the assumption that I should select from drop down list. After reading the doc, I set the Precision property to 3 and it worked Thanks again.
Kalpana |
|
Back to top |
|
 |
|