× 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 Chandra:

    

   Why not have a regular subfile, fill a limited number of records (say 13)
   at a time and execute a 'Fill subfile' routine everytime you page down.
   This way you don't have to worry about storing anything in arrays etc.
   When you page up the records are already there, don't have to worry about
   filling the subfile again.

   Also, have a hidden field of (4,0) in your control record with SFLRCDNBR =
   'Y'. This helps in positioning your subfile to desired record.

   Regards,
    
   Hrishikesh Kotwal
    
   >From: "Denzil D'souza" <DENZILD@xxxxxxxxxxxxxxxxx>
   >Reply-To: RPG programming on the AS400 / iSeries <RPG400-L@xxxxxxxxxxxx>
   >To: "'RPG programming on the AS400 / iSeries'" <RPG400-L@xxxxxxxxxxxx>
   >Subject: RE: Single Page Subfile Example
   >Date: Mon, 14 Jul 2003 16:25:30 +0530
   >
   >Hi
   >Chandra,
   >
   >It would be ideal if you could have a temp file, with a structure similar
   to
   >that of your subfile...+ a unique key that would identify a relationship
   >between your subfile record and the temp file records..(could be a hidden
   >field in the SFL)
   >
   >The tempfile would be written/updated only in the follwing events and
   only
   >when the option typed on the sfl is valid!!
   > PageUP
   > Page Down
   > Enter
   > Any other operations like Top or Bottom positioning.....
   >
   >For this you'd have to use the field(s) in the SFL(fetched by READC) to
   >chain on your temp file to check if the record is already present...then
   >perform a chain,
   > If the record is found
   > update the temp file
   > else
   > Write to the temp file
   >
   >
   >For processing the options, you'd have to process only when enter is
   >pressed, then you'd have to read your temp file, process the record based
   on
   >the option number that is stored in your temp file and once the record is
   >processed delete the record...(this would take care of clearing the
   tempfile
   >for the next refreshed load)
   >
   >
   >For your load routine,
   >
   > your load logic....goes here
   > Once your subfile field are loaded and before the write
   > Chain on your tempfile using the key from the
   >subfile record
   > If found
   > Move Option_Field_Value from
   >tempfile to the option_field_value of Subfile
   > Else
   > Move blanks to the
   >option_field_value of Subfile
   >
   > Increment your RRN
   > WRITE To SFL
   >
   >Hope this is clear...
   >
   >Best Regards
   >Denzil D'Souza
   >\m/ \m/
   >
   >
   >
   >
   >
   >-----Original Message-----
   >From: Chandra Sekhar Rath [mailto:ChandraRS@xxxxxxxxxxxxxxxxx]
   >Sent: Monday, July 14, 2003 3:56 PM
   >To: rpg400-l@xxxxxxxxxxxx
   >Subject: RE: Single Page Subfile Example
   >
   >
   > Hello Booth,
   >
   > Thanks for the pointer.Regarding the function keys , what i was trying
   >to find out is , if i display a screen with a page of records
   > and say the user presses option 4 for deletion in 3 records and then
   >presses page down with out hitting enter.In that case , i have to
   >clear the existing records(Since it is a single Page subfile) and build
   the
   >next set of records.Now at this instance , if the
   > user presses page up , then the existing records are again cleared and
   >the old set up records will be displayed.But , i would have
   > lost the option 4 , that the user would have entered in 3 records.
   >
   > Any work around/sample for that?
   >
   > Thanks and regards
   > Chandra Sekhar
   >
   > > ----------------------------------------------------------------------
   > >
   > > message: 1
   > > date: Sun, 13 Jul 2003 08:44:39 -0500 (Central Daylight Time)
   > > from: "Booth Martin" <BOOTH@xxxxxxxxxxxx>
   > > subject: Re: Single Page Subfile Example
   > >
   > > At the time that code was written there probably was not a
   Select/EndSl
   > > Opcode. I've found the best use of programming time in those design
   > > situations is to consider changing the code to Select and to change
   the
   > > GOTO
   > > sections to sub routines. A user can not choose two function keys at
   the
   > > same time so there should be no conflicts with logic.
   > >
   > >
   > >
   > > ---------------------------------------------------------
   > > Booth Martin http://www.MartinVT.com
   > > Booth@xxxxxxxxxxxx
   > > ---------------------------------------------------------
   > >
   > > -------Original Message-------
   > >
   > > From: RPG programming on the AS400 / iSeries
   > > Date: Thursday, July 10, 2003 07:30:13
   > > To: RPG400-L@xxxxxxxxxxxx
   > > Subject: Single Page Subfile Example
   > >
   > > Hi Group,
   > >
   > > Please let me know if there are any sample codes for wrtitng a typical
   > > maintainance single page subfile example in RPG IV.I understand that
   to
   > > keep
   > > the options , that user has selected on the screen, arrays have to be
   used
   > > for storing.So that when Page down has been pressed, and again page up
   is
   > > done i donot lose the options that the users have entered .Any example
   on
   > > how this
   > > has to be done?
   > >
   > > I have been maintaining some old codes of Load all and Expanding
   > > maintainance sub files.But they are not very structured in the sense
   that
   > > they use a lot of Go to statements to handle various events after
   > > different
   > > screens are presented..Is it possible to have a single EXFMT in the
   code
   > > and
   > > also a single set of subroutines for handling 'keys pressed' events
   > > instead
   > > of multiple EXFMTs and same set of 'keys pressed ' subroutine copied
   again
   > > &
   > > again?
   > >
   > > Please point me toward good structured RPGIV code samples
   > >
   > >
   > > Thanks and regards
   > > Chandra Sekhar Rath
   > >
   > >
   > >
   >_______________________________________________
   >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.
   >

     ----------------------------------------------------------------------

   NRIs ahoy! Want to send money home? Do it in a jiffy!

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.