OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-134
Example 2 in C—Moving a File Between Two
Remote Systems (in Wait Mode)
1090 /*******************************************************************/
1091
1092 /*******************************************************************/
1093 /* Initialize parameters for the FTM_WRITE_REQ_ and FTM_READ_REQ_ */
1094 /* procedures. */
1095 /*******************************************************************/
1096
1097 /*******************************************************************/
1098 /* Set the dst_fadu_op parameter to replace the destination-file */
1099 /* contents. */
1100 /*******************************************************************/
1101
1102 dst_fadu_op = ZFTM_VAL_FADU_OP_REPLACE;
1103
1104 /*******************************************************************/
1105 /* To establish a position at the beginning of an FTAM-3 type */
1106 /* file, specify a FADU of "first." */
1107 /*******************************************************************/
1108
1109 dst_fadu_id.zid = ZFTM_VAL_FADUID_FIRSTLAST;
1110 dst_fadu_id.u_zfaduid.zfirstlast = ZFTM_VAL_FADUID_FIRST;
1111
1112 src_fadu_id.zid = ZFTM_VAL_FADUID_FIRSTLAST;
1113 src_fadu_id.u_zfaduid.zfirstlast = ZFTM_VAL_FADUID_FIRST;
1114
1115 /*******************************************************************/
1116 /* The access context for an FTAM-3 type file is always */
1117 /* "unstructured access." */
1118 /*******************************************************************/
1119
1120 access_context.zcntxt = ZFTM_VAL_ACCESSCNTXT_UA;
1121 access_context.zlevelnumispresent = ZAPS_VAL_ABSENT;
1122
1123 status = FTM_WRITE_REQ_ ( dst_cepi
1124 , dst_fadu_op
1125 , (int *) &dst_fadu_id );
1126 check_status ( dst_cepi );
1127
1128 status = FTM_READ_REQ_ ( src_cepi