Author |
Message
|
Angshuman |
Posted: Thu May 21, 2009 10:30 pm Post subject: Packed decimal Comp-3 values not writing correctly |
|
|
Apprentice
Joined: 30 Apr 2009 Posts: 29
|
Hi Guys,
I am parsing data i.e; packed decimal Comp-3 ... I have created a messge tree to read the data but while writing the data it is storing some junk values. Destination is a mainframe system, so i have used encoding 530. Just to show the actual data and the data my message flow is generating :
Actual Data : Y US 2
My Data : Y!US)2
If you notice there is an special character ) in the data which is actually suppose to be space.
The mainframe system is not able to read the message i am sending.
Can anyone help.. Thanks in advance |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 21, 2009 10:59 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
What version of WMB? Running on what OS (and platform, as encoding is clearly an issue here). Is everything on Z/Linux or are you going "out and back"?
To repeat some good advice often given, have you taken a user trace to see what's actually happening when the output tree is built? How is your message set defined? Was it built by hand, or imported from a copybook? What is the source of the data, and how is that defined / encoded?
More information, more advice.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Angshuman |
Posted: Fri May 22, 2009 2:35 am Post subject: |
|
|
Apprentice
Joined: 30 Apr 2009 Posts: 29
|
Thanks for the quick response.
WMB Version = 6.1 running on windows OS.
But the target system is z/OS. I have changed the CCSID and Encoding accordingly.
Message set is a CWF that is generated out of a copybook.
Surprisingly, i get the correct output when the values for the packed decimal is 1 or 0. For eg 110.00.
But when I give the values other than 1 and 0, i.e, from 2-9, it is giving junk value in the output.
Just curious to know whether packed decimal conversion is limited to only binary. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 22, 2009 2:42 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Angshuman wrote: |
Just curious to know whether packed decimal conversion is limited to only binary. |
No it's not.
Angshuman wrote: |
But the target system is z/OS. I have changed the CCSID and Encoding accordingly. |
Where? Broker, queue manager, input message or output message? These values should always reflect the values actually used in the message.
Angshuman wrote: |
Message set is a CWF that is generated out of a copybook. |
What's the picture of the clause(s) giving trouble? How is the field actually represented in the message set? What did the trace show? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Angshuman |
Posted: Fri May 22, 2009 3:19 am Post subject: |
|
|
Apprentice
Joined: 30 Apr 2009 Posts: 29
|
I have changed the CCSID and Encoding at Broker level.
I can see the properties getting changed when i run the flow in debug mode.
Picture clause of the 2 COMP fields
05 ADTL-HC-PCT PIC S9(1)V9(2) COMP-3.
05 DISC-PCT PIC S9(3)V9(2) COMP-3.
In the message set I have given the type of the 2 fields as PACKED DECIMAL with length 2 and 3 respectively. |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 22, 2009 3:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Angshuman wrote: |
I can see the properties getting changed when i run the flow in debug mode. |
Trace not debug. It has more detail.
Angshuman wrote: |
In the message set I have given the type of the 2 fields as PACKED DECIMAL with length 2 and 3 respectively. |
I thought you said you generated the message set from a copybook? Why are you setting the values manually?
And why the change at broker level? What happens if the broker runs native and the message details are changed? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 22, 2009 10:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Angshuman wrote: |
I have changed the CCSID and Encoding at Broker level.
I can see the properties getting changed when i run the flow in debug mode.
Picture clause of the 2 COMP fields
05 ADTL-HC-PCT PIC S9(1)V9(2) COMP-3.
05 DISC-PCT PIC S9(3)V9(2) COMP-3.
In the message set I have given the type of the 2 fields as PACKED DECIMAL with length 2 and 3 respectively. |
Describe output message properties and MQMD properties:
message/MQMD format
message/MQMD ccsid
message/MQMD encoding.. _________________ MQ & Broker admin |
|
Back to top |
|
 |
Angshuman |
Posted: Tue May 26, 2009 9:51 pm Post subject: |
|
|
Apprentice
Joined: 30 Apr 2009 Posts: 29
|
Vitor/fjb_saper
Quote: |
Describe output message properties and MQMD properties:
message/MQMD format
message/MQMD ccsid
message/MQMD encoding.. |
Input message is in a File so i am using a file protocol and not MQ. Here are the File properties :
MessageFormat CWF1
Encoding 530
CodedCharSetId 819
Quote: |
I thought you said you generated the message set from a copybook? Why are you setting the values manually? |
I am not changing the message set. I have imported it from the copybook.
I have developed a reverse flow just to decode the COMP-3 values and i am getting correct result. Even in RFHUTIL i can see the output file generated is correct.
Its just when that output file is fed to mainframe, it is giving some junk values.
I believe its the encoding issue or problem with ASCII to EBCDIC conversion because in windows system the value seems to be correct.
Can anybody tell me what is the encoding mechanism of z/OS system and what is the encoding code as I am using 530.
Thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 27, 2009 5:07 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You should be using something like encoding 847 and ccsid 37 or 500... on the output  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Angshuman |
Posted: Thu May 28, 2009 1:32 am Post subject: |
|
|
Apprentice
Joined: 30 Apr 2009 Posts: 29
|
Thank you fjb_saper...
It worked |
|
Back to top |
|
 |
|