Please remind how to open some file, erase its content if it exists and close with zero size?
Open file and close it deleting its content
This is one way (NOT SECURE!)
open(11,file='xx',status='replace')
rewind(11)
endfile(11)
close(11)
This way of truncating a file is not secure because most of the bytes that were originally on the file may still persist on the medium (disk drive, USB flash, etc.). If you are not worried about secrecy, etc., however, this is a simple solution.
hollymolly...Good that I stopped and decided to ask the group. I'd easily lost the rest of the night trying to find this. Many thanks Mecej4
To remove the file you can use
close(11,status='DELETE')