FTAM/9000 Programmer's Guide
288 Chapter 7
Managing and Accessing HP FTAM/9000 Files
Opening and Closing Files (HLCS)
Opening and Closing Files (HLCS)
Use ft_fopen() and ft_fclose() to open and close files, respectively, using
only one high level call.
ft_fopen() (HLCS)
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_fopen (connection_id, filename, file_status,
requested_access, contents_type, return_event_name,
input_dcb, inout_dcb)
Connection_id connection_id;
Ft_filename filename;
enum Ft_file_status file_status;
Ft_file_actions requested_access;
struct Ft_contents_type contents_type;
Local_event_name return_event_name;
struct Ft_fopen_in_dcb *input_dcb;
struct Ft_fopen_out_dcb **inout_dcb;
Use ft_fopen() to create or select a file and then open it with one call
(rather than invoking the low level calls ft_select() or ft_create() with
ft_open()).
• Invoke ft_fopen() in the FTAM regime to move to the File Open
regime.
• If the file already exists, the file_status parameter determines
whether a new file is created or the request fails. (Refer to the
“Ft_file_status” section in the “FTAM Data Structures” chapter for
options on setting this field.)
ft_fopen() Either selects or creates, and then opens a file
ft_fclose() Closes a file, and then either deselects or deletes a
file