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 » MRM/COBOL copybook: "Nested" Occurs Depending On?

Post new topic  Reply to topic
 MRM/COBOL copybook: "Nested" Occurs Depending On? « View previous topic :: View next topic » 
Author Message
Sandman
PostPosted: Fri Jan 31, 2003 12:01 pm    Post subject: MRM/COBOL copybook: "Nested" Occurs Depending On? Reply with quote

Centurion

Joined: 16 Oct 2001
Posts: 134
Location: Lincoln, RI

Hi folks,

Let's say we have a variable number of "records" in a message, and within each record there are many elementary fields, but also a few repeating fields.

It's been awhile since I compiled COBOL, but roughly... for example:

Code:
01 POLICIES.
     05 POL-CNT PIC 99.
     05 POLICY OCCURS 0 TO 10 DEPENDING ON POL-CNT.
          10 EFFECTIVE-DATE PIC X(10).
          10 BLAH-BLAH-BLAH PIC X.
           ...
          10 COVERAGES.
               20 COV-CNT PIC 999.
               20 COVERAGE OCCURS 0 TO 100 DEPENDING ON COV-CNT


I know the COBOL compiler will not let us have the COV-CNT variably located. However, there's also really no way to statically define this "child" count outside of the variable portion of this message because there's one of this counter for each POLICY.

How do some of you get around this - both in COBOL and WMQI?

Thanks,
Sandman
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Sat Feb 01, 2003 3:49 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Mike,
you should be able to import this structure into WMQI MRM.
_________________
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
View user's profile Send private message Visit poster's website
Sandman
PostPosted: Wed Feb 05, 2003 9:08 am    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2001
Posts: 134
Location: Lincoln, RI

Thanks Kirani. Unfortunately, it will not compile in COBOL!

Can you get it to compile?
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Wed Feb 05, 2003 10:03 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I remember one of our team member couldn't get it to compile, but after changing something in the layout he was able to compile the code. Could you post the exact layout of the copybook here, I'll see if he can help you.
_________________
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
View user's profile Send private message Visit poster's website
Sandman
PostPosted: Fri Feb 07, 2003 7:15 am    Post subject: Reply with quote

Centurion

Joined: 16 Oct 2001
Posts: 134
Location: Lincoln, RI

Thanks Kirani.

Code:
10 PP-RS-RESPONSE-INFO.                             
   15 PP-RS-POLICY-CNT              PIC 9(3).       
   15 PP-RS-POLICY-INFO             OCCURS 0 TO 1   
                                    DEPENDING ON     
                                    PP-RS-POLICY-CNT.
      20 PP-RS-POLICY-NO            PIC X(10).       
      20 PP-RS-ROLE-CNT             PIC 9(3).       
      20 PP-RS-ROLE-INFO            OCCURS 0 to 1   
                                    DEPENDING ON     
                                    PP-RS-ROLE-CNT. 
         25 PP-RS-ROLE-PARTY-ID     PIC X(30).       
         25 PP-RS-ROLE-PARTY-TYPE   PIC X(15).       
         25 PP-RS-ROLE-DESC         PIC X(30).       


Compiler errors:

IGYGR1263-S "OCCURS DEPENDING ON" OBJECT "PP-RS-ROLE-CNT" WAS DEFINED AS A TABLE-ELEMENT. THE "DEPENDING ON" PHRASE WAS DISCARDED.

IGYGR1116-S THE "DEPENDING ON" OBJECT FOR TABLE "PP-RS-ROLE-INFO" WAS INVALID. THE "DEPENDING ON" PHRASE WAS DISCARDED.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MRM/COBOL copybook: "Nested" Occurs Depending On?
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.