Micro Focus QTP (UFT) Forums

Full Version: File Pointers Reset When Using Subroutines
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a text file I am reading line by line that is driving my testing.  I know I could have used the UFT Data area as well but we already have these text files that are easy to read and parse, but are a bit of a pain to export to UFT or Excel. because each line is different. I have a subroutine that reads each line of the file until End of File is reached.  I also have code that based on the line of text read, will jump to another sub-routine and do something and then jump back.  To my surprise and unlike an Excel macro, this is starting my file read over again from the beginning and leading to duplicate tests. What is the best way to fix this issue?

Thank you,
Zune  Cool