Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Redefine Problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
saurabhgemini10

New User


Joined: 15 Sep 2008
Posts: 5
Location: India

PostPosted: Tue Sep 16, 2008 11:39 am    Post subject: Redefine Problem
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
References
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1618
Location: germany

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

http://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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1