Author |
Message
|
citahu |
Posted: Wed Aug 28, 2002 6:40 pm Post subject: ASCII numeric to Packed decimal |
|
|
Newbie
Joined: 28 Aug 2002 Posts: 7
|
Hi Experts,
I have a situation to convert ASCII numeric to Packed decima. The details are as follow.
Input data = 1234
MRM (for input)
Logical type = integer
physical type = integer
Length Count = 4 bytes
MRM (for output)
Logical type = integer
physical type = integer
Lenght coutn = 2 bytes
MQInput Node --> Compute --> MQOutput Node
MQInput Default
Message Domain = MRM
Message Set = DPKXXD111999
Message Type = Input
Message Format = CWF
Compute
Set OutputRoot.Properties.MessageDomain = 'MRM';
Set OutputRoot.Properties.MessageSet = 'DPKXXD11999';
Set OutputRoot.Properties.MessageType = 'Output';
Set OutputRoot.Properties.MessageFormat = 'CWF';
Set OutputRoot.MQMD.Encoding = 273;
Set OutputRoot.MQMD.CodeCharSetID = 37;
There is a input parsing error. Anybody know what's wrong? Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Wed Aug 28, 2002 7:00 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
If you are entering data by hand on queue, then Physical type for ASCII numeric (PIC 9(...) clause in COBOL) should be set to Extended decimal. Try chaning this and see if that works. _________________ 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 |
|
 |
lung |
Posted: Thu Aug 29, 2002 12:46 am Post subject: |
|
|
 Master
Joined: 27 Aug 2002 Posts: 291 Location: Malaysia
|
Quote: |
Set OutputRoot.Properties.MessageDomain = 'MRM';
Set OutputRoot.Properties.MessageSet = 'DPKXXD11999';
Set OutputRoot.Properties.MessageType = 'Output';
Set OutputRoot.Properties.MessageFormat = 'CWF'; |
I don't think you need to set all these again the compute node. You just need to set the messagetype = 'output'. _________________ lung |
|
Back to top |
|
 |
citahu |
Posted: Thu Aug 29, 2002 7:30 pm Post subject: |
|
|
Newbie
Joined: 28 Aug 2002 Posts: 7
|
Thanks Kiran & Lung.
It works. At least I have an output to the appropriate queue, instead of failure queue.
However I am not sure if the output is in correct format. Could someone please help to verify?
a) Input = 1234, Output = 4F 23 01 (hex value, & non readable txt)
b) Input = -2288, Output = 8D 28 02 00 (hex value, & non readable txt)
Thanks |
|
Back to top |
|
 |
warrenpage |
Posted: Thu Aug 29, 2002 9:54 pm Post subject: Could be |
|
|
Acolyte
Joined: 19 Feb 2002 Posts: 56 Location: Australia
|
Could be right (the bytes values look ok) but im used to seeing the bytes in a different order on OS390
a) Input = 1234, Output = 01 23 4F
b) Input = -2288, Output = 00 02 28 8D
could just be different big/little endian. |
|
Back to top |
|
 |
|