RPGIV @ Work

A unique site for RPG and System i Lovers


Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

RPG SETLL Print E-mail
User Rating: / 0
Written by Chamara Withanachchi   

The normal use of SETLL is with a full or partial key, or a relative record number. SETLL can also be used with the figurative constants, *LOVAL and *HIVAL.

Using SETLL with *LOVAL positions the file so that the first read retrieves the record with the lowest key.

*HIVAL positions the file so that a READP retrieves the last record in the file, or a READ receives an end-of-file indication.

*LOVAL is most commonly used to reset reading at the beginning of a keyed file.

*HIVAL is really most useful when the desire is to use the last record in a file.

The most important thing to keep in mind about SETLL, even with using *LOVAL and *HIVAL is that no data read is done from the file.

<Previous   Next>