Read using limit :

Hi All,

WHAT WILL BE THE RESULT OF THE FOLLOWING READ?

   READ (10) EMPLOY-VIEW WITH EMPLOY-ID =

No, 10 records will be read, starting from EMPLOY-ID 3 (if 10 records exist with EMPLOY-ID 3 or higher)

Thanks winter for quick reply…That means if employee-id = 3 exist after first 10 records those will not retrieved right?

Just check the following example:

There are 12 records:
3
3
3
3
3
3
3
3
2
2
3
3

In this case first 8 records have emp-id = ‘3’. So above read will just retrieve first 8 records or is it going to retrieve 11 th and 12th record also?

Thanks,
Rohan.

Right!

It will read the 11th and the 12th as well, because it is the 9th and 10th record in reality.

In other words: READ (10) EMPLOY-VIEW WITH EMPLOY-ID =

Rohan, it is a shame your management has never sent you to a Natural class. If they had, you would know that :

READ (10) EMPLOY-VIEW WITH EMPLOY-ID =