× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Scott...

Ah - I remember - Although I've written several subfiles recently - I guess
it's been a while since I've had to do actual error checking on one... (Most
have been just "list and select a record," and I don't limit a user to
having to use any special selection character, like '1' or 'S' - anything
will do to select)

Thanks for the refresher....

 


Jerry L. Feador 
Sr. Programmer/Analyst 
Kia Motors America, Inc. 
(949) 595-5810 



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Scott Klement
Sent: Wednesday, November 24, 2004 9:17 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Indicators -- not needed anymore???


Hi Jerry,

> I'll have to research the INDDS that you speak of.  I don't actually use
the
> SFLNXTCHG Indicator, I'm just aware that it has to be coded on the DDS or
> the ReadC will read every record, as if it were changed (am I right?)

No, the opposite.  READC might get no records (if the user didn't make any
changes.) and SFLNXTCHG can be used to make sure that you DO get
changes... I'll explain:

READC will read any records that have been changed SINCE THE LAST TIME the
records were read.

So, if the user makes changes to a record, it's marked as changed.  You
use READC to get the records he changed and validity check them. Typically
you then re-display the screen with error messages for any mistakes the
user might've made.

Now what?  You can't determine that same group of records again, since
they were already read, they no longer come up with READC.  Yes, if the
user fixed the error, they'd come up as changed again.  But what if he
just hit enter a second time and ignored the errors?   Or what if there
was nothing to fix, and you just wanted to read those same records again
in order to update a database?

So, the validity checking routine uses SFLNXTCHG to mark the record as
"changed." Now the next time you run READC, you'll get that record
whether the user changes it or not.

This way, you can limit your program to only validity checking records
that the user physically changed, thus improving performance, and you can
limit your update routines to only updating records that the user has
changed...


--
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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.