FTAM/9000 Programmer's Guide

Chapter 8 319
Transferring HP FTAM/9000 Data
Writing Data
Writing Data
Use ft_write() and ft_sdata() to write data.
Use ft_write() to request permission to write information to a file and
to specify what to write (from the initiator to the responder).
Use ft_sdata() to send data.
ft_write()
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_write (connection_id, fadu_identity, fadu_operation,
return_event_name, input_dcb, inout_dcb)
Connection_id connection_id;
struct Ft_fadu_identity fadu_identity;
enum Ft_fadu_operation fadu_operation;
Local_event_name return_event_name;
char *input_dcb;
struct Ft_write_out_dcb **inout_dcb;
Use ft_write() to write data to a specific filestore by identifying a FADU
to which you want to write. You can only write to a file as follows.
FTAM-1, FTAM-3, and
INTAP-1
FTAM-2
To write over the existing
FADU,
fadu_identity.fadu_location
must be FT_FIRST and
fadu_operation must be
FT_REPLACE.
To write to the end of the
FADU,
fadu_identity.fadu_location
must be FT_FIRST and
fadu_operation must be
FT_EXTEND.
You can only write to the end of
the file. The
fadu_identity.fadu_location must
be FT_END and fadu_operation
must be FT_INSERT.