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
 

 

B Redefines A, C Redefines A

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

New User


Joined: 20 Jul 2005
Posts: 15

PostPosted: Tue Jul 26, 2005 12:22 pm    Post subject: B Redefines A, C Redefines A
Reply with quote

hi
in redifines
1)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies b.
this will valid or not

2)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies a.
this will valid or not
Back to top
View user's profile Send private message

barobaybay

New User


Joined: 22 Jul 2005
Posts: 12
Location: Philippines

PostPosted: Tue Jul 26, 2005 1:19 pm    Post subject: Re: B Redefines A, C Redefines A
Reply with quote

gangas wrote:
hi
in redifines
1)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies b.
this will valid or not

2)
01 group-var
02 a pic 9(5).
02 b redifines a.
02 c redinies a.
this will valid or not


in the above statements, i believe #1 is valid instead of #2 which is not valid.
Back to top
View user's profile Send private message
lalita

New User


Joined: 03 Jul 2005
Posts: 8

PostPosted: Tue Jul 26, 2005 2:45 pm    Post subject:
Reply with quote

HI

i think both 1 & 2 are valid because in both redefine is made at the same levels.




lalita
Back to top
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Tue Jul 26, 2005 3:18 pm    Post subject:
Reply with quote

hi


IT IS VALID IN BOTH CASE REDDEFINE NO PROBLEM BUT IT WILL PROBLEM IN LOGICALY JUST USE PROPERLY.





THANOOZ
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Tue Jul 26, 2005 10:20 pm    Post subject:
Reply with quote

gangas,
1 will not work, 2 is the correct method

Code:
One or more redefinitions of the same storage area are permitted. The entries that give the new descriptions of the storage area must immediately follow the description of the redefined area without intervening entries that define new character positions. Multiple redefinitions must all use the data-name of the original entry that defined this storage area. For example:

 05  A               PICTURE 9999.
 05  B REDEFINES A   PICTURE 9V999.
 05  C REDEFINES A   PICTURE 99V99.
The redefining entry (identified by data-name-1) and any subordinate entries must not contain any VALUE clauses.



Also refer http://publib.boulder.ibm.com/infocenter/pdthelp/index.jsp?topic=/com.ibm.entcobol3.doc/tptbl21.htm
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 Another redefines in COBOL RahulG31 COBOL Programming 1 Fri Mar 20, 2015 4:09 am
No new posts Redefines clause in symbolic map MPC ... eprasad629 CICS 1 Sun Jan 15, 2012 12:18 am
No new posts Redefines usage nirmal.poikaikumaran COBOL Programming 15 Wed Mar 09, 2011 6:33 pm
No new posts Rename & Redefines srk.neeraj COBOL Programming 5 Mon Feb 14, 2011 6:06 pm
No new posts Defining REDEFINES cobol field in EZT rgupta71 CA Products 4 Mon Jan 31, 2011 9:30 pm


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