Execution of an ENDFILE statement causes an end-of-file (EOF) record to be written to the specified disc file.
UNIT= <value>
<value> specifies the unit number. The keyword is optional if it is the
first item in the list. If the unit number is the only argument, the brackets
around the argument list are optional.
IOSTAT= <variable>
<variable> will contain zero if the operation was successful, otherwise a
positive value to indicate an error.
ERR= <label>
<label> specifies a label to go to in the event of an error.