Article View: comp.lang.cobol
Article #148READ INTO (was: Why isn't my program working?
From: William M. Klein
Date: Mon, 28 Apr 2003 22:07
Date: Mon, 28 Apr 2003 22:07
39 lines
3029 bytes
3029 bytes
"LX-i" <DanielJSNOSPAM@Knology.net> wrote in message
news:3EADA127.2090104@Knology.net...
> GoldenWing wrote:
<snip>
>
> > WRITE PRINT-RECORD FROM TAX-RECORD-O.
>
> When you Read .. Into (at least with my implementation), your FD does
> not get filled.
If you have a compiler that does NOT "fill in" the records under an FD when
you do a READ INTO, then you have a compiler that does NOT conform to the
ANSI ('85 or 2002) COBOL Standards. From page 497 of the 2002 Standard (and
the '85 Standard has similar wording),
"4) The result of the successful execution of a READ statement with the INTO
phrase is equivalent to the application of the following rules in the order
specified:
a) The same READ statement without the INTO phrase is executed.
b) The current record is moved from the record area to the area
specified by identifier-1 according to the rules for the MOVE statement
without the CORRESPONDING phrase. The size of the current record is
determined by rules specified in the RECORD clause. If the file description
entry contains a RECORD IS VARYING clause, the implied move is an
alphanumeric group move. Item identification of the data item referenced by
identifier-1 is done after the record has been read and immediately before
it is moved to the data item. The record is available in both the record
area and the data item referenced by identifier-1.
If the execution of a READ statement with the INTO phrase is unsuccessful,
the content of the data item referenced by identifier-1 is unchanged and
item identification of the data item referenced by identifier-1 is not
done."
--
Bill Klein
wmklein <at> ix.netcom.com
Technical Details
Message-ID:
<b8k8o5$b10$1@slb6.atl.mindspring.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news-xfer.cox.net!cox.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mailReferences:
<vaqqbv2fb85p4b@corp.supernews.com> <3EADA127.2090104@Knology.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f4f85,61ba20b84bd2781 X-Google-Attributes: gidf4f85,public X-Google-Thread: 10585b,61ba20b84bd2781 X-Google-Attributes: gid10585b,public X-Google-Thread: 10d15b,61ba20b84bd2781 X-Google-Attributes: gid10d15b,public X-Google-ArrivalTime: 2003-04-28 15:08:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news-xfer.cox.net!cox.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "William M. Klein" <wmklein@ix.netcom.com> Newsgroups: comp.lang.cobol,alt.cobol,fj.comp.lang.cobol Subject: READ INTO (was: Why isn't my program working? Date: Mon, 28 Apr 2003 17:07:50 -0500 Organization: MindSpring Enterprises Lines: 41 Message-ID: <b8k8o5$b10$1@slb6.atl.mindspring.net> References: <vaqqbv2fb85p4b@corp.supernews.com> <3EADA127.2090104@Knology.net> Reply-To: "William M. Klein" <wmklein@ix.netcom.com> NNTP-Posting-Host: 45.03.db.81 X-Server-Date: 28 Apr 2003 22:08:05 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106