Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem using the same copybook twice in the pgm

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Reply to: What is Reference modification
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

Site Director


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

PostPosted: Mon Nov 15, 2010 11:38 am    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Mon Nov 15, 2010 1:02 pm    Post subject: Reply to: Problem using the same copybook twice in the pgm
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

Site Director


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

PostPosted: Mon Nov 15, 2010 8:40 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us