Open System Services System Calls Reference Manual (G06.28+)

System Functions (s and S) SPT_FILE_CLOSE_(2)
NAME
SPT_ FILE_CLOSE_ - closes an open Guardian le
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <cextdecs.h>]
#include <spthread.h>
short SPT_FILE_CLOSE_ (
short lenum,
[short tape_disposition ]
);
PARAMETERS
filenum species the le number of a Guardian le open instance that identies the le to
be closed.
tape_disposition
Indicates the tape control action to take:
0 Rewind and unload; do not wait for completion.
1 Rewind and unload, do not wait for completion.
2 Rewind and leave online; do not wait for completion.
3 Rewind and leave online; wait for completion.
4 Do not rewind; leave online.
Other input values result in no error if the le is a tape device; the control action
might be unpredictable. If this parameter is omitted, 0 (zero) is used.
DESCRIPTION
The SPT_ FILE_CLOSE_ () function is the thread-aware version of the Guardian
FILE_CLOSE_ procedure.
The FILE_CLOSE_ procedure closes a Guardian le open instance. Closing a le open instance
terminates access to the le through that open instance. You can use SPT_FILE_CLOSE_() to
close les that were opened by SPT_FILE_OPEN_().
For programming information about the FILE_CLOSE_ procedure, see the Enscribe
Programmers Guide and the Guardian Programmers Guide.
Considerations
Returning space allocation after closing a file
Closing a disk le causes the space that is used by the resident le control block
to be returned to the system main-memory pool if the disk le is not open con-
currently. A temporary disk le is purged if the le was not open concurrently.
Any space that is allocated to that le is made available for other les. With any
le closure, the space allocated to the access control block (ACB) is returned to
the system.
527186-005 Hewlett-Packard Company 7133