Procedure 8 |
Close File |
REQUEST |
For files open in write mode causes file trailer labels to be written. No further data transfer requests may be issued until a further Open File request has been received for this client's client identifier.
Client identifier identifies the device for the client and capability is the corresponding access key provided by the server for the device. The current stream state for the stream must be dev_open otherwise the request will fail.
RESPONSE procedure status indicates the result of the request. |
procedure status |
If procedure status = accepted the current value of the stream status for this stream changes to dev_closing.
When the close file operation has been successfully completed (which could take some time) then stream state for the stream changes to dev_mount.
Should the operation fail then stream state reverts to dev_open and procedure status is set appropriately.
Implementation
This procedure reverses the action of the Open File procedure. It is only valid when the
device is in the Open state and if the EGTS system is in the Going state
(see Set EGTS Procedure - procedure 26) then the device should not be Associated with a EG Data Stream.
The server will close the tape file by writing the file trailer labels which consist of a
file mark, EOF1 and EOF2 and then writing the double file marks which indicate the end of
information on the tape. The server should backspace over the second of these file marks and
is then positioned correctly to accept a new Open File request.
The device status changes from the Open to the Mounted state.
The server logs the result of the procedure into the System log recording the drive name, volume name
and file name. Additionally the maximum recorded write error rate is also recorded. This is the
maximum value of the recovered error rate as a percentage of the number of physical blocks written
averaged over a 10 second period.