Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us