OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-107
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
37 /* check_status A procedure that checks status returned */
38 /* by FTM procedure calls. */
39 /* */
40 /* check_error A procedure that checks for errors */
41 /* returned by FTM procedure calls. */
42 /* */
43 /* check_state A procedure that handles a failed state */
44 /* in the remote FTAM regime. */
45 /* */
46 /* bad_event A procedure that handles unexpected */
47 /* FTAM events. */
48 /* */
49 /* check_action_diag A routine that checks the action result */
50 /* and diagnostic messages returned by an */
51 /* FTM procedure. */
52 /* */
53 /* FTM request and response procedures return an I/O status value */
54 /* on the procedure call. The check_status procedure checks the */
55 /* results of the I/O operation. The FTM indication and confirm */
56 /* procedures return an error value indicating the outcome of the */
57 /* completed service. The procedure check_error checks the returned */
58 /* error code. */
59 /* */
60 /* This example is provided to illustrate FTAM programming concepts. */
61 /* It does not necessarily illustrate the recommended programming */
62 /* style for a real application, which might be more modularized to */
63 /* provide a higher level of top-down coding, for instance. To en- */
64 /* hance the illustration of FTAM programming concepts, this example */
65 /* demonstrates programming tasks in sequence, emphasizing a more */
66 /* linear approach to coding. */
67 /***********************************************************************/
68 /* */
69 /* NOTE : Before attempting to run this program, set the following */
70 /* items correctly: */
71 /* */
72 /* a) environmental variables */
73 /* b) required parameters for the FTM_INITIALIZE_REQ_ call */
74 /* */
75 /***********************************************************************/