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

Problem using the same copybook twice in the pgm


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

New User


Joined: 15 Nov 2010
Posts: 2
Location: Pune

PostPosted: Mon Nov 15, 2010 10:56 am
Reply with quote

Hi,

I have 2 input file and a output file and all uses same copybook.There is a field ABC which is of length 10 and I need last 5 characters of it from both the input file.So,The move statement I used is :
Move ABC(5:5) OF IP1 TO WS-IP1-ABC
Move ABC(5:5) OF IP2 TO WS-IP2-ABC

But on compiling its giving error saying the field ABC is not a uniquely defined field.

Would anyone help me out to sort out this error.Please
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: Mon Nov 15, 2010 11:38 am
Reply with quote

Hello and welcome to the forum,

When you have a question, start a new topic for your question and post in the appropriate part of the forum rather than posting a reply to some unrelated questino. . .

This question does not sound like an interview question and is really not about reference modification. . .

The compiler error is because you have used a duplicate field name and not qualified it.
Back to top
View user's profile Send private message
nehajain55

New User


Joined: 15 Nov 2010
Posts: 2
Location: Pune

PostPosted: Mon Nov 15, 2010 11:44 am
Reply with quote

Thnx for reply but that was actually a reference modification query and I got the answer :
The statement should be:
Move ABC OF IP1(5:5) TO WS-IP1-ABC
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 15, 2010 1:02 pm
Reply with quote

Quote:
But on compiling its giving error saying the field ABC is not a uniquely defined field.


the message You received is NOT related to reference modification!
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: Mon Nov 15, 2010 8:40 pm
Reply with quote

Hello,

Quote:
Thnx for reply but that was actually a reference modification query and I got the answer
Sorry, but just because you used reference modification does not make the question/problem a reference modification issue. . .

As i mentioned originally,
Quote:
The compiler error is because you have used a duplicate field name and not qualified it.


If you really, really believe the problem was due to something other than proper qualification, i suspect there will be many times when you get "stuck". . .
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Trying to change copybook in online c... CICS 4
No new posts Help to Filter File Manager Copybook ... DFSORT/ICETOOL 14
No new posts z/vm installation problem All Other Mainframe Topics 0
Search our Forums:

Back to Top