The data would be lost when the OPEN
statement
created a new file of the same name.
Here is a run of the program. Notice that no output from the program has been sent to the screen.
However, the characters did go to a file. Here is a DOS window who's default directory contains the program.
The DIR command shows the time and date of the file's creation. The TYPE command sends the characters in the file to the DOS screen.
Is the tile MYFILE.TXT which the program created an ordinary text file?