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
 
Same variable name without qualifier

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
amalli

New User


Joined: 06 Sep 2005
Posts: 17

PostPosted: Fri Sep 16, 2005 3:35 pm    Post subject: Same variable name without qualifier
Reply with quote

hi

01 a
02 num1 pic 9 value 1.
01 b
02 num1 pic 9 value 2.

display num1?

what is num1 value 1 or 2 or Any error?

thanks
malli
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Fri Sep 16, 2005 6:18 pm    Post subject: Re: cobol logic
Reply with quote

Hi,

Quote:
hi

01 a
02 num1 pic 9 value 1.
01 b
02 num1 pic 9 value 2.

display num1?

what is num1 value 1 or 2 or Any error?



It will give error.

Code:
"NUM1" was not a uniquely defined name.


Regards
Rupesh
Back to top
View user's profile Send private message
cheli

New User


Joined: 21 Jul 2005
Posts: 11

PostPosted: Sat Sep 17, 2005 11:05 am    Post subject: Re: cobol logic
Reply with quote

U r absolutely correct.
Back to top
View user's profile Send private message
Renuvaidy

New User


Joined: 17 Sep 2005
Posts: 14
Location: Singapore

PostPosted: Sat Sep 17, 2005 3:25 pm    Post subject:
Reply with quote

it will give error.

with luv,
renu
Back to top
View user's profile Send private message
cheli

New User


Joined: 21 Jul 2005
Posts: 11

PostPosted: Sat Sep 17, 2005 5:58 pm    Post subject: Re: cobol logic
Reply with quote

It will give compilation error,saying that it was not a uniquely defined name.
Back to top
View user's profile Send private message
Umesh Kumar

New User


Joined: 06 Jul 2005
Posts: 2
Location: NOIDA (INDIA)

PostPosted: Tue Sep 20, 2005 5:29 pm    Post subject:
Reply with quote

You will have to use qualified data names such as:

DISPLAY NUM1 OF A.
Output: 1
OR

DISPLAY NUM1 OF B.
Output: 2

Regards,
Umesh
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm

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