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

Redefine Problem


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

New User


Joined: 15 Sep 2008
Posts: 5
Location: India

PostPosted: Tue Sep 16, 2008 11:39 am
Reply with quote

Hello,
could you please let me know the different scenarios for REDEFINES clause. Like what if
01 WS-TOP PIC X(1)
01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).

what happens when..
01 WS-TOP PIC 9(2)
01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).

01 WS-TOP PIC 9(1)
01 WS-TOP-RED REDEFINES WS-TOP PIC 9(2)

01 WS-TOP PIC X(2)
01 WS-TOP-RED REDEFINES WS-TOP PIC X(1).

01 A PIC X(1)
01 B REDEFINES A X(1).
01 C REDEFINES A X(1).

01 A PIC X(1)
01 B REDEFINES A X(1).
01 C REDEFINES B X(1).

Please let me know if u know any link from i can get more information.
and many other combinations....we are tried by you people...
Thanks in Advance
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Sep 16, 2008 11:49 am
Reply with quote

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/FINDBOOK?filter=COBOL

lists all the COBOL documentation. Pick your version.

depending on your version of COBOL, and compiler error settings, the redefining of a 1 byte field to 2, provides addressing, and when allowed by the compiler, will work - the next 01 is bounded based on the largest definition.
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top