Author |
Message
|
sapleav |
Posted: Sat Nov 15, 2008 7:22 pm Post subject: copybook message parsing problem |
|
|
Newbie
Joined: 15 Nov 2008 Posts: 6
|
Hello,
I am having problem with parsing a copybook message for which I created a message definition file.
The copybook looks as follows:
01 DIR-DEP-RECORD. 00010004
05 DIR-DEP-RECORD-TYPE PIC X. 00010104
88 FILE-HEADER VALUE '1'. 00010204
88 BATCH-HEADER VALUE '5'. 00010304
88 DETAIL-RECORD VALUE '6'. 00010404
88 BATCH-TRAILER VALUE '8'. 00010505
88 FILE-TRAILER VALUE '9'. 00010605
05 DD-FILE-HEADER. 00012005
10 DDFHR-ORIGIN-ID PIC X(10). 00030004
10 DDFHR-FILE-CREATE-DATE PIC 9(06). 00031004
10 DDFHR-FILE-CREATE-TIME PIC 9(04). 00032004
10 DDFHR-CO-NAME-LONG PIC X(23). 00040004
10 DDFHR-FILLER PIC X(56). 00073004
05 DD-BATCH-HEADER REDEFINES DD-FILE-HEADER. 00074205
10 DDBHR-CO-NAME-SHORT PIC X(16). 00074404
10 DDBHR-COMPANY-ID PIC X(10). 00074504
10 DDBHR-CO-ENTRY-DESC PIC X(10). 00074604
10 DDBHR-BATCH-SETLEMENT-DATE PIC 9(06). 00074704
10 DDBHR-BATCH-NUMBER PIC 9(07). 00074804
10 DDBHR-FILLER PIC X(50). 00074904
05 DD-DETAIL-RECORD REDEFINES DD-BATCH-HEADER. 00076005
10 DDDT-TRANSACTION-CODE PIC X(02). 00077005
10 DDDT-RECIEV-ROUT-NUM PIC 9(0 . 00077105
10 DDDT-RECIEV-ROUT-CHEK-DGT PIC 9(01). 00077205
10 DDDT-RECIEV-ACCT-NUM PIC X(17). 00077305
10 DDDT-DEPOSIT-AMOUNT PIC 9(08)V99. 00077404
10 DDDT-RECIEV-IDENT-INFO PIC X(15). 00077504
10 DDDT-RECIEV-ACCT-NAME PIC X(22). 00077604
10 DDDT-TRACE-NUMBER PIC 9(15). 00077704
10 DDDT-FILLER PIC X(9). 00077804
05 DD-BATCH-TRAILER REDEFINES DD-DETAIL-RECORD. 00078105
10 DDBTR-DETL-RECORD-CNT PIC 9(06). 00078204
10 DDBTR-HASH-ENTRY PIC 9(10). 00078304
10 DDBTR-DEBIT-AMOUNT PIC 9(10)V99. 00078404
10 DDBTR-CREDIT-AMOUNT PIC 9(10)V99. 00078504
10 DDBTR-SEND-ACCT-NUM PIC X(17). 00078604
10 DDBTR-FILLER PIC X(42). 00078904
05 DD-FILE-TRAILER REDEFINES DD-BATCH-TRAILER. 00079305
10 DDFTR-DETL-RECORD-CNT PIC 9(0 . 00079404
10 DDFTR-HASH-ENTRY PIC 9(10). 00079504
10 DDFTR-DEBIT-AMOUNT PIC 9(10)V99. 00079604
10 DDFTR-CREDIT-AMOUNT PIC 9(10)V99. 00079704
10 DDFTR-FILLER PIC X(57). 00079904
00090000
The message consists of three parts.Header Record,Detail Records,Trailer Record.Each record is of fixed length. There is only one Header Record(starts with 1), there are multiple detail records(starts with 5),and then one trailer record(starts with 9). I made a message definition file with the CWF fomat using the import from cobol file wizard, but the parsing fails when i put in a sample message. Any suggestions on the same would be greatly appreciated.
Thanks |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Nov 15, 2008 7:41 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
but the parsing fails |
What symptoms do you see? For example, when you display the message in the queue, is the data misaligned?
Is the MQGETting application encountering the problem?
Did the message traverse a network?
What platform was the message created on? Received on? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
sapleav |
Posted: Sat Nov 15, 2008 8:21 pm Post subject: |
|
|
Newbie
Joined: 15 Nov 2008 Posts: 6
|
Hello,
Thanks for looking in.
The message does not gets parsed at all, I created a sample input and output node and inserted a break point in between. I made the input node listen to a queue where i put a message which has 2 details records. on debugging the message, i just get the DIR-DEP-RECORD-TYPE for the first record (eg: 1) and then it throws the following exception.
ImbRecoverableException caught from worker->parseNext
When creating the message definition I had selected the CWF format and imported the coby book. Any suggestions would be great. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Nov 15, 2008 8:34 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
|
Back to top |
|
 |
sapleav |
Posted: Sat Nov 15, 2008 8:42 pm Post subject: |
|
|
Newbie
Joined: 15 Nov 2008 Posts: 6
|
ya, I had a look at his before, but isnt helpful. The primary problem here I am facing is that, somehow the message definition file that I created with the wizard isnt sufficient. Is there a way or some settings to be done in the mssage definition file, to differentiate the record type based on the first character of the record DIR-DEP-RECORD-TYPE. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Nov 15, 2008 9:12 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sapleav wrote: |
ya, I had a look at his before, but isnt helpful. The primary problem here I am facing is that, somehow the message definition file that I created with the wizard isnt sufficient. Is there a way or some settings to be done in the mssage definition file, to differentiate the record type based on the first character of the record DIR-DEP-RECORD-TYPE. |
I believe you'll have to go looking into using the TDS parser...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sapleav |
Posted: Sat Nov 15, 2008 9:24 pm Post subject: |
|
|
Newbie
Joined: 15 Nov 2008 Posts: 6
|
Hello,
Could you please elaborate on the TDS parser. I am sorry, I am new to MQ.
Should I select the message set of type TDS? and are there any additional settings I would need to do ?
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 16, 2008 1:32 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sapleav wrote: |
Hello,
Could you please elaborate on the TDS parser. I am sorry, I am new to MQ.
Should I select the message set of type TDS? and are there any additional settings I would need to do ?
Thanks |
Yes, use TDS in the message set.
You will need to identify each record by specifying where on the record the identifying field is. You might get lucky but I would suggest you get training on using this parser. Look at the samples.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sapleav |
Posted: Sun Nov 16, 2008 7:06 am Post subject: |
|
|
Newbie
Joined: 15 Nov 2008 Posts: 6
|
Thanks.
Where would be get samples for the same? |
|
Back to top |
|
 |
kimbert |
Posted: Sun Nov 16, 2008 1:19 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi sapleav,
TDS is not a parser. It is a one of three physical formats offered by the MRM parser. The other two are XML and CWF. Normally you would use CWF for data described by a COBOL copybook, but CWF does not support record identifiers.
That error message is only the first line of the last parsing exception. There were at least two others, and all of them provide much more info than that. Don't use the debugger for diagnosing parsing errors. Use User Trace and Trace nodes ( which are not the same thing ). If on Windows, you will get the full text of the parsing exceptions in the Application section of Windows Event Viewer.
You don't say which version of the runtime you are using. It could be significant here, because TDS has recently acquired the ability to parse binary data.
There are samples in the Samples Gallery for TDS, and you should read the product documentation here:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad00800_.htm
and here: http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad00810_.htm
When you have read the docs give TDS a try, and I can help you with any questions. |
|
Back to top |
|
 |
sapleav |
Posted: Sun Nov 16, 2008 1:23 pm Post subject: |
|
|
Newbie
Joined: 15 Nov 2008 Posts: 6
|
Hello Kimbert,
Thanks a lot for looking in. I am using broker 6.0. Let me have a look at the links that you sent over and will get back for any problems.
Thanks again |
|
Back to top |
|
 |
|