OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-106
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1 /*************************************************************************/
2 /* */
3 /* Example 2 in C - Moving an FTAM-3 File Between Two Remote Systems */
4 /* (in Wait Mode) */
5 /* */
6 /************************************************************************/
7 /* */
8 /* Program Name: EXCMOVF3 */
9 /* */
10 /* Program Description: */
11 /* */
12 /* This program, in wait mode, moves an FTAM-3 file between two re- */
13 /* mote systems on an OSI network. The application initiates and */
14 /* manages the file transfer. It issues requests and receives */
15 /* indications and confirms from the two remote systems and acts on */
16 /* them accordingly. At the end of file transfer, the source file is */
17 /* deleted. */
18 /* */
19 /* The main procedure contains all of the code for establishing the */
20 /* required FTAM protocol regimes, managing the data transfer, and */
21 /* normally terminating each regime for both associations. */
22 /* */
23 /* Apart from the main procedure, there is a procedure to receive FTAM */
24 /* events, a general-purpose procedure used by error-handling */
25 /* routines to abort and discard associations, and five error- */
26 /* handling procedures that handle different types of errors: */
27 /* */
28 /* get_event A routine called after a request is sent */
29 /* to a remote responder to wait for the */
30 /* respective confirm. It also can */
31 /* receive FTM indications. */
32 /* */
33 /* abort_discard A routine called by the error-handling */
34 /* routines that is used to abort and */
35 /* discard the associations. */
36 /* */