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

Same variable name without qualifier


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 463

PostPosted: Fri Sep 16, 2005 6:18 pm
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
Search our Forums:

Back to Top