MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do we know that sequential file has no records in cobol?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
neeja
Beginner


Joined: 26 Nov 2005
Posts: 1
Topics: 1

PostPosted: Sat Nov 26, 2005 6:26 am    Post subject: How do we know that sequential file has no records in cobol? Reply with quote

How do we know that sequential file has no records
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Nov 26, 2005 8:27 am    Post subject: Reply with quote

neeja,

Code:

1. Open the file
2. Read the file
3. Check for EOF condition.

Hope this helps...

Cheers

Kolusu

PS: Please do NOT create topics with titles like "cobol".
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mrar_160
Beginner


Joined: 07 Mar 2006
Posts: 4
Topics: 1

PostPosted: Tue Mar 07, 2006 9:39 pm    Post subject: Reply with quote

kolusu,
Can you give some example?
tq
Back to top
View user's profile Send private message
Ravi
Beginner


Joined: 27 Jun 2005
Posts: 88
Topics: 2

PostPosted: Wed Mar 08, 2006 12:50 am    Post subject: Reply with quote

neeja & mrar_160,

I would really appreciate if you can show the COBOL code to us.

Cheers
Back to top
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Wed Mar 08, 2006 9:39 am    Post subject: Reply with quote

mrar_160,
What Kolusu has provided is good enough for a beginner to start working on. However, I am adding this. Thanks
Quote:

SET NOT-END-OF-FILE TO TRUE.
OPEN INPUT INPUT-FILE.

READ INPUT-FILE
AT END
SET END-OF-FILE TO TRUE
NOT AT END
Continue Processing
END-READ.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group