OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-135
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1129 , (int *) &src_fadu_id
1130 , (int *) &access_context );
1131 check_status ( src_cepi );
1132
1133 /*******************************************************************/
1134 /* Wait for a data indication from the source association. As each */
1135 /* indication is received, call FTM_DATA_IND_ to retrieve the data */
1136 /* and then FTM_DATA_REQ_ to send the data to the destination */
1137 /* system. */
1138 /* */
1139 /* Repeat this process until a data-end indication arrives from */
1140 /* the source or a cancel or abort indication is received from */
1141 /* either system. */
1142 /*******************************************************************/
1143
1144 do
1145 {
1146
1147 /*****************************************************************/
1148 /* Wait for either a data indication, a data-end indication, or */
1149 /* a cancel indication from the source system. Set event to */
1150 /* ANYEVENT since more than one event code is valid. */
1151 /*****************************************************************/
1152
1153 event = ANYEVENT;
1154 get_event ( &event, src_cepi );
1155
1156 switch ( event )
1157 {
1158 case ZFTM_VAL_EVT_DATA_IND :
1159
1160 src_more_data = 1;
1161 src_start_position = 0;
1162
1163 while ( src_more_data != 0 )
1164 {
1165 /************************************************************/
1166 /* Call FTM_DATA_IND_ to read data from the source system. */
1167 /************************************************************/