OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-122
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
622 /* implemented if required by an application. */
623 /*******************************************************************/
624 if ( dst_attr_groups.zstorage != ZAPS_VAL_TRUE ||
625 dst_attr_groups.zsecurity != ZAPS_VAL_TRUE )
626 {
627 printf ("Attribute groups unavailable on destination association\n" );
628
629 abort_discard ();
630 exit(EXIT_SUCCESS);
631 }
632
633 /*******************************************************************/
634 /* Set the document type in the contents_type structure to FTAM-3. */
635 /*******************************************************************/
636
637 contents_type.zid = ZFTM_VAL_CNTNTSTYPE_DOCTYPE;
638contents_type.u_zcntntstype.zdoctype.zdoctypename.znum_elements= num_elem;
639 memcpy( contents_type.u_zcntntstype.zdoctype.zdoctypename.zobj_id,
640 ftam_doc_type, sizeof (ftam_doc_type) );
641
642 /*******************************************************************/
643 /* Set MSL to present and set string length to 512 bytes. */
644 /*******************************************************************/
645
646 contents_type.u_zcntntstype.zdoctype.zmaxstringlenispresent
647 = ZAPS_VAL_PRESENT;
648 contents_type.u_zcntntstype.zdoctype.zmaxstringlen = 512;
649
650 /*******************************************************************/
651 /* Set the remaining elements of document type to ZAPS_VAL_ABSENT. */
652 /*******************************************************************/
653
654 contents_type.u_zcntntstype.zdoctype.zuniversalclassispresent
655 = ZAPS_VAL_ABSENT;
656 contents_type.u_zcntntstype.zdoctype.zstringsigispresent
657 = ZAPS_VAL_ABSENT;
658 contents_type.u_zcntntstype.zdoctype.zfileattrsispresent
659 = ZAPS_VAL_ABSENT;
660