Skip to main content
Question

Show many records without paged-grid

  • April 13, 2026
  • 6 replies
  • 78 views

Andreas Weinand
Forum|alt.badge.img+2

To show records of a vision file we use paged-grids and the majority of our users are fine with that.

There is one customer (and unfortunately our most important one) who wants a “standard scrollbar”.
The answer that this is only doable when we know how many records are 100% does not convince him and he does not let it go.

So we thought of a lazy-loading scenario.
We load and show the first 100 records and when he drags the grid thumb all the way down to the end of the grid we try to load more records.
The problem is that the grid does not give an event when reaching the last record.

Does anyone have an idea how to solve this ?
Or do you have a totally different approach ?

6 replies

Claudio Contardi
Forum|alt.badge.img+2

Can your grid work as web sites do?

Once you’ve scrolled the 100 rows to the bottom, you could then add a few push buttons to “Load the next 100”, or “go back to the previous 100”. 


Andreas Weinand
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • April 13, 2026

We use ACUCOBOL-GT grids … does this answer your question ?

Do you have a sample how this could look and feel ?


James Whalen
  • New Participant
  • April 21, 2026

If you need the number of records in the file, use the I$IO INFO-FUNCTION on your file. This returns a bunch of information on your index file, including the number of records. Then you can build your Grid with the scroll bars.

You can check out the filesys.def COPY file, it contains the layouts for each kind of information. This is op-code 4.

Of course the AcuCobol documentation is horrible on this and many other topics.

I think another one of our programmers used that. I will have to dig around to see if I can find a sample. Otherwise you may check out the sample programs, they might have a sample as well.


Kim Hendriksen
Forum|alt.badge.img
  • Participating Frequently
  • April 30, 2026

           select visionfile  assign to visionfile-name

                  organization       is binary sequential,

                  access mode        is sequential

                  file status        is fstat.



...

       fd  visionfile.

       01  visionfile-record.

           05 filler                   pic x(02).

           05 vf-vision-version        pic x(2) usage comp-x.

              88 vision-3              value 3.

              88 vision-4              value 4.

              88 vision-5              value 5.

           05 filler                   pic x(508).

       01  visionfile3-record.

           05 filler                   pic x(38).

           05 vf3-active-records       pic 9(09) comp-x.

           05 vf3-deleted-records      pic 9(09) comp-x.

           05 filler                   pic x(48).

           05 vf3-max-rec-size         pic 9(04) comp-x.

           05 vf3-min-rec-size         pic 9(04) comp-x.

       01  visionfile4-record.

           05 filler                   pic x(50).

           05 vf4-active-records       pic 9(09) comp-x.

           05 vf4-deleted-records      pic 9(09) comp-x.

           05 filler                   pic x(56).

           05 vf4-max-rec-size         pic 9(04) comp-x.

           05 vf4-min-rec-size         pic 9(04) comp-x.

       01  visionfile5-record.

           05 filler                   pic x(60).

           05 vf5-active-records       pic 9(09) comp-x.

           05 vf5-deleted-records      pic 9(09) comp-x.

           05 filler                   pic x(79).

           05 vf5-max-rec-size         pic 9(09) comp-x.

           05 vf5-min-rec-size         pic 9(09) comp-x.

...

       77  visionfile-name             pic x(40) value spaces.

       77  fstat                       pic xx    value spaces.

       01  w-helpfields.

           05 w-active-records         pic 9(09) comp-x.

           05 w-deleted-records        pic 9(09) comp-x.

           05 w-max-rec-size           pic 9(04) comp-x.

           05 w-min-rec-size           pic 9(04) comp-x.

 

              move file-name to visionfile-name

              open input visionfile

              move spaces to visionfile-record

              read visionfile end-read

              evaluate true

                when vision-3

                     move vf3-active-records  to w-active-records

                     move vf3-deleted-records to w-deleted-records

                     move vf3-max-rec-size    to w-max-rec-size

                     move vf3-min-rec-size    to w-min-rec-size

                when vision-4

                     move vf4-active-records  to w-active-records

                     move vf4-deleted-records to w-deleted-records

                     move vf4-max-rec-size    to w-max-rec-size

                     move vf4-min-rec-size    to w-min-rec-size

                when vision-5

                     move vf5-active-records  to w-active-records

                     move vf5-deleted-records to w-deleted-records

                     move vf5-max-rec-size    to w-max-rec-size

                     move vf5-min-rec-size    to w-min-rec-size

              end-evaluate

              close visionfile
 


Andreas Weinand
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • May 4, 2026

Thanks for the interisting approach.

Unfortunately our application allows to enter a start value (Show all records beginning 01.01.2025) and filters.

So I would only know the number of records after reading each record.
 


Kim Hendriksen
Forum|alt.badge.img
  • Participating Frequently
  • May 4, 2026

Why do you need to know the number of records?
We use grids in many programs, and non of them are paged grids.
And we don’t know the number of records before filling the grid. If there are many records, this will take some time to fill the grid.

The limit is memory.

 

           MODIFY SC1-GD-1,    RECORD-TO-ADD = TAB1-FELTER.