An example to open a file for output would be.
OPEN #2,8,0,"D:MYFILE.TXT"
You can replace the 8 for different open modes.
4=Input
12=Input/Output
9=Append
Do not open the same file for Output again unless you want to erase it !
You can send a record to your open file with.
PRINT #2;"NAME"
If you want tab spaces between your records replace the semicolon with a comma.
You use INPUT #2,A$ to read records.