|
Barbara--
Don't you need to specify the (E) op code extender to ensure your looking
at the correct file status?
Terry Richardson
Vermont Information Processing, Inc.
terry@xxxxxxxxxx
Barbara Morris
<bmorris@xxxxxxxx
om> To
Sent by: rpg400-l@xxxxxxxxxxxx
rpg400-l-bounces@ cc
midrange.com
Subject
Re: Loop code
04/01/2004 03:16
PM
Please respond to
RPG programming
on the AS400 /
iSeries
<rpg400-l@midrang
e.com>
Joe Lee wrote:
> ...
> There are no inconsistencies, except that %EOF actually reflects the
> current location of the file pointer in the file. What you appear to
> want is a %FILEOPPERATIONSUCCESSFUL BIF that was on if CHAIN, SETxx,
> READx, WRITE, UPDATE, or DELETE succeeded, and off if they didn't.
> ...
Just for the record, such a %FILEOPERATIONSUCCESSFUL bif exists:
if %STATUS = 0
or
if %STATUS(file) = 0
Using %STATUS this way, you can get a nice tidy chain/reade loop:
chain key file
dow %status(file) = STATUS_SUCCESS
process
reade key file
enddo
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.