MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

COBOL: Same variables with different name

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
rnanavaty
Beginner


Joined: 12 Apr 2006
Posts: 29
Topics: 20

PostPosted: Thu Sep 13, 2007 8:57 am    Post subject: COBOL: Same variables with different name Reply with quote

Hi,

I have following 2 structures
Code:

01  SRL60LCA EXTERNAL.
    05  ADCON         OCCURS 215 USAGE IS POINTER.
    05  FILLER                   PIC X(4).

01  SRL60LMI EXTERNAL.
    05  ADCON         OCCURS 215 USAGE IS POINTER.
    05  FILLER                   PIC X(4).

When I am using statement
Code:

 SET ADCON(001) OF SRL60LCA TO ADDRESS OF LFPDCA01

It is giving me error as "ADCON is not uniqiely defined"

I don't know Why??
Back to top
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Thu Sep 13, 2007 9:13 am    Post subject: Reply with quote

rnanavaty,

Code:


  05 ADCON OCCURS 215 USAGE IS POINTER.

 


Should it not be

Code:


 05 ADCON OCCURS 215 TIMES USAGE IS POINTER.

 


I know I am missing something. Just curious.

Vivek G
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Sep 13, 2007 9:29 am    Post subject: Reply with quote

I don't have mainframe access, but try puting the (001) after SRL60LCA instead of ADCON.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Thu Sep 13, 2007 9:40 am    Post subject: Reply with quote

That's right Terry, I usuall forget where the FM and the subscripts go for a qualified dataname.....And that's the error I usually get.....grin.....
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Thu Sep 13, 2007 10:08 am    Post subject: Reply with quote

It's gotten me more than once, too. Smile
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group