Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Diff between logical eof and physical eof

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 2:39 pm    Post subject: Diff between logical eof and physical eof
Reply with quote

Hi all,
can u tell me what is the difference between logical end of file and physical
end of file? icon_biggrin.gif
Back to top
View user's profile Send private message

balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Tue Sep 11, 2007 2:49 pm    Post subject:
Reply with quote

hi purnendu,

A Logical File is just an index over a file. The Logical File does not contain the actual data. The Logical File only references the data in the Physical file. The best way to think of an Logical File, it contains the key and a pointer to the corresponding record in the physical file.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 2:59 pm    Post subject:
Reply with quote

Hey whiz kid, learn to read, logical vs physical EOF........

My guess would be the case of reaching a point in the file where you know that there are no more records that apply....
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 3:13 pm    Post subject:
Reply with quote

hi cics guy,

can you say more specifically the answer of the question i asked?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 3:34 pm    Post subject:
Reply with quote

Purnendu.it wrote:
can you say more specifically the answer of the question i asked?
Can you more specifically ask the question?
In what context are you refering to logical vs physical EOF?
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Tue Sep 11, 2007 3:50 pm    Post subject:
Reply with quote

Hi,

i mean to say how can we differentiate between a logical end of file
to a physical eof in cobol.let us take in that way in a same file
how can we differentiate a logical eof to a phsysical eof?am i clear this time?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Sep 11, 2007 4:02 pm    Post subject:
Reply with quote

Clear? Not really.....

To me, physical is where the media declares EOF and logical is where you declare EOF....
For instance, a customer file alphabetically sorted by last name, a report of all customers vs a report of customers whose name begins with the letter "F".....
The first would read to physical EOF while the second would "declare" logical EOF when a customer whose name begins with a letter greater than "F" is read.....
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Sep 11, 2007 7:42 pm    Post subject:
Reply with quote

Hi,

This post might help further.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 8:19 pm    Post subject:
Reply with quote

Hello,

Quote:
can u tell me what is the difference between logical end of file and physical end of file?

Let's say you have a sequential file. Let's also say that it will be read by a COBOL program. When a READ raises the AT END condition, the process has reached both the logical and physical end-of-file.

If this not what you are looking for, please clarify what you are looking for.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Wed Sep 12, 2007 11:14 am    Post subject:
Reply with quote

hi Dick,

Quote:
When a READ raises the AT END condition, the process has reached both the logical and physical end-of-file.


suppose while declaring file i have declared the a large no. of space for
the file in 3.2 option.let us say its 20000 kb .But while inserting record
i have inserted only few records say 3 records.
Now logical end of file will be at third record.But physically this file
can have more data than that.because its space is too large.So in this
case also both eof will be the same.if it is?what about the all spaces.I thought physically file should be very large than to holding only three
records.Am i clear?please let me know and clear my doubts.


thanks
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Sep 12, 2007 1:35 pm    Post subject:
Reply with quote

Hi,

For this
Purnendu.it wrote:
let us say its 20000 kb .But while inserting record
i have inserted only few records say 3 records.

You wanted to say (perhaps), one record is of 1 KB & there are only 3 records in file while file's DCB says it can contain 20,000 records. If so Dick's explanation if fair enough
Quote:
Let's say you have a sequential file. Let's also say that it will be read by a COBOL program. When a READ raises the AT END condition, the process has reached both the logical and physical end-of-file.

Further
Purnendu.it wrote:
Now logical end of file will be at third record.

Here your records ends..& if they exist ..they also exists physically, so this
Quote:
But physically this file can have more data than that. because its space is too large. So in this case also both eof will be the same.if it is?

Yes, both will happen at the same time. READ verb is intelligent enough to understand that is no more record is there in the file so stop furher reading.

The word 'physical' comes into the picture only when you are talking about the DASD/TAPE usage, for READ verb point of view physical or logical EOF, per your example, are same.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Wed Sep 12, 2007 2:27 pm    Post subject:
Reply with quote

HI dick and Anuj,


Thanks for the explanation.But then it means that there is no difference
between logical and physical end of file.
Quote:
Let's say you have a sequential file. Let's also say that it will be read by a COBOL program. When a READ raises the AT END condition, the process has reached both the logical and physical end-of-file.
icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Sep 12, 2007 4:02 pm    Post subject:
Reply with quote

Hi,

If you'll provide the definitions of 'Logical EOF' & "Physical EOF" from your poinr of view, may be some one here be able to explain more better.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 12, 2007 6:28 pm    Post subject:
Reply with quote

Hello,

Quote:
But then it means that there is no difference
between logical and physical end of file


Yes. In your cobol program, you will not be able to tell one from the other when you open the file sequentially and read from it. AT END is the end and you will not know if there is wasted (unused) space in the file allocation. Of course, there is no need to know this inside the program.
Back to top
View user's profile Send private message
Purnendu.it

New User


Joined: 11 May 2007
Posts: 59
Location: chennai

PostPosted: Mon Sep 17, 2007 6:44 pm    Post subject:
Reply with quote

HI dick,
Thanks for the explanation.I suppose the exact answer should be
there is no difference bet both if we consider it from programming(Let say
Cobol) point of view.So on what aspect we can have differences
between these two.I guess there must have been some difference
on some aspects.I hope you got my question.


Thanks in advance.

I guess i am making that discussion a little more complex by going
too much inside it.If it is like that then sorry in advance.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Sep 17, 2007 7:22 pm    Post subject:
Reply with quote

Hello,

Quote:
I guess i am making that discussion a little more complex by going
too much inside it.If it is like that then sorry in advance.
Not to worry icon_smile.gif It is good to learn these things.

Quote:
I guess there must have been some difference
on some aspects
One difference can be wasted space. If your data will need 10 tracks and the allocation is 100 cyls, everything will run fine, but almost all of the 100 cyls is wasted. When you program reads the EOF after 10 tracks it will raise the AT END and the other space will not be referenced.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts creating a physical sequential file i... Shaheen Shaik JCL & VSAM 8 Wed Jun 29, 2016 3:46 pm
No new posts FileAid to compare(logical operations... anand1204 Compuware & Other Tools 3 Wed Apr 06, 2016 2:55 am
No new posts Compare PD Values with same storage &... Shrinika Rajendran JCL & VSAM 5 Wed Nov 05, 2014 3:17 pm
No new posts Logical Processors vasanthz All Other Mainframe Topics 4 Mon Sep 08, 2014 11:49 pm
No new posts DD name access using multiple logical... chandraBE COBOL Programming 1 Wed Apr 30, 2014 2:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us