OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-136
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1168
1169 error = FTM_DATA_IND_ ( src_cepi
1170 , (long) MAX_BUF
1171 , (char *) &data_value
1172 , (long *) &src_more_data
1173 , (long *) &src_next_position
1174 , src_start_position );
1175 check_error ();
1176
1177 /************************************************************/
1178 /* Call FTM_DATA_REQ_ to write data to the remote system. */
1179 /************************************************************/
1180
1181 status = FTM_DATA_REQ_ ( dst_cepi
1182 , (char *) &data_value );
1183 check_status ( dst_cepi );
1184
1185 src_start_position = src_next_position;
1186 }
1187 break;
1188
1189 case ZFTM_VAL_EVT_DATAEND_IND :
1190
1191 /*************************************************************/
1192 /* Call the data-end indication procedure to check the error */
1193 /* status and action result. Then call FTM_DATA_END_REQ_ */
1194 /* to notify the destination system that the data transfer */
1195 /* has ended. */
1196 /*************************************************************/
1197
1198 error = FTM_DATA_END_IND_ ( src_cepi
1199 , (long *) &action_result
1200 , (int *) &diag );
1201 check_error ();
1202 check_action_diag ();
1203
1204 status = FTM_DATA_END_REQ_ ( dst_cepi
1205 , action_result );
1206 check_status ( dst_cepi );