How can I simulate the EOF function?
I don't understand the question. What "EOF function" are you referring to?
Your previous quesion asked about detecting when you are processing the last record. If by that you mean you are running an output process and want to know when you are on the last record of the output, you can do this by checking if @RS equals @TS. (That is, if the number of records selected so far equals the total number of records that were selected.)
Alternatively, you can do something in the @WGT (grand total) event, which is done after processing the last record, or @DONE, which is done after the entire output has been generated.