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

My Code looks some thing like this .... 

After Clearing and Loading Subfile 

Dow *In03 = *Off   
 
If RRn > *Zeros
Eval SFLDSP & SFLDSPCTL = *On
Endif 

If RRN = *Zeros

Eval SFLDSP = *Off
Eval SFLDSPCTL = *On  
Endif 

Write any record formats that are needed

EXFMT SFLCTL

If *In03 = *On
Leave
Endif

If RRN > *Zeros 

ReadC   for Equal indicator 80
DoU *In80 = *On

Select 

When $Opt = 2 
ExSr $Opt2Sr

When $Opt = 3
ExsR $Opt3Sr 
If any error found in the values input 
Eval any indicators On 
Write Message Control if any 
May or may not have SFLNXTCHG indicator on 
Update SFL Record Format

Other 
If $Opt > *Zeros
Eval any indicators on
Write Message Control if any 
May or may not have SFLNXTCHG indicator on 
Update SFL Record Format
 
EndSelect

ReadC   for Equal indicator 80
EnDDO

Endif
 
ENDDO 

Only One time ReadC to error out or to process 

Thanks
Sadiq ....


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

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