FTAM/9000 Programmer's Guide

410 Chapter 10
Example Programs
Common Code Example
Api_rc outcome;
Return_code res;
struct Ft_diagnostic *diag = NULL;
/*
** Initialize the parameters with valid values.
*/
*filename = SRC_FNAME;
*requested_access = FT_FA_READ | FT_FA_REPLACE
| FT_FA_EXTEND | FT_FA_ERASE | FT_FA_READ_ATTRIBUTE
| FT_FA_CHANGE_ATTRIBUTE | FT_FA_DELETE_FILE;
*return_event_name = 2;
/*
** Initialize the input_dcb.
*/
res = ft_didcb(FTiSelect, 0, (Octet **)input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
attribute_in( & ((*input_dcb)-attributes) );
passwords_in( & ((*input_dcb)-file_passwords) );
(*input_dcb)-account = DEST_ACCOUNT;
(*input_dcb)-concurrency_control = (struct Ft_concurrency_control *)
malloc(sizeof(struct Ft_concurrency_control));
concur_cntl_in( & ((*input_dcb)-concurrency_control) );
/*
** Initialize the inout_dcb.
*/
*inout_dcb = NULL;
}
/*
**
** des_parm_in
**
** DESCRIPTION:
** This routine assigns valid values to the ft_deselect parameters.
**
**
** PARAMETERS:
** Outputs:
** return_event_name : gets signalled when the event completes
** default: SYNCHRONOUS
** input_dcb : input_dcb is NULL
** inout_dcb : contains return_code field
**
*/
void
des_parm_in(return_event_name, input_dcb, inout_dcb)
Local_event_name *return_event_name;
char **input_dcb;
struct Ft_deselect_out_dcb **inout_dcb;
{