OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-193
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1246
1247 src_more_data := 1D;
1248 src_start_position := 0D;
1249
1250 WHILE ( src_more_data <> 0D ) DO
1251 BEGIN
1252 !--------------------------------------------------------------!
1253 ! Call FTM_DATA_IND_ to read data from the source system. !
1254 !--------------------------------------------------------------!
1255
1256 error := FTM_DATA_IND_ ( src_cepi
1257 , $dbl(MAX_BUF)
1258 , data_value_ptr
1259 , src_more_data
1260 , src_next_position
1261 , src_start_position );
1262 CALL check_error;
1263
1264 !--------------------------------------------------------------!
1265 ! Call FTM_DATA_REQ_ to write data to the remote system. !
1266 !--------------------------------------------------------------!
1267
1268 status := FTM_DATA_REQ_ ( dst_cepi
1269 , data_value_ptr );
1270 CALL check_status ( dst_cepi );
1271
1272 src_start_position := src_next_position;
1273 END;
1274 END
1275
1276
1277 ELSE IF ( event = ZFTM^VAL^EVT^DATAEND^IND ) THEN
1278 BEGIN
1279
1280 !---------------------------------------------------------------!
1281 ! Call the data-end indication procedure to check the error !
1282 ! status and action result. Then call FTM_DATA_END_REQ_ !
1283 ! to notify the destination system that the data transfer has !
1284 ! ended. !