OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-119
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
505 /* not available, then abort the association and exit. Additional */
506 /* application-specific error handling or recovery could be */
507 /* implemented if required by an application. */
508 /*******************************************************************/
509
510 if ( src_attr_groups.zstorage != ZAPS_VAL_TRUE ||
511 src_attr_groups.zsecurity != ZAPS_VAL_TRUE )
512 {
513 printf ("Attribute groups unavailable on source association\n" );
514 abort_discard ();
515 exit(EXIT_SUCCESS);
516 }
517
518 /*******************************************************************/
519 /* Establish the destination-file FTAM regime. */
520 /*******************************************************************/
521
522 /*******************************************************************/
523 /* Set the optional parameter dst_ae_title. */
524 /*******************************************************************/
525
526 dst_ae_title.zae_title_type = ZAPS_VAL_AE_TITLE_FORMAT2;
527 dst_ae_title.zae_title_format2.zae_qualifier_ispresent =
528 ZAPS_VAL_PRESENT;
529 dst_ae_title.zae_title_format2.zae_qualifier = dst_ae_qualifier;
530 dst_ae_title.zae_title_format2.zap_title.znum_elements = num_elem;
531 memcpy (dst_ae_title.zae_title_format2.zap_title.zobj_id,
532 dst_ap_title, sizeof (dst_ap_title) );
533
534
535 /*******************************************************************/
536 /* Specify the functional units required of the destination system */
537 /* to write to a file: write, limited file management (required */
538 /* for enhanced file management), enhanced file management */
539 /* (required to change file attributes) and grouping (required by */
540 /* the file-transfer service class). */
541 /*******************************************************************/
542
543 func_units.zread = ZAPS_VAL_FALSE;