SETGT (Set Greater Than)
The SETGT operation positions a file at the next record with a key or relative record number that is greater than the key or relative record number specified in factor 1.
search-arg, must be the key or relative record number used to retrieve the record.
Search-arg, must be the key or relative record number used to retrieve the record. It can be a KLIST name, a list of values, or %KDS.
%KDS(data-structure-name{:num-keys})
SETGT (Current_date: Current_Time) fileName;
ReadP FileName;
----------------------------------------
setgt (field1:field2:field3:*hival) fileName;
----------------------------------------
SetGT ('K': 'P') fileName;
ReadP fileName;
DoW not %eof;
//Some logic
ReadP fileName;
EndDo;
-----------------------------------------
Setgt ( 'CLA' : *hival ) fileName;
ReadP fileName;
Dow Not %EOF(fileName);
ReadP fileName;
Enddo;
----------------------------------------
setGT (purgeDate) fileName;
read fileName;
doW not %eof (fileName);
if %found(fileName);
delete FileRec;
NumRecPurged += 1;
endIf;
read fileName;
endDo;
-----------------------------------------
Setgt (*Hival) fileName;
Readp fileName;
Dow Not %Eof(fileName);
//Some Logic
Readp fileName;
Enddo;
-------------------------
SetGT (field1:field3:field3) fileName;
ReadPE (field1:field3:field3) fileName;
If Not %EOF(fileName);
Endif;