Asked By
Macie Spitz
0 points
N/A
Posted on - 11/09/2011
My flat file contains many deleted records. I need to do a sequential read for the reason that there are only a few active records. I use AS40 V5R4, and it is taking too long. Is there a way to make it read only the active records?
Answered By
Jackman
0 points
N/A
#108703
How to read active records only in a flat file?
Hi Macie,
If the arrival sequences is not important to you and if the files are maintained then you could use GHGPF to REUSEDLT (*YES). Note that you use this if the arrival sequences is not important to you. You could also choose to have the LF created over the PF as another option. It should be able to read fast and you need not specify any key. This includes the deleted records.
If the file is locked you can use SQL to get temporary records inserted into a file, then delete and later insert to have the ones in the temporary record put back.