|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Missing Repeat sections on output |
« View previous topic :: View next topic » |
Author |
Message
|
p.cradwick |
Posted: Sun Apr 29, 2007 9:32 pm Post subject: Missing Repeat sections on output |
|
|
Acolyte
Joined: 16 May 2001 Posts: 56
|
I am using Broker v6.0.2 on XP and am having problems with a repeating group. The msg set is created from a copybook:
=====> 05 WO-RESPONSE-DATA.
=====> 10 WO-R001-ARGN-ID PIC X(32).
=====> 10 WO-R001-FUND-NAME PIC X(50).
=====> 10 WO-R001-OPEN-BAL-AMT PIC X(1 .
=====> 10 WO-R001-OPEN-BAL-DATE PIC X( .
=====> 10 WO-R001-OPEN-TOT-UNITS PIC X(13).
=====> 10 WO-R001-OPEN-UNIT-PR PIC X(10).
=====> 10 WO-R001-NUM-OF-TXN PIC 9(4).
=====> 10 WO-R001-DETAILS OCCURS 7000 TIMES.
=====> 15 WO-R001-TXN-DATE PIC X( .
=====> 15 WO-R001-TXN-TIME PIC X( .
=====> 15 WO-R001-TXN-DESC PIC X(60).
=====> 15 WO-R001-TXN-DRCR PIC X(2).
=====> 15 WO-R001-TXN-UNIT PIC X(13).
=====> 15 WO-R001-TXN-UNIT-PR PIC X(10).
=====> 15 WO-R001-TXN-AMOUNT PIC X(1 .
=====> 15 WO-R001-TXN-UNIT-RB PIC X(15).
=====> 15 WO-R001-TXN-AMT-RB PIC X(1 .
=====> 15 WO-R001-TXN-INDICATOR PIC X(1).
=====> 10 WO-R001-CLOS-BAL-AMT PIC X(1 .
=====> 10 WO-R001-CLOS-BAL-DATE PIC X( .
=====> 10 WO-R001-CLOS-TOT-UNITS PIC X(13).
=====> 10 WO-R001-CLOS-UNIT-PR PIC X(10).
=====> 05 FILLER PIC X(64).
And appears as:
(Screen shots didn't transfer..)
In the msg set, min and max for WO_R001_DETAILS appears as 7000. The only changes I made to the message set was to change the Min/Max of the DETAILS Type to 0/7000 and set the Repeat Reference for the DETAILS to WO-R001-NUM-OF-TXN. The output msg appears to be created successfully - no errors in the trace and it appears correct in the debugger – there should be 14 DETAILS sections:
But when I transform this to a BLOB to count the bytes, it returns 335 bytes which is exactly right EXCLUDING the 14 DETAILS sections, and when the msg is output to a queue, ALL the DETAILS sections are missing!! i.e. only 335 bytes are output.
Here is part of a trace to show the details aren’t blank:
(0x01000013):WO_RESPONSE_DATA = (
(0x0300000B):WO_R001_ARGN_ID = '589343'
(0x0300000B):WO_R001_FUND_NAME = 'Growth Trust'
(0x0300000B):WO_R001_OPEN_BAL_AMT = '823.97'
(0x0300000B):WO_R001_OPEN_BAL_DATE = '20070101'
(0x0300000B):WO_R001_OPEN_TOT_UNITS = '616.560600'
(0x0300000B):WO_R001_OPEN_UNIT_PR = '1.336400'
(0x0300000B):WO_R001_NUM_OF_TXN = 14
(0x01000013):WO_R001_DETAILS = (
(0x0300000B):WO_R001_TXN_DATE = '20070103'
(0x0300000B):WO_R001_TXN_DESC = 'Regular application'
(0x0300000B):WO_R001_TXN_DRCR = '1'
(0x0300000B):WO_R001_TXN_UNIT = '18.674800'
(0x0300000B):WO_R001_TXN_UNIT_PR = '1.338700'
etc – all 14 details are shown correctly.
Anyone have any idea why the DETAILS don’t seem to be recognised when the message is "realised"? I have put a compute node following the MQOutput and the msg still appears complete as above in the debugger.
Here is the code I am using to get the data length and which returns 335! – instead of over 2000! i.e. the details are ignored…
DECLARE options INTEGER BITOR(RootBitStream, ValidateNone);
DECLARE outBlob BLOB;
SET outBlob = ASBITSTREAM(outRef
OPTIONS options
ENCODING 546
CCSID 819
SET 'IOLBTransactionDetailsResponse-MsgSet'
TYPE 'msg_WRESPONSEMESSAGE'
FORMAT 'CWF1'
);
DECLARE lenData INTEGER LENGTH(outBlob);
Any help appreciated!
Peter |
|
Back to top |
|
 |
Bill.Matthews |
Posted: Mon Apr 30, 2007 5:01 am Post subject: Re: Missing Repeat sections on output |
|
|
 Master
Joined: 23 Sep 2003 Posts: 232 Location: IBM (Retired)
|
p.cradwick wrote: |
.....
=====> 10 WO-R001-NUM-OF-TXN PIC 9(4).
=====> 10 WO-R001-DETAILS OCCURS 7000 TIMES.
=====> 15 WO-R001-TXN-DATE PIC X( .
!
Peter |
You need an OCCURS DEPENGING ON clause.. _________________ Bill Matthews |
|
Back to top |
|
 |
kimbert |
Posted: Mon Apr 30, 2007 7:39 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
p.craadwick is setting the repeat reference manually:
Quote: |
The only changes I made to the message set was to change the Min/Max of the DETAILS Type to 0/7000 and set the Repeat Reference for the DETAILS to WO-R001-NUM-OF-TXN |
|
|
Back to top |
|
 |
p.cradwick |
Posted: Mon Apr 30, 2007 1:35 pm Post subject: |
|
|
Acolyte
Joined: 16 May 2001 Posts: 56
|
Thanks for the responses. Being a COBOL dummy, I got the mainframe folk to change the copybook to:
=====> 10 WO-R001-NUM-OF-TXN PIC 9(4).
=====> 10 WO-R001-DETAILS OCCURS 0 TO 7000 TIMES
=====> DEPENDING ON WO-R001-NUM-OF-TXN.
and it all worked fine with NO manual intervention.
Thanks again
Peter |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|