FTAM/9000 Programmer's Guide

Chapter 5 221
Using High Level, Context Free Functions
Copying and Moving FTAM Files (HLCF)
ft_fmove_aet()
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_fmove_aet(source_ascii_ddn, source_filename,
destination_ascii_ddn, destination_filename,
ae_label, return_event_name, input_dcb, inout_dcb)
char *source_dirname;
Ft_filename source_filename;
char *destination_dirname;
Ft_filename destination_filename;
Ae_label *ae_label;
Local_event_name return_event_name;
struct Ft_fmove_in_dcb *input_dcb;
struct Ft_fmove_out_dcb **inout_dcb;
The ft_fmove_aet() function moves a file from one filestore to another
(i.e., moves source_filename in the source_dirname filestore to
destination_filename in the destination_dirname filestore). The new file
contains the source file attributes that are automatically set (e.g.,
filesize).
Both ft_fmove_aet() and ft_fmove() are used for moving files.
However, ft_fmove_aet() sends bot the Called AE Title and calling AE
title to the remote system while ft_fmove() sends only the calling AE
title. Also, in ft_fmove_aet(), the DDN is passed directly as an ASCII
string without conversion while in ft_move(), the DDN has to be
converted and passed as an Ae_dir_name.
If the file you are moving to already exists, the outcome depends on
how you set input_dcb->overwrite. If input_dcb->overwrite is set to
FT_RECREATE_FILE, FTAM copies the source file over the existing
destination file. If the value is FT_DONT_RECREATE_FILE, FTAM
does not copy the source file over the existing file, the function fails,
and you receive an error.
NOTE The following points do not apply to HP–UX FTAM responders. HP–UX
FTAM responders do not use these fields. The information is provided
here because other implementations may use these fields.
If the file has access control elements, and an identity field matches
the source_init_id, the input_dcb->src_concur_cntl must be a subset
of the values stored in the conc_access field of struct
Ft_access_control_element.