Author |
Message
|
SSachdeva |
Posted: Thu Jun 17, 2004 4:01 pm Post subject: Packed Decimal Data from AS/400 |
|
|
Apprentice
Joined: 04 Apr 2002 Posts: 33
|
Hi,
I have a wbimb/wmq question for any of you who can answer it. We have a situation here - where an as/400 application is putting data to a remote queue that points to a local queue on windows. The data contains charatcter data as well as packed decimals. I know that the MQ conversion on the channels cannot handle packed decimals, so I guess the only thing I can think of to do is - not to do conversion on the channels. So even in this case does any one know how I can get WBIMB running on Windows to convert a BLOB that contains EBCDIC data with packed decimals in it - into ASCII character data that represents the incoming EBCDIC data. Your help is greatly appreciated. Thanks in advance.
Shammy |
|
Back to top |
|
 |
kirani |
Posted: Thu Jun 17, 2004 10:44 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You need to model your message using MRM into WMQI. What is the format of the message that comes from AS/400? Is it a copybook structure? Can you post sample here? If it's a copybook strucutre then you can import that into MRM and model your message based on the structure. WMQI will set appropriate properties for all elements, including packed decimal. _________________ 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 |
|
 |
SSachdeva |
Posted: Fri Jun 18, 2004 5:22 am Post subject: |
|
|
Apprentice
Joined: 04 Apr 2002 Posts: 33
|
Kirani,
Thanks for your response - I did create a message set for my incoming fixed width using the cobol copy book I was given. I set my validation to occur on the input queue itself (immediate) and I put the message to the queue from AS/400. In debug mode I see that the mesasge fails as and when it is picked up by the queue. The following is a snipet of my trace file:
'4d442020020000000000000008000000ffffffff0000000022020000b50100004d515354522020200000000001000000414d512048484152444e513031202020109dd040200046090000000000000000000000000000000000000000000000000000000020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202048484152444f5130312020202020202020202020202020202020202020202020202020202020202020202020202020206d7173693120202020202020160105150000005729024c18514964dbeb0c50fc03000000000000000000000b20202020202020202020202020202020202020202020202020202020202020200b000000433a5c5246485574696c5c7266687574696c632e65786500000000003230303430363137323230323135323120202020000000000000000000000000000000000000000000000000010000000000000000000000ffffffff414d495348202020202000000000127f00000012deaa30303030303132333435'.
This message gives the name of the field in the parser that was being parsed at the time the error occurred.
You should check for other messages issued with this one for the full context of the error.
2004-06-17 18:02:15.242968 2492 ParserException BIP5285E: Message Translation Interface Parsing Errors have occurred:
Message Set Name : 'TESTPACKED'
Message Set Level : '1'
Message Format : 'CWF1'
Message Type Path : 'msg_TestPacked'
Review further error messages for an indication to the cause of the errors.
2004-06-17 18:02:15.243368 2492 ParserException BIP5171E: Custom Wire Format parsing error
An error occurred while parsing a Custom Wire Format message.
Current message : 'msg_TestPacked'
Current element : '52^NUMBER1'
Path from message root : '/msg_TestPacked'
Offset from start of message : 16
See following errors for more details.
2004-06-17 18:02:15.243655 2492 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : 'packed decimal, no sign found '
Data : '0x00000000127f'
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 message model is correct. Review previous messages for details of the message set and message type.
Check that the processed message is of the expected format and type.
2004-06-17 18:02:16.266477 2492 UserTrace BIP2631I: Backed out message being propagated to failure terminal; node 'MSGFLOW_TESTPACKED.MQInput'.
Node 'MSGFLOW_TESTPACKED.MQInput' has received a message which has previously been backed out because of a processing error in the message flow. The MQMD 'backoutCount' of the message exceeds (or equals) the 'backoutThreshold' defined for the WebSphere Business Integration input queue. The message broker is propagating the message to the failure terminal of the node.
Examine the other messages and the message flow to determine why the message is being backed out. Correct this situation if possible. Perform any local error recovery processing required.
2004-06-17 18:02:16.267202 2492 UserTrace BIP6060I: Parser type 'Properties' created on behalf of node 'MSGFLOW_TESTPACKED.MQInput' to handle portion of incoming message of length 0 bytes beginning at offset '0'.
2004-06-17 18:02:16.267503 2492 UserTrace BIP6061I: Parser type 'MQMD' created on behalf of node 'MSGFLOW_TESTPACKED.MQInput' to handle portion of incoming message of length '364' bytes beginning at offset '0'. Parser type selected based on value 'MQHMD' from previous parser.
2004-06-17 18:02:16.267831 2492 UserTrace BIP6061I: Parser type 'MRM' created on behalf of node 'MSGFLOW_TESTPACKED.MQInput' to handle portion of incoming message of length '32' bytes beginning at offset '364'. Parser type selected based on value 'MRM' from previous parser.
2004-06-17 18:02:25.527069 2492 UserTrace BIP2638I: The MQ output node 'MSGFLOW_TESTPACKED.MQOutput1' attempted to write a message to queue 'HHARDBKRK.QL.ERROR' connected to queue manager ''. The MQCC was '0' and the MQRC was '0'.
The cobol copy book I am using to create the message definition file is:
01 TestPacked.
03 ALPHA PIC X(10).
03 NUMBER1 PIC S9(10) COMP-3.
03 NUMBER2 PIC S9(8)V9(2) COMP-3.
03 NUMBER3 PIC S9(8)V9(2).
The definitions for the fields in the message definition are:
1. ALPHA - Fixed Length String - Length Count 10 Bytes
2. NUMBER1 - Packed Decimal - Length Count 6 Bytes
3. NUMBER2 - Packed Decimal - Length Count 6 Bytes
4. NUMBER3 - External Decimal - Length Count 10 Bytes
There are really two problems here:
1. WMQ does not convert the packed decimals properly since the standard conversion exit for MQSTR only handles character data (PLease correct me if I am wrong in this thinking)
2. How do I get WBIMB to read this message. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jun 18, 2004 5:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
First off, you shouldn't be pushing data that has packed decimals in it through a WMQ data conversion. Trust in the broker, in this case, to handle that for you.
The broker will identify the pieces of the incoming bitstream (still in EBCDIC!) as the correct fields based on the MRM. THEN it will convert each individual field into an internal representation (Unicode for character data, ESQL data types for non character data - usually) again based on the model.
Secondly, what the parser is complaining about is that it can't find a sign on the packed decimal field. This could be because you've converted the data... or it could be because there isn't a sign on the data.
If it's the second, you can adjust the model or adjust your app to handle this, as appropriate. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
SSachdeva |
Posted: Fri Jun 18, 2004 7:27 am Post subject: |
|
|
Apprentice
Joined: 04 Apr 2002 Posts: 33
|
Jeff,
If I do not do the conversion on the channel and simply allow WBIMB to pick the message up - How do I tell WBIMB that the message coming in is in EBCDIC - Should I do a get with convert (Isnt that the same thing as doing a conversion on the channel) - Or do I mention in the storage layout section of the WBIMB Message Definiton that the message is EBCDIC and Big Endian? Thanks for the quick response - your help is gratly appreciated.
Thanks again,
Shamsher |
|
Back to top |
|
 |
EddieA |
Posted: Fri Jun 18, 2004 9:12 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
WMQI will look at the CCSID and Encoding in the MQMD to see what the incoming data is.
Trust us. It works the way it's been descibed.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
SSachdeva |
Posted: Fri Jun 18, 2004 9:26 am Post subject: |
|
|
Apprentice
Joined: 04 Apr 2002 Posts: 33
|
Thanks for all your help guys - it works as you guys said. I dont convert the message in WMQ and simply let the message go to WBIMB. WBIMB picks up the mssage and parses it fine now.
Thanks again for all your help.
Shammy |
|
Back to top |
|
 |
|