OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-113
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
271 void bad_event ( int event, int cepi );
272 void check_action_diag ();
273 void abort_discard ();
274
275
276 #pragma PAGE "MOVEFILE"
277 /**********************************************************************/
278 /* */
279 /* Name: movefile */
280 /* */
281 /* Description: The movefile program, written in wait mode, moves a */
282 /* file between two systems on an OSI network. This */
283 /* application initiates and manages the file transfer. */
284 /* */
285 /* Inputs: None */
286 /* */
287 /* Outputs: None */
288 /* */
289 /**********************************************************************/
290
291 main ()
292
293 {
294
295 /********************************************************************/
296 /* Allocate and initialize a segment used by the FTM and APS */
297 /* procedures. */
298 /********************************************************************/
299
300 error = APS_INITIALIZE_ ( /* swapvol */ );
301 if ( error != ZAPS_ERR_OK )
302 {
303 printf ( "Initialization of the FTAM/APS segment failed\n" );
304 exit (EXIT_SUCCESS);
305 }
306
307 /*******************************************************************/
308 /* Establish the source-file FTAM regime. */
309 /*******************************************************************/