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


  • Subject: RE: Subfile question.
  • From: "Bale, Dan" <DBale@xxxxxxxx>
  • Date: Tue, 23 May 2000 11:42:38 -0400

When you load the subfile page (SFLSIZ=SFLPAG) you keep track of the first
subfile record's database key, (usually you would store each record's keys
as hidden fields in the subfile record so, therefore, you would chain to the
first subfile record to get this information when Page Up is hit).  Once you
have the key of the record that is in the first subfile record, you use a
SETLL with that key on the database file, and use READP (Read Prior) n+1
times where 'n' is the SFLPAG value.  Then start your "Load Subfile"
routine; the subsequent READ after the last READP will be the first subfile
record of the Paged Up subfile.

hth

- Dan Bale

> -----Original Message-----
> From: hendry tionardi [SMTP:ahen75@hotmail.com]
> Sent: Tuesday, May 23, 2000 2:16 AM
> To:   RPG400-L@midrange.com
> Subject:      Re: Re[2]: Subfile question.
> 
> How if we created subfile same to subfile size, if we page down, we just 
> read next record, bu how about we page up again? How we fill the 
> subfile.What technique we do?
> 
> Can we make a pointer to the database?
> 
> >From: eric.delong@pmsi-services.com
> >Reply-To: RPG400-L@midrange.com
> >To: <RPG400-L@midrange.com>
> >Subject: Re[2]: Subfile question.
> >Date: Mon, 22 May 2000 12:54:48 -0600
> >
> >      Looks like the old SFLSIZ>SFLPAG question.......
> >
> >      There are two subfile coding scenarios that I have used.  First is
> >      the one I suspect you want. Due to the way subfile paging works,
> >      you do NOT need to explicitly define the number of records your
> >      subfile can hold. Any time you make SFLSIZ larger than SFLPAG,
> >      OS400 takes over SFL paging. You can put as many records as you
> >      want into the subfile (up to the limits imposed by OS400), and it
> >      all still works. For your program, if SFLPAG=20, then you could
> >      code SFLSIZ=21 and still load your 2000 records to the subfile.
> >
> >      The other scenario is SFLSIZ=SFLPAG, which forces the program to
> >      manage sfl paging a screen at a time. Whenever a pagexx key is
> >      pressed, the program must go out and retrieve the next x records
> >      and write them to the subfile. Quite a bit more work for the
> >      programmer, but it performs better for really big record sets.
> >
> >      hth,
> >      eric.delong@pmsi-services.com
> >
> >
> >__________________________ Reply Separator
> _______________________________
> >Subject: RE: Subfile question.
> >Author:  <RPG400-L@midrange.com> at INET_WACO
> >Date:    5/22/00 7:05 AM
> >
> >
> >I would asked another quiestion about subfile again.
> >
> >If i had to read 2000 record of file and using subfile, an once time
> display
> >only can be 20 record.(my dds file only can fit 20 record)
> >
> >Did i make the subfile size as big as that record number size(2000),
> >Or i just make the subfile size as big as subfile page size (20)?
> >
> >If and the subfilesize 2000, i think it won't be a problem for page up
> and
> >page down, because of subfile can handle it.
> >
> >But let's say if the size of record, we don't had know how big is this
> file,
> >like we created a program for banking application that searching for bank
> >account using name, how subfile handle it?
> >Because we don't know how many record of the file, and how subfile handle
> >the roll up , roll down ??
> >
> >
> > >From: István Rudas <Istvan@Rudas.net>
> > >Reply-To: RPG400-L@midrange.com
> > >To: RPG400-L@midrange.com
> > >Subject: RE: Subfile question.
> > >Date: Fri, 19 May 2000 19:35:03 +0200
> > >
> > >Ciao Fabrizio,
> > >
> > >I would like to add to Dan Bale's answer:
> > >
> > >[assuming, that you filled your SFL until your data ended, so you have
> to
> > >save the "last used" SFL Rec.Number].
> > >
> > >IF YOUR GOAL IS, to have a Key X "top" and another Key Y "bottom",
> > >when Key X or Y is pressed:
> > >- you just  have to fill in a 1 in the SFL Rec.Number for "top"
> > >- or the "last used" SFL rec.Number for "bottom"
> > >- and then EXFMT the subfile again.
> > >(the cursor is positioned to the actual SFL Rec.Number and you get that
> > >page where the actual SFL Rec.Number=cursor is).
> > >SFLRCDNBR (CURSOR) could be helpful reading in the manual, because it 
> >works
> > >differently if you do not have any input fields. (SC42-2060-01)
> > >
> > >... and if it looks ugly for you, if the cursor is standing 'somewhere'
> on
> > >your screen, you can make a little calculation with your page-size
> SFLPAG,
> > >to find the SFL Rec.Number of the first line of the actual page before
> you
> > >EXFMT ....
> > >
> > >IF YOUR GOAL IS DIFFERENT; please give  more detailed information what
> the
> > >question is!
> > >
> > >István
> > >
> > >
> > > >
> > > >> -----Original Message-----
> > > >> From:  Fabrizio Gurrieri [SMTP:fabrizio.gurrieri@bartolini.it]
> > > >> Sent:  Friday, May 19, 2000 8:22 AM
> > > >> To:    RPG400-L@midrange.com
> > > >> Subject:       Subfile question.
> > > >>
> > > >>        Sorry, I make a mistake, I need to scroll Up and Down a
> subfile
> > > >> respectly until the top or the bottom automatically.
> > > >> Any suggestions???
> > > >>
> > > >> Thanks
> > >
> > >------------------------------------------------------
> > >István Rudas (Mr.),    R U D A S   EDV-Beratung
> > >A-1060  W i e n,  (Austria),     Stiegengasse  4/4
> > >Tel:  (+43/1) 587 43 71;    (+43/664) 308 79 78
> > >Fax:  (+43/1) 581 67 08; http://www.Rudas.net
> > >                mailto: Istvan@Rudas.net
> > >-------------------------------------------------------
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.