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

B Redefines A, C Redefines A


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gangas

New User


Joined: 20 Jul 2005
Posts: 14

PostPosted: Tue Jul 26, 2005 12:22 pm
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
No new posts Another redefines in COBOL COBOL Programming 1
No new posts Redefines clause in symbolic map MPC ... CICS 1
No new posts Redefines usage COBOL Programming 15
No new posts Rename & Redefines COBOL Programming 5
Search our Forums:

Back to Top