|
Hello Hendry, you have not necessarily to know the (real) size of the subfile (for now, my V4R3-Documentation shows the limit with 9.999 records for the whole SFL). Generally I would suggest for performance, you fill only one page - and if the human presses the page-down-key, continue with filling and displaying the next page (see example b) and so on. The following explanation is very very mucho simplified; you do better code this after reading the manual!!! The keywords have also several side effects which are documented well. Your have mostly 2 ways of filling and handling the subfile: (a) - exact match of SFLSIZ and SFLPAG (here you have to handle the initializing, filling, EXFMTing all yourself) (b) - in cases such as yours when you do not know the real amount of records and want it display page after page with page-up and page-down, you just have to write 1 more to SFLSIZ than to SFLPAG. Your example: SFLPAG 20, SFLSIZ 21. When you have the first 20 records filled into the SFL, just EXFMT. When the person presses the page-keys, you get the indicators back which you defined with ROLLUP and ROLLDOWN or uses the SFLPAG size as default, if you wrote SFLROLVAL together with PAGEUP or PAGEDOWN your program gets the control to continue filling the next (20) records. THIS IS ONLY A VERY SHORT and NOT COMPLETE description. The Documentation has some examples: remind you to Documentation SC42-2060-01 , the DDS Reference Manual.- Sorry, not even 0,02 Euro. István At 07:05 22.5.2000 PDT, "hendry tionardi" wrote: >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 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.