Scratch files are temporary files that normally disappears after execution is completed.
OPEN( UNIT=7, STATUS='SCRATCH' )
To prevent a temporary file from disappearing after execution is completed, you must execute a CLOSE statement with STATUS='KEEP'. KEEP is the default status for all other files.
CLOSE( UNIT=7, STATUS='KEEP' )
Remember to get the real name of the scratch file. Use INQUIRE if you want to reopen it later.