|
This is where you use the SFLNXTCHG keyword in your DDS. In your DDS you code the SFLNXTCHG keyword conditioned by an indicator (see previous posts). In your validation subroutine you use the following logic: Do until end of sfl found Readc subfile If record found Perform validation tests and seton any error indicators Set on SFLNXTCHG conditioning indicator Update subfile record End If End Do If no errors found Do until end of sfl found Readc subfile If record found Perform database update processing End If End Do End If The important thing is that by turning on the SFLNXTCHG indicator and updating the subfile record after the validation tests then the READC will work again in the update processing routine. All the best Jonathan -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Stiju Easo Sent: 08 March 2006 06:00 To: RPG programming on the AS400 / iSeries Subject: Re: How to validate input subfile I have done with simple input subfile, durring validation readc can only read once If the user resubmits the subfile without giving valid values to the fields( concider case he dont even change a recod) how can i ensure it gets validated second time should i use read insted of readc? i dont know concept of MDT tag can u explain how to use it. On 3/8/06, MD, Sadique <Sadique.MD@xxxxxxx> wrote: > > Hi Stiju, > > The input subfile is coded same as normal subfile > You may design your subfile with input capable fields may be size greater > than page and compile > and no extra key words required other than as you normally design for > normal > subfile > In your program as you load for a normal subfile > Clear Subfile then > Add 1 RRN number and simply keep Writing the Subfile record format until > RRN > number is equal to the number of > Records to be displayed on the subfile page > Check for RRN > * Zeros and > Eval SFLDSP and SFLDSPCTL indicators on > And EXFMT SFLCTL and end the program > > For validation part > With READC you can get the subfile changed records > If you find any invalid values then flag on the Error indicators if any > Or display any error messages via message subfile > Update your subfile record format and EXFMT your subfile control record > format > > > Thanks > Sadiq .... > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] > On Behalf Of Stiju Easo > Sent: Tuesday, March 07, 2006 4:25 PM > To: RPG400-L@xxxxxxxxxxxx > Subject: How to validate input subfile > > Can anyone sujesst how to validate an input subfile can u provide a > sample > code for input subfile and validation > i am new to as 400 > please help me > -- > 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. > -- > 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-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.