FTAM/9000 Programmer's Guide

406 Chapter 10
Example Programs
Common Code Example
/*
** Set the directory distinguished names to identify the
** responders on the source and destination nodes.
*/
convert_ddn(source_dirname, LOCAL_RESP);
convert_ddn(destination_dirname, REMOTE_RESP);
/*
** Initialize the filenames.
*/
*source_filename = SRC_FNAME;
*destination_filename = DEST_FNAME;
*ae_label = NULL;
*return_event_name = SYNCHRONOUS;
/*
** Initialize the input_dcb.
*/
res = ft_didcb(FTiFCopy, 0, (Octet **)input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
(*input_dcb)-source_init_id = SRC_ID;
(*input_dcb)-source_filestore_pw.pointer = (Octet *)SRC_PW;
(*input_dcb)-source_filestore_pw.length = SRC_PW_LEN;
(*input_dcb)-source_account = SRC_ACCOUNT;
passwords_in( & ((*input_dcb)-source_file_passwords) );
(*input_dcb)-dest_init_id = DEST_ID;
(*input_dcb)-dest_filestore_pw.pointer = (Octet *)DEST_PW;
(*input_dcb)-dest_filestore_pw.length = DEST_PW_LEN;
(*input_dcb)-dest_account = DEST_ACCOUNT;
passwords_in( & ((*input_dcb)-dest_file_passwords) );
(*input_dcb)-create_file_pw.pointer = (Octet *)CREAT_PW;
(*input_dcb)-create_file_pw.length = CREAT_PW_LEN;
(*input_dcb)-overwrite = FT_RECREATE_FILE;
/*
** Initialize the inout_dcb.
*/
*inout_dcb = NULL;
}