Re: Read, last record appears twice

From: Michael Mattias (michael.mattias_at_gte.net)
Date: 03/04/04


Date: Thu, 04 Mar 2004 13:14:04 GMT


"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:BCq1c.17520$yZ1.3130@newsread2.news.pas.earthlink.net...
> Michael,
> I know that what you say is NOT true if you use the "SAME RECORD AREA"
clause.
> I am not certain, but I *think* that it may not be true for "normal" OPEN
INPUT
> sequential files. According to the ISO 2002 Standard (and I think this is
the
> same as earlier standards)....
> "Michael Mattias" <michael.mattias@gte.net> wrote in message
> news:Wiq1c.30016$PY.14186@newssvr26.news.prodigy.com...
> > "Julian" <whateveryousend@iwontread.net> wrote in message
> > news:c258tr$375$1@news.brutele.be...
> >
> > Actually, all COBOL and AFAIK any language product will state that the
> > contents of a file buffer are "undefined" if the last READ was not a
valid
> > read; and a READ which results in the AT END condition is not a valid
read.

Published standards and rules aside, I think it totally foolish to rely on
the contents of a file buffer except following a sucessful READ.

Even if "permitted" it is IMO plumb dopey.

MCM
(PS: I like the explanation stating the "area" is available, even if the
contents are not defined.)



Relevant Pages

  • Re: BLOCK CONTAINS
    ... One CORRECTION to the "general rules" that I gave below. ... (These apply to current IBM Enterprise COBOL - not to older IBM compilers, ... program that does not have the BLOCK CONTAINS clause. ... even care) I can't see any reason to ever specify the BLOCK CONTAINS clause. ...
    (comp.lang.cobol)
  • Re: BLOCK CONTAINS
    ... program that does not have the BLOCK CONTAINS clause. ... read a RECFM=V file with a Cobol program that *does* have a BLOCK CONTAINS ... specify the BLOCK CONTAINS clause, because it has no meaning to VSAM). ... There are three source for DCB information, Program, JCL, and File Label, ...
    (comp.lang.cobol)
  • Re: Semantics of the PERFORM VARYING statement, with clauses re-ordered.
    ... In the first example, which is OK, MY-PARAGRAPH exists somewhere else in the ... The second example actually isn't valid standard COBOL as written; ... > means that that clause can appear zero or more times (i.e. arbitrarily ... > PerformTestPositionClause looks like: ...
    (comp.lang.cobol)
  • Re: BLOCK CONTAINS
    ... (These apply to current IBM Enterprise COBOL - not to older IBM compilers, ... program that does not have the BLOCK CONTAINS clause. ...
    (comp.lang.cobol)
  • BLOCK CONTAINS
    ... I have been a bit of experimenting with z/OS QSAM files from a Cobol program ... program that does not have the BLOCK CONTAINS clause. ... care) I can't see any reason to ever specify the BLOCK CONTAINS clause. ...
    (bit.listserv.ibm-main)