I have a table containing huge amount of data. I fetched multiple records from that table using Cursor. But now, I want to display those fetched records in a single map.
Can anyone please help me with a sample code ?
I have a table containing huge amount of data. I fetched multiple records from that table using Cursor. But now, I want to display those fetched records in a single map.
Can anyone please help me with a sample code ?
Define your map with a set of fields for one record, then repeat that set for as many records as will fit on a single physical screen. Often the generated copybook for the map is redefined with a COBOL table to facilitate loading the repeating fields.
In your program, you must write scrolling logic to allow the user to scroll forward and backward through the list of records. Typically this is done by checking EIBAID
to see if it's DFHPF7
or DFHPF19
to scroll up and DFHPF8
or DFHPF20
to scroll down, but that's just following ISPF conventions and is totally up to you.
You will need to keep track of which records are on the screen either in your commarea or in a container. You could do this by storing the TSQ indexes of the first and last records currently displayed.