Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10232
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 Strings with double quotes having pro... raja Arumugam IBM Tools 0 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us