1) I am reading a table using say READ loop. Now based on some condition, I want to read again from the starting value. Is there any Natural Command for this functionality ?
The GET SAME statement is used to re-read the record currently being processed. It is most frequently used to obtain database array values (periodic groups or multiple-value fields) if the number and range of existing or desired occurrences was not known when the record was initially read.
For 1)
You will need to use a repeat loop as below
Code:
FLAG := 0
REPEAT
READ STARTING FROM XYZ
stmts
IF condition1
ESCAPE BOTOM
END-IF
stmts
if condition2
FLAG := 1
ESCAPE BOTTOM
END-IF
END-READ
UNTIL FLAG NE 0
End-REPEAT
In the above code, when ever condition1 satisifes, it will restart the read loop and when condition2 satisfies, it will come out of read loop. Hope this is what you needed.