View previous topic :: View next topic
|
Author |
Message |
mohnish
New User
Joined: 22 Sep 2006 Posts: 4
|
|
|
|
hi all...
what actually does multiple 01 levels in a FD entry of a file section signifies
...
i just learnt that the latter 01 level implicitly redefines the former 01 level....
in that case if the layout of both 01 levels are different but the total sum of fields is same...
then if we are trying to read the file ,in which 01 level it would be read....
i hope i made my question clear!! |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
When more than one level-01 entry is written subordinate to an FD entry, a condition known as implicit redefinition occurs. That is, the second level-01 entry implicitly redefines the storage allotted for the first entry. In such level-01 entries, the REDEFINES clause must not be specified. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Multiple 01 levels on input all get the data.
They can be of different lengths, that's one way to define variable length files.
On output, the 01 written defines the length of the output record. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi Mohnish
You can have any of the 01 levels for reading as per your requirement.Each one would fetch you data in different formats as defined in the FD section
Thanks
Arun |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If an existing file has multiple level 01s, each most likely has some kind of record identifier (i.e. REC-CODE or REC-TYPE). Once a record is read from the file the record identifier is checked so the program can execute the proper logic for "that" record.
Reading a record occurs on each read of the file - knowing how to process each format is up to the program.
If you create a file with different record layouts (01s in the FD), be sure to include a record type in the same position in each record. The field(s) the file is sequenced by are commonly the first field(s) in each record and the next byte or 2 the record type. |
|
Back to top |
|
|
|