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
 

 

How to identify end of file setting in a file

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

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Thu Feb 02, 2006 4:11 pm    Post subject: How to identify end of file setting in a file
Reply with quote

hai all ,

i need a clarification. suppose that i've a file. the file has only one record. will the end of file condition be set after the first successful read or the after the second attempt to read the file and identifying that there are no more records.


expecting responses..


gowtham
Back to top
View user's profile Send private message

raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Thu Feb 02, 2006 4:15 pm    Post subject: end of file
Reply with quote

hi,

first read is success.

second read gives end of file
Back to top
View user's profile Send private message
Aji

New User


Joined: 03 Feb 2006
Posts: 53
Location: Mumbai

PostPosted: Fri Feb 03, 2006 3:05 pm    Post subject:
Reply with quote

Hi Gowtham,

Check the end of file condition after every read.
Regards

Aji Cherian
Back to top
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Fri Feb 03, 2006 4:48 pm    Post subject:
Reply with quote

hi gowtham,


End of file will be determined by the file status variable that u declare in the select clause

for EOF the value would be 10 means record not found......


thanks
Balaji
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Feb 03, 2006 5:47 pm    Post subject:
Reply with quote

Hi,
It will check the EOF status after each successful read. If not reach then it will continue otherwise it will stops reading the file.
Back to top
View user's profile Send private message
pratibha patre

New User


Joined: 02 Feb 2006
Posts: 2

PostPosted: Fri Feb 03, 2006 11:13 pm    Post subject: hi
Reply with quote

As there is only one record it will read the particular record and return back. correct me if i am wrong.
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Fri Feb 03, 2006 11:44 pm    Post subject: Re: How to identify end of file setting in a file
Reply with quote

Hi,
After successful read of the only one record and in next read the at end clause becomes true.

Regards,
Naga samba siva rao
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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