HOME  NEWS  FORUM  DOWNLOAD  LINK
OpenCOBOL - an open-source COBOL compiler
Main Menu
Download
Documentation
Development
Who's Online
21 user(s) are online (8 user(s) are browsing Forum)

Members: 0
Guests: 21

more...
Powered by
SourceForge

Xoops

Creative Commons

OpenCOBOL Forum Index
   OpenCOBOL
     Read previous at end
Register To Post

Threaded | Oldest First Previous Topic | Next Topic | Bottom
Poster Thread
mrcool
Posted on: 2012/6/12 21:09
Quite a regular
Joined: 2009/1/28
From:
Posts: 44
Read previous at end
Open Cobol returns a file status "10" end of file at the beginning of a file.

Read key-file
    previous record
    at end Move "11" to file-status
end-read. 


Notice the reset to "11" in the at end clause as shown.

The reason end and beginning should be different is that there is a common routine written that handles all file status codes. Using "10" for both means the screen message always says "end of file" when it could be end or beginning. The routine uses "11" as the beginning of file message to keep them different.

I'm not suggesting a change to Open Cobol at this time. Although if they did, that would be all right with me.

I'm posting this question mostly for Mr Klein (wmklein),

Are you on the ANSI/ISO Cobol committee?

Could there be a proposal to reserve file status "11" for beginning of file? (Or "12" or "13" or whatever they decide.)

I would like to have the committee decide on a code so that my routines will not be in conflict with other Cobol vendors.

For example, Ryan-McFarland Cobol (before they were called that) used "B3" for beginning file-status. I think they invented read previous with their call to "C$RDPRV". Other vendors may use something different.

Even if Read previous is not ISO yet, they could still reserve "11" for vendors that support it.

« 1 (2)
Threaded | Oldest First Previous Topic | Next Topic | Top

Register To Post
 
Copyright (C) 2005 The OpenCOBOL Project. All rights reserved.
Powered by Xoops2 | PHP | MySQL | Apache
ocean-net