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

Diff between implicit and explicit redefine.


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

New User


Joined: 10 May 2005
Posts: 28
Location: Pune

PostPosted: Mon Jan 30, 2006 10:59 pm
Reply with quote

Hi,

One of my interviewer at IBM was asked about implicit redefine and explicit redefine and difference between them. Anyone can explain it

Thanks
Back to top
View user's profile Send private message
senthils

Active User


Joined: 15 Nov 2005
Posts: 117
Location: Chennai, India

PostPosted: Tue Jan 31, 2006 3:18 pm
Reply with quote

Explicit redefines is the one which you give in the Working-Storage section.
ex: 05 WS-TO-DATE1 REDEFINES WS-TO-DATE

Implicit redefines is the one which comes into effect in FILE section FD. If the FD of a file contains more than one 01 level number, the second 01 level variable redefines the first 01 level variable.

ex:
FD SAMPLE-FILE.
01 SAMPLE-REC1.
02 FILLER PIC X(80).

01 SAMPLE-REC2.
02 FILLER PIC X(70).

In the above example SAMPLE-REC1 and SAMPLE-REC2 share the same memory location even though we are not doing any REDEFINES. So it is called Implicit Redefines.
Back to top
View user's profile Send private message
vinodmaanju

New User


Joined: 10 May 2005
Posts: 28
Location: Pune

PostPosted: Tue Jan 31, 2006 8:07 pm
Reply with quote

Thanks Mr. senthils
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 Sort on different fields, removing du... SYNCSORT 8
No new posts How syntax check at Bind time is diff... DB2 5
No new posts Easytrive Redefine CA Products 4
No new posts Redefine SYS1.PROCLIB JCL & VSAM 12
No new posts Compare PD Values with same storage &... JCL & VSAM 5
Search our Forums:

Back to Top