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



Hi Jonathan,

I absolutely agree with you that SFLNXTCHG indicator should be on before
updating the subfile record format
as a standard I too code that way only 

May be I am not true  
 

But I handle subfile only with only one EXFMT for Subfile control record
format in the whole program in a do loop
Then execute a subroutine for one more do loop to check for READC if RRN >
*Zeros, before the end of this do loop I 
Have every time checked for validations and for any errors update the sub
file record format other wise process those records.Then once this do loop
is left and enter in the main do loop it would EXFMT the Subfile control
record format
Now user would see all those error messages displayed and reverse images etc
if any 
and for next input values changes done /or not done or simply an enter again
my READC subroutine is executed
Which would check for any changed values and do the validations as said
above
So in this case I really don't require for SFLNXTCHG it perfectly works 
  



Thanks
Sadiq

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jonathan Mason
Sent: Wednesday, March 08, 2006 1:10 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: How to validate input subfile



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

If you're using the READC operation to get changed records only, then on the
subfile record in the DDS you should code the SFLNXTCHG keyword conditioned
by an indicator.  For example:

     A          R SFL02                     SFL       
     A*         =======                               
     A  74                                  SFLNXTCHG 
     A            S£OPT          1A  B  8  3          
     A  31                                  COLOR(RED)
     A  31                                  DSPATR(PC)
     A            S£CURC         3A  B  8  7CHGINPDFT 
     A  50                                  DSPATR(PR)
     A N50                                  DSPATR(UL)
     A  32N50                               COLOR(RED)
     A  32                                  DSPATR(PC)
     A            S£DESC        40A  B  8 13          
     A  33                                  DSPATR(PC)
     A  33                                  COLOR(RED)
     A                                      CHECK(LC)

Then during your validation routine, immediately before updating the subfile
record with any error indicators you should turn on the SFLNXTCHG
conditioning indicator.  You do this regardless of whether there are any
errors or not so that if there are any errors then the record will be
re-read next time the user presses Enter, and if there aren't any errors
then READC can be used for processing the subfile after all errors have been
validated.

Best regards

Jonathan



--
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-Ups:

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.