ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » COBOL OCCURS DEPENDING ON BUG!!

Post new topic  Reply to topic
 COBOL OCCURS DEPENDING ON BUG!! « View previous topic :: View next topic » 
Author Message
pfaulkner
PostPosted: Wed Jan 08, 2003 3:12 pm    Post subject: COBOL OCCURS DEPENDING ON BUG!! Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

Hi,

I imported the following cobol copybook:

01 EE580-RESPONSE.
10 EE580RESP-HEADER.
15 EE580RESP-ACCOUNT-NUMBER PIC X(0.
15 EE580RESP-RETURN-CODE PIC 9(0.
15 EE580RESP-INVOICE-TEXT-LEN PIC 9(07).
10 EE580RESP-INVOICE-TEXT.
15 EE580RESP-INVOICE-TEXT-CHAR PIC X(01)
OCCURS 1 TO 32000
DEPENDING ON EE580RESP-INVOICE-TEXT-LEN.

As you can see the Value of the OCCUR DEPENDING ON is the previous field before EE580RESP-INVOICE-TEXT-CHAR but there are 2 group fields between them.

In the Message Set, after import this copybook the CONNECTION TAB is defined correctly with min=1 max=32000. The CWF tab has REPEAT COUNT TYPE set to Value OF BUT the 'REPEAT COUNT VALUE OF' field is greyed out and I CANNOT change it.

If I move the EE580RESP-INVOICE-TEXT-LEN directly before EE580RESP-INVOICE-TEXT-CHAR then it unprotects the 'REPEAT COUNT VALUE OF' field and allows me to enter the value of EE580RESP-INVOICE-TEXT-LEN.

In most cases this wouldn't be an issue, but in this case I would like to have a group field inbetween so that I can reference the group of bytes directly.

Does anyone know if this bug has been resolved in CSD3? I am currently at CSD2.

Appreciate any help, thanks

Paul
Back to top
View user's profile Send private message AIM Address
afjt
PostPosted: Mon May 19, 2003 4:41 am    Post subject: Reply with quote

Newbie

Joined: 16 May 2003
Posts: 6
Location: Crewe, Cheshire, UK

WMQI newbie here.

I've also got the same problem.
A message is written from OS/390 (mainframe) as a cobol layout, and is processed by WMQI.
The copycode (simplified slightly here for convenience) looks like.
01 SCHEDULE.
03 BS-LINE.
05 RECORD-TYPE-BS PIC X(2).
05 TRANSACTION-TYPE PIC X(1).
05 CIF-TRAIN-UID PIC X(6).
03 ONE-V-LINE.
05 RECORD-TYPE-1V PIC X(2).
05 LI-COUNT PIC 9(3) USAGE DISPLAY.
05 TOPS-D1266-BASE-RECORD-NUMBER PIC 9(5).
03 LO-LINE.
05 RECORD-TYPE-LO PIC X(2).
05 TIPLOC-ID-O PIC X(7).
03 LI-LINE OCCURS 0 TO 82 DEPENDING ON LI-COUNT.
05 RECORD-TYPE-LI PIC X(2).
05 TIPLOC-ID-I PIC X(7).
05 CIF-PERFORMANCE-ALLOWANCE-I PIC X(2).
03 LT-LINE.
05 RECORD-TYPE-LT PIC X(2).
05 TIPLOC-ID-T PIC X(7).
Whilst this LAYOUT is perfectly valid on the mainframe, it doesn't work when I import the copycode into WMQI - I get the symptoms described by pfaulkner.
Because the layout was only done this way for convenience at the mainframe end, it should be possible to move the LI-COUNT field so that it immediately precedes the LI-LINE repeat group. However, I would rather not do this if I can help it.
The question is: is this a bug in WMQI, or a feature ?
If I were build up the message within WMQI, rather than importing the copycode, would I then be able to have the LI-COUNT field in the place where it is now ? I'd also rather not do this, as there are a lot more individuals fields than I've listed in the simplified version above.

If there is no way round this bug, then I could have further problems with the next message layout I load into WMQI, as it actually has FOUR 'occurs depending on's. I had been intending to put the 4 counts at the start of the message, as the mainframe compiler objects to having the count field for second and subsequent repeat groups after a variable repeat group.
However, if WMQI insists that it must be immediately in front of the corresponding repeat group, then there seems to be no way round the problem.

Anyone got any thoughts ?
Back to top
View user's profile Send private message Send e-mail
migstr
PostPosted: Mon May 19, 2003 7:49 am    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2002
Posts: 34
Location: New York

Hello,
I am at Win2k CSD03 and I have the same problem you describe. I had to change my copybooks DEPENDING on before importing to make it work.
As requested before, can someone out there say whether this is just the way it is, or is this a bug that has never been fixed?
Also, one comment for afjt, my DEPENDING on variables are not immediately before my OCCURS; as long as it is at the same level somewhere before it I got it to import and work correctly, for instance I moved your LI-COUNT. This has worked for me with a similar structure:
01 SCHEDULE.
03 LI-COUNT PIC 9(3) USAGE DISPLAY.
03 BS-LINE.
05 RECORD-TYPE-BS PIC X(2).
05 TRANSACTION-TYPE PIC X(1).
05 CIF-TRAIN-UID PIC X(6).
03 ONE-V-LINE.
05 RECORD-TYPE-1V PIC X(2).
05 TOPS-D1266-BASE-RECORD-NUMBER PIC 9(5).
03 LO-LINE.
05 RECORD-TYPE-LO PIC X(2).
05 TIPLOC-ID-O PIC X(7).
03 LI-LINE OCCURS 0 TO 82 DEPENDING ON LI-COUNT.
05 RECORD-TYPE-LI PIC X(2).
05 TIPLOC-ID-I PIC X(7).
05 CIF-PERFORMANCE-ALLOWANCE-I PIC X(2).
03 LT-LINE.
05 RECORD-TYPE-LT PIC X(2).
05 TIPLOC-ID-T PIC X(7).
_________________
Thanks, Margaret
-------------------------------------------------------
IBM Certified Specialist - MQSeries, Websphere MQ Integrator
IBM Certified Solutions Expert - MQSeries, Websphere MQ Integrator
IBM Certified Developer - MQSeries
Back to top
View user's profile Send private message
pfaulkner
PostPosted: Mon May 19, 2003 8:17 am    Post subject: Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

I also got around the problem by moving the occurs depending on to the same level as the occurs field. I've been lucky so far that I was able to do this without changing the order of the fields but it won't be long until I find a copybook that doesn't allow for this.

This has nothing to do with the import, you will get the same problem if you try to enter the message manually.

I think they should support any COBOL structure. Anyone know if they plan to change it?
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » COBOL OCCURS DEPENDING ON BUG!!
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.