View previous topic :: View next topic |
Author |
Message |
neeja Beginner
Joined: 26 Nov 2005 Posts: 1 Topics: 1
|
Posted: Sat Nov 26, 2005 6:26 am Post subject: How do we know that sequential file has no records in cobol? |
|
|
How do we know that sequential file has no records |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Nov 26, 2005 8:27 am Post subject: |
|
|
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 |
|
 |
mrar_160 Beginner
Joined: 07 Mar 2006 Posts: 4 Topics: 1
|
Posted: Tue Mar 07, 2006 9:39 pm Post subject: |
|
|
kolusu,
Can you give some example?
tq |
|
Back to top |
|
 |
Ravi Beginner
Joined: 27 Jun 2005 Posts: 88 Topics: 2
|
Posted: Wed Mar 08, 2006 12:50 am Post subject: |
|
|
neeja & mrar_160,
I would really appreciate if you can show the COBOL code to us.
Cheers |
|
Back to top |
|
 |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Wed Mar 08, 2006 9:39 am Post subject: |
|
|
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 |
|
 |
|
|