TPFxd_archiveEnd: Inform the archive facility that the request has ended
This function informs the archive facility that the request has ended and the external device is no longer needed.
Format
#include <tpf/c_tpxd.h>
int TPFxd_archiveEnd (TPFxd_extToken *token); - token
- The returned token from the TPFxd_archiveStart request.
Normal return
A return code of 1 indicates a normal return.
Error return
An error return is indicated by a negative return code. For a list of error codes applicable to this function, see Error codes.
Programming considerations
- If the TPFxd_open request was completed successfully, a TPFxd_close function must be completed before issuing a TPFxd_archiveEnd request.
- The token that was allocated when the TPFxd_archiveStart function was issued will be released.
- The TPFxd_archiveEnd request will ensure that any data written to the external device has been written successfully to the device and is not residing in any host or device buffers.
Examples
The following example starts the
archive process for a device that allows immediate data retrieval
and then ends the archive process.
#include <tpf/c_tpxd.h>
int example()
{
TPFxd_extToken *token;
enum tpxd_mode mode;
enum tpxd_opts access;
token = NULL;
mode = WT;
access = IMMEDIATE;
TPFxd_archiveStart (&token, mode, access);
⋮
TPFxd_archiveEnd (token);
⋮
}Related information
- TPFxd_archiveStart: Start the archive support facility
- close: Shut down a socket
- TPFxd_open: Fulfill any mount or positioning required.
See External device support overview for more information about this function and z/TPF C/C++ language support.