|
|
| Author |
Message |
Pons
New User
Joined: 25 May 2007 Posts: 32 Location: Coimbatore
|
|
|
|
I got an compilation error saying that,
FD FILE1-DATA
RECORDING MODE F
BLOCK CONTAINS 0 RECORDS.
01 S1-FILE1-DATA PIC X(400).
01 WS-USING-FILE1 REDEFINES S1-FILE1-DATA.
.lots of 05 variables
.
.
.
A "REDEFINES" clause was found in the definition of a level-01 item in the "FILE SECTION" discarded.
But it is possble in Working storage section. Why its not accept in FD Section? |
|
| Back to top |
|
 |
References
|
Posted: Thu May 08, 2008 11:14 am Post subject: Re: Can we redefine the 01 level varialbels in FD Section |
 |
|
|
 |
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 169 Location: Bangalore
|
|
|
|
as per my knowledge, REDEFINES is not allowed at 01 level in the FILE-SECTION.
we can use it at some other levels provided the length should be less or equal to the original variable. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7518 Location: 221 B Baker St
|
|
|
|
Hello,
Multiple level 01s in an FD are redefined. You may not code REDEFINES. Look at your compile output and you will see that all of the 01s for an FD start at the same address. |
|
| Back to top |
|
 |
Pons
New User
Joined: 25 May 2007 Posts: 32 Location: Coimbatore
|
|
|
|
| How to see the address in the compile output... |
|
| Back to top |
|
 |
dbzTHEdinosauer
Senior Member
Joined: 20 Oct 2006 Posts: 1395 Location: germany
|
|
|
|
open you eyes and look at the compile output.
helps if you have map or object as a compile parm.
if you don't know what that is, look at any cobol manual under how to compile and parms.
while you are in this manual (first time?) take a gander at the sections describing how a coder/programmer build the file section. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7518 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
How to see the address in the compile output...
|
Scroll to the right of the 01 - displacements/addresses are usually shown there. |
|
| Back to top |
|
 |
|
|