Author |
Message
|
jayffic |
Posted: Wed Mar 12, 2003 10:22 pm Post subject: COBOL integer conversion help...please |
|
|
Novice
Joined: 12 Mar 2003 Posts: 12
|
I'm new to WMQI.
I have a COBOL copylib with a PIC 9(4) in it.
The message defines it as a four byte integer.
This message comes in from NT (codeset 437) as a BLOB.
I reset the descriptor to the message set which contains the PIC 9(4) field and output the field to XML.
The field value in the input is 0290; the field value on the output is some ungodly number like 230384089.
What the heck is WMQI thinking? How can I get WMQI to understand that I want the value to be and integer value of 290. Ugh.
Thanks in advance. |
|
Back to top |
|
 |
kirani |
Posted: Wed Mar 12, 2003 10:59 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Is your broker on M/F?
This field should be defined as Extended Decimal (4 bytes long) in your message set.
Please make sure your input data is represented correctly with corresponding CCSID. It seems your message is in ASCII format, so pls make sure you also take care of the data conversion. _________________ 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 |
|
 |
jayffic |
Posted: Thu Mar 13, 2003 9:10 am Post subject: |
|
|
Novice
Joined: 12 Mar 2003 Posts: 12
|
Thanks for the quick reply.
Everything is currently on NT. It will eventually all be on S390. Which makes me think we will face these problems again (but that's later).
My input data is ASCII, but I'm not sure what you mean by "take care of the data conversion". Can you elaborate?
Thanks |
|
Back to top |
|
 |
jayffic |
Posted: Thu Mar 13, 2003 11:43 am Post subject: |
|
|
Novice
Joined: 12 Mar 2003 Posts: 12
|
OK, that was weird.
I took your advice and changed the definition to Extended Decimal and it works! Yeah! Thanks!
However, I still do not understand why WMQI did not set it itself. It made the field an integer. Do I have to do this to all PIC 9 fields?
And I'm still wondering about your conversion comment. Do I need to do conversion?
Thanks! |
|
Back to top |
|
 |
kirani |
Posted: Thu Mar 13, 2003 3:17 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you import the copybook into MRM, WMQI will set these properties for you. If you creating these field by hand then it will get defaulted to Integer, you will have to manually change them to Extended Decimal.
When working on M/F system, your data should be converted to EBCDIC. So either the source system, which is feeding your message flow should send data into EBCDIC format, or you should do the data conversion within your message flow. _________________ 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 |
|
 |
jayffic |
Posted: Thu Mar 13, 2003 5:05 pm Post subject: |
|
|
Novice
Joined: 12 Mar 2003 Posts: 12
|
Actually, I did import the copybook and WMQI did set the property for me...to integer. Could this be a CSD thing? Mine is 2.
I'll try the import again when I have time but am glad it's working now.
Gotcha about the data conversion. I'm working with ASCII now and will keep this in mind when I start testing with the M/F data.
Thanks |
|
Back to top |
|
 |
|