FTAM/9000 Programmer's Guide
370 Chapter 10
Example Programs
Using LLCS Functions Example
/*
** Free memory.
*/
res = ft_dfdcb((Octet *)eda_input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
res = ft_dfdcb((Octet *)eda_inout_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
/*
** End the transfer of data to the source and destination files.
**
** Get the parameters for ft_etransfer.
** Call ft_etransfer and verify the outcome.
*/
(void)printf(“Ending data transfer for the source file”);
(void)printf(“ & the destination file...\n”);
for (i = 0; i TWO_CONNECTIONS; ++i) {
etr_parm_in( & return_event_name, & etr_input_dcb, & etr_inout_dcb );
res = ft_etransfer(conn_id[i], return_event_name, etr_input_dcb,
& etr_inout_dcb);
if (res != SUCCESS)
error_handler(etr_inout_dcb->result, etr_inout_dcb->diagnostic);
/*
** Free memory.
*/
res = ft_dfdcb((Octet *)etr_inout_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
}
/*
** Perform a grouped activity on the source and destination files.
** ft_bgroup
** ft_close
** ft_deselect
** ft_egroup
**
** Get the parameters for ft_bgroup.
** Call ft_bgroup and verify the outcome.
*/
(void)printf(“Closing and deselecting the source file”);
(void)printf(“ & the destination file...\n”);
for (i = 0; i TWO_CONNECTIONS; ++i) {
bgr_parm_in( & threshold, & return_event_name, & bgr_input_dcb,
& bgr_inout_dcb );
res = ft_bgroup(conn_id[i], threshold, return_event_name,
bgr_input_dcb, & bgr_inout_dcb);
if (res != SUCCESS)
error_handler(bgr_inout_dcb->result, diag);
/*
** Get the parameters for ft_close.
** Call ft_close and verify the outcome.
*/
clo_parm_in( & return_event_name, & clo_input_dcb, & clo_inout_dcb );
res = ft_close(conn_id[i], return_event_name, clo_input_dcb,
& clo_inout_dcb);
if (res != SUCCESS)
error_handler(clo_inout_dcb->result, clo_inout_dcb->diagnostic);