FTAM/9000 Programmer's Guide

216 Chapter 5
Using High Level, Context Free Functions
Copying and Moving FTAM Files (HLCF)
ft_fcopy_aet
#include %</opt/ftam/include/map.h>
#include %</opt/ftam/include/mapftam.h>
Return_code
ft_fcopy_aet(source_ascii_ddn, source_filename,
destination_ascii_ddn, destination_filename,
ae_label, return_event_name, input_dcb, inout_dcb)
char *source_ascii_ddn;
Ft_filename source_filename;
char *destination_ascii_ddn;
Ft_filename destination_filename;
Ae_label *ae_label;
Local_event_name return_event_name;
struct Ft_fcopy_in_dcb *input_dcb;
struct Ft_fcopy_out_dcb **inout_dcb;
The ft_fcopy_aet() function copies one FTAM file (contents and
attributes) to another FTAM file. The original file remains intact. The
new file contains the source file attributes and those attributes that are
automatically set (e.g., filesize).
Both ft_fcopy_aet() and ft_fcopy() can be used for copying files.
However, ft_fcopy_aet() sends both the called AE title and calling AE
title to the remote system while ft_fcopy() sends only the calling AE
title. Also, in ft_fcopy_aet(), the DDN is passed directly as an ASCII
string without any conversion while in ft_fcopy(), the DDN must be
converted and passed as an Ae_dir_name.
If the file you are copying 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 message.
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.