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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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