Hast Du schon einmal versucht statt *LOVAL/*HIVAL (*START/*END) zu verwenden?

Aus der ILE RPG Referenz:
The following reserved words are used for positioning database files. *START positions to beginning of file and *END positions to end of file.
*END
*START

Figurative constants can also be used to position the file. However, there are some situations where using *LOVAL or *HIVAL does not position the file exactly at the first or last record in the file; it is better to use *START and *END if you want to position to the first or last record in the file.


Hat die physische Datei vielleicht viele gelöschte Datensätze?
Vermutlich werden zunächst die gelöschten Datensätze gelesen (und überlesen) bevor dann der erste Satz gefunden wird. Deshalb dauert es so lange.
Mit *START sollten diese Sätze übersprungen werden.