FTAM/9000 Programmer's Guide
Chapter 10 385
Example Programs
Common Code Example
/*
** Change the attributes of the destination file.
**
** Get the parameters for ft_fcattributes.
** Call ft_fcattributes and verify the outcome.
*/
(void)printf(“Changing attributes of the destination file...\n”);
fca_parm_in( & destination_dirname, & destination_filename,
& ae_label, & return_event_name, & fca_input_dcb,
& fca_inout_dcb );
res = ft_fcattributes(destination_dirname, destination_filename,
& ae_label, return_event_name, fca_input_dcb,
& fca_inout_dcb);
if (res != SUCCESS)
error_handler(fca_inout_dcb-result, fca_inout_dcb-diagnostic);
/*
** Free memory.
*/
res = ft_dfdcb((Octet *)fca_input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
res = ft_dfdcb((Octet *)fca_inout_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
/*
** Delete the source file.
**
** Get the parameters for ft_fdelete.
** Call ft_fdelete and verify the outcome.
*/
(void)printf(“Deleting the source file...\n”);
fde_parm_in( & source_dirname, & source_filename,
& ae_label, & return_event_name, & fde_input_dcb,
& fde_inout_dcb );
res = ft_fdelete(source_dirname, source_filename, & ae_label,
return_event_name, fde_input_dcb, & fde_inout_dcb);
if (res != SUCCESS)
error_handler(fde_inout_dcb-result, fde_inout_dcb-diagnostic);
/*
** Free memory.
*/
res = ft_dfdcb((Octet *)fde_input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
res = ft_dfdcb((Octet *)fde_inout_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
(void)printf(“ftm_hlcopy: finished\n”);
return(SUCCESS);
}