OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-124
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
700 /* Provide the access password for each action to be performed on */
701 /* the file. */
702 /*******************************************************************/
703
704 access_passwords.zreadpasswd.zlen = strlen (password);
705 memcpy(access_passwords.zreadpasswd.u_zc.zb, password,
706 access_passwords.zreadpasswd.zlen);
707 access_passwords.zinsertpasswd.zlen = 0;
708 access_passwords.zreplacepasswd.zlen = 0;
709 access_passwords.zextendpasswd.zlen = 0;
710 access_passwords.zerasepasswd.zlen = 0;
711 access_passwords.zreadattrpasswd.zlen = strlen (password);
712 memcpy ( access_passwords.zreadattrpasswd.u_zc.zb, password,
713 access_passwords.zreadattrpasswd.zlen );
714 access_passwords.zchngattrpasswd.zlen = 0;
715 access_passwords.zdeletepasswd.zlen = strlen (password);
716 memcpy (access_passwords.zdeletepasswd.u_zc.zb, password,
717 access_passwords.zdeletepasswd.zlen );
718
719
720 /*******************************************************************/
721 /* Initialize parameters for the FTM_READ_ATTRIB_REQ_ procedure */
722 /* call. */
723 /*******************************************************************/
724
725 /*******************************************************************/
726 /* Indicate which file attributes from the kernel and negotiated */
727 /* attribute groups are requested. This application requests all */
728 /* kernel attributes, the file-availability and future-filesize */
729 /* atttributes from the storage group, and access control from the */
730 /* security group. */
731 /*******************************************************************/
732
733 /* kernel group */
734 attr_names.zfilename = ZAPS_VAL_TRUE;
735 attr_names.zpermittedactions = ZAPS_VAL_TRUE;
736 attr_names.zcntntstype = ZAPS_VAL_TRUE;
737
738 /* Storage group */