OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-131
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
973 /*******************************************************************/
974
975 override = ZFTM_VAL_OVR_CREATE_NEW;
976
977 /*******************************************************************/
978 /* Set the requested_access parameter to provide replace and */
979 /* change-attribute access on the file. */
980 /*******************************************************************/
981
982 requested_access.zread = ZAPS_VAL_FALSE;
983 requested_access.zreplace = ZAPS_VAL_TRUE;
984 requested_access.zreadattr = ZAPS_VAL_FALSE;
985 requested_access.zchngattr = ZAPS_VAL_TRUE;
986 requested_access.zdelete = ZAPS_VAL_FALSE;
987
988 /*******************************************************************/
989 /* Provide the access password for each action to be performed on */
990 /* the file. */
991 /*******************************************************************/
992
993 access_passwords.zreadpasswd.zlen = 0;
994 access_passwords.zinsertpasswd.zlen = 0;
995 access_passwords.zreplacepasswd.zlen = strlen (password);
996 memcpy (access_passwords.zreplacepasswd.u_zc.zb, password,
997 access_passwords.zreplacepasswd.zlen );
998 access_passwords.zextendpasswd.zlen = 0;
999 access_passwords.zerasepasswd.zlen = 0;
1000 access_passwords.zreadattrpasswd.zlen = 0;
1001 access_passwords.zchngattrpasswd.zlen = strlen (password);
1002 memcpy (access_passwords.zchngattrpasswd.u_zc.zb, password,
1003 access_passwords.zchngattrpasswd.zlen );
1004 access_passwords.zdeletepasswd.zlen = 0;
1005
1006 /*******************************************************************/
1007 /* Initialize parameters for the FTM_OPEN_REQ_ procedure call. */
1008 /*******************************************************************/
1009
1010 /*******************************************************************/
1011 /* Set up the processing mode to perform a replace action on the */