Author |
Message
|
mqsidude |
Posted: Wed Jan 28, 2004 8:27 pm Post subject: Error in parsing signed numbers |
|
|
 Centurion
Joined: 22 Jan 2004 Posts: 148
|
Hi group,
I have an element in cobol copy book of type PIC s9(4) USAGE COMP. When i import this to WMQI 2.1(no CSDs applied), it is creating the element with the following properties :
Logical Type - INTEGER
In CWF layer,
Physical Type : Integer
Length Count : 4
Length Units : Bytes
Signed : Yes
Sign Orientation : N/A
Byte Alignment : 1 Byte
String Justification : N/A
Padding Character : Disabled
Skip Count : 0
Encoding Null : NULLLogicalValue
Encoding Null Value: 0
Problem : The value am getting for this field in the input stream is like '000{'. I came to know that this something related to signed numbers.The flow is throwing error at this point. Can anyone throw some light on this please?
Thanks.... |
|
Back to top |
|
 |
kirani |
Posted: Wed Jan 28, 2004 8:35 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
First, apply latest CSD for WMQI on your server.
I think you need to change properties for this element,
It should be,
Physical Type: Packed Decimal
Signed: Yes _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
mqsidude |
Posted: Wed Jan 28, 2004 10:25 pm Post subject: |
|
|
 Centurion
Joined: 22 Jan 2004 Posts: 148
|
Hi kiran,
Thanks for the quick reply...
I changed the element properties as you said.
But it is still throwing the following error (In event log):
****************************************
Data conversion failed: data invalid. Type of data being read: packed decimal, no sign found , data: 0x3030307b;
A data conversion during reading or writing of a message failed because the input data was invalid for the output data type.
Check that the processed message is of the expected format and type. If the problem persists please record all the details provided with this error message and contact your IBM support center.
****************************************** |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jan 28, 2004 10:37 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
You say the field is defined as:
Quote: |
type PIC s9(4) USAGE COMP |
But then you give the input stream as:
Quote: |
000{ or later 0x3030307b |
Only one of those can be correct. Usage COMP is a binary integer. The 'stream' you have used as an example is just PIC S9(4). Not COMP. Also, 'B' is not a normal sign. Have you set the CONVERT option in the Input Node, because with this kind of data you can only do that if you have written a Conversion Exit. This is NOT string data.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
mqsidude |
Posted: Thu Jan 29, 2004 1:09 am Post subject: |
|
|
 Centurion
Joined: 22 Jan 2004 Posts: 148
|
Hi Eddie,
Am sorry for that mistake. The type is just PIC s9(4).
The input stream consists of a value '000{' for this element.
In addition to the info in my last posting, the input data is being put into the input queue by COBOL application. The WMQI broker is on AIX box.
The exception am getting is as floowing :
****************************************
Data conversion failed: data invalid. Type of data being read: packed decimal, no sign found , data: 0x3030307b;
A data conversion during reading or writing of a message failed because the input data was invalid for the output data type.
Check that the processed message is of the expected format and type. If the problem persists please record all the details provided with this error message and contact your IBM support center.
****************************************** |
|
Back to top |
|
 |
EddieA |
Posted: Thu Jan 29, 2004 8:17 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Have you set the CONVERT option in the Input Node |
Also, you need to back out the change suggested by Kiran. This is NOT packed decimal data. The correct type is Extended Decimal.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
schofier |
Posted: Thu Jan 29, 2004 9:57 am Post subject: |
|
|
Novice
Joined: 10 Dec 2003 Posts: 14 Location: IBM Hursley
|
What CCSID is your input message in (specified in the RFH2 or MQMD if you're using an MQSeries Input queue) ?
Assuming that the CCSID relates to an ASCII platform, the CWF parser (in WMQI 2.1) expects an Extended decimal (with embedded sign) to be in the range 0x30 to 0x39 for a positive number and in the range 0x70 to 0x79 for a negative number.
An alternative representation (which I suspect your COBOL application is using) of 0x7B,0x41-0x49 for positive numbers and 0x7D,0x4A-0x52 for negative numbers is not directly supported by WMQI 2.1. This support will be inclued in a future version 5.0 CSD.
Hope this helps |
|
Back to top |
|
 |
|