Setll - *Start & *End

250 Views


SETLL

  1. *START - positions the file at the beginning of file, so the READ returns the 1st record.
  2. *END - positions the file at the end of the file, so the READP returns the last record of the file.

   

SetLL *Start FileName; 
Read FileName;         
DoW Not %EOF(FileName);
    
// Some logic

EndDo;


SetLL *End FileName;      
ReadP FileName;           
If Not %EOF(FileName); 

//Some Logic

EndIf;   

Use SETLL *START instead of SETLL *LOVAL to position the cursor at the beginning of the file.

Use SETLL *END instead of SETLL *HIVAL to position the cursor at the end of the file.

Post Comments