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

Can we use value clause in REDEFINE


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

New User


Joined: 13 Jun 2004
Posts: 85

PostPosted: Sun Jun 13, 2004 11:40 am
Reply with quote

hi friends,

can we use value clause in REDEFINE statment????

pls answer.
bye,
meetsrk
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Sun Jun 13, 2004 12:31 pm
Reply with quote

Redefining items should not have any VALUE clause. But Redefined item can have VALUE Clauses.

For example:

01 A PIC 9(4) VALUE 25.
01 B REDEFINES A PIC 9(2).

is Correct, but

01 A PIC 9(4) VALUE 25.
01 B REDEFINES A PIC 9(2) VALUE 12.

is wrong.

This is because, the second item doesn't have any memory, it uses the address of A.
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 To search DB2 table based on Conditio... DB2 1
No new posts NOT IN clause in COBOL pgm COBOL Programming 8
No new posts SUSBSCRIPT WITH SIGN IN PIC CLAUSE COBOL Programming 3
No new posts usage of CASE in WHERE clause DB2 10
No new posts Cobol redefines for Signed pictured c... COBOL Programming 4
Search our Forums:

Back to Top