IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting error IGYPA3043 - while compiling


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Tue Sep 25, 2007 1:25 am
Reply with quote

Hi,
I am getting the follo error while compiling a non-db2 cobol program.
Code:
582  IGYPA3043-E   Data-item "MERGED-FILE-RECORD (GROUP)" and record "MERGED-FILE-RECORD (GROUP)" had overlapping storage.
         Movement of data may not occur at execution time.


My definitions in the program:
Code:
FILE-CONTROL.                                               
    SELECT MERGE-INP-FILE     ASSIGN TO FWB750I1             
                               ORGANIZATION IS INDEXED       
                               ACCESS IS SEQUENTIAL         
                               RECORD KEY IS MERGE-KEY       
                               FILE STATUS IS CURRENT-STATUS.
------
------
Code:
DATA DIVISION.                           
FILE SECTION.                           
FD  MERGE-INP-FILE                       
    LABEL RECORDS ARE STANDARD.         
01  MERGED-FILE-RECORD.                 
    05 MERGE-KEY.                       
       10  MERGED-FILE-KEY-MOST.

----
----
----

Code:
PROCEDURE DIVISION.
READ MERGE-INP-FILE               
     AT END                       
     MOVE 'Y'   TO  EOF-ON-MERGE. 

I am getting the error while reading.

My compiler version is
Code:
IBM Enterprise COBOL for z/OS  3.4.1


Any pointers will be of great help.
Thanks,
Viji
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 25, 2007 2:41 am
Reply with quote

Hello,

You will probably need to post more of your code for us to help.

Quote:
I am getting the error while reading
Are you saying that the compile raises an error on the READ statement?

Your problem is most likely in the definitions within the MERGE-INP-FILE.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Tue Sep 25, 2007 5:23 am
Reply with quote

Please provide where Data-item "MERGED-FILE-RECORD (GROUP)" and record "MERGED-FILE-RECORD (GROUP)" are defined?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Sep 25, 2007 6:12 am
Reply with quote

CICS Guy wrote:
Please provide where Data-item "MERGED-FILE-RECORD (GROUP)" and record "MERGED-FILE-RECORD (GROUP)" are defined?
He actually did in his first post. More than likely there is a MOVE MERGED-FILE-RECORD TO MERGED-FILE-RECORD, a READ INTO, or a WRITE FROM statement somewhere in the program. Have you looked at line 582 in the compile listing?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 25, 2007 8:16 am
Reply with quote

Was kinda hoping that it would be posted. . . .

We'll see. . .
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Tue Sep 25, 2007 8:02 pm
Reply with quote

Hi All,
thanks for all the replies..I got the problem solved.
I moved the entire 01 MERGED-FILE-RECORD to a Working-storage section and replaced the FD as shown below

Code:
FILE SECTION.                     
FD  MERGE-INP-FILE               
    LABEL RECORDS ARE STANDARD.   
01  FD-MRGE-RECORD.               
    05 FD-MERGE-KEY  PIC   X(18).
    05 FILLER        PIC   X(133).


Later I moved FD-MRGE-RECORD to MERGED-FILE-RECORD

Previously I had the following set of variables under FD section.
Code:
01  MERGED-FILE-RECORD.                                 
    05 MERGE-KEY.                                       
       10  MERGED-FILE-KEY-MOST.                         
          15  MERGED-ACCT.                               
              20  MERGED-OFFICE-NBR  PICTURE X(03).     
              20  MERGED-ACCT-NBR    PICTURE X(05).     
          15  MERGED-SEC-NBR         PICTURE X(05).     
          15  MERGED-TRANS-DATE      PICTURE X(03).     
       10  MERGED-SEQ-NBR            PICTURE S9(04) COMP.
    05 MERGED-FILE-FILL.                                 
   07 FILLER                     PICTURE X(97).       
   07 MERGED-FILE-EXP-PX-IND     PICTURE X(01).       
   07 MERGED-FILE-EXP-PX.                             
      09 FILLER                  PICTURE X(07).       
      09 MERGED-FILE-EXP-PX-8    PICTURE S9    COMP-3.
  07 MERGED-FILE-REORG          PICTURE X(001).
  07 FILLER                     PICTURE X(026).


I still did not know why it didn't work, but I had to move on bse of my schedule. I would be glad if someone can identify.

Thanks,
Viji
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 25, 2007 8:23 pm
Reply with quote

Hello,

Quote:
Later I moved FD-MRGE-RECORD to MERGED-FILE-RECORD
This was most likely your problem. Both of these were level 01 entries in the same FD. You were moving the data to "itself".

When you moved the definition to WS, you corrected the error.

Why did you try to move from one dataname to the other when they were both representations of the exact same data?
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Wed Sep 26, 2007 2:51 am
Reply with quote

Hi,
I am sorry if I didn't explain it clearly.
My initial code :
1) MERGED-FILE-RECORD as 01 in FD. and I read the file.
no other moves.

Modified code:
1) Moved MERGED-FILE-RECORD to Working storage.
2) Added FD-MRGE-RECORD in FD section and read the file
3) Move FD-MRGE-RECORD to MERGED-FILE-RECORD for further use in the program.

I am not sure what I did wrong and what I did right in the modified code!!
Thanks,
Viji
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 2:57 am
Reply with quote

vijikesavan wrote:
I am not sure what I did wrong and what I did right in the modified code!!
Duplicate names are ok with COBOL, but to reference one of them you need a higher level of name in order to say duplicate-name OF unique-higher-level-name.....
Since 01 levels are the highest level of naming, two 01s with the same name are not allowed in one program....
Do you need a link th the COBOL manual on that section?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Sep 26, 2007 3:00 am
Reply with quote

Hi Viji,

Well, the good news is that it is working icon_smile.gif

Quote:
I am not sure what I did wrong and what I did right in the modified code!!
When the error was raised, the compiler was "confused/concerned" by something and your change(s) removed the confusion/concern.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top