OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-41
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1130 fadu_op = ZFTM_VAL_FADU_OP_INSERT;
1131
1132 /*******************************************************************/
1133 /* Specify the target FADU identity. Records can be inserted only */
1134 /* at the end of an FTAM-2 file. */
1135 /*******************************************************************/
1136
1137 fadu_id.zid = ZFTM_VAL_FADUID_BEGINEND;
1138 fadu_id.u_zfaduid.zbeginend = ZFTM_VAL_FADUID_END;
1139
1140 /*******************************************************************/
1141 /* Issue the write-request primitive. */
1142 /*******************************************************************/
1143
1144 status = FTM_WRITE_REQ_ ( cepi
1145 , fadu_op
1146 , (int *) &fadu_id
1147 , (long) WRITE_TAG );
1148
1149 check_status ();
1150
1151 } /* open_cnf_write_req */
1152
1153
1154 #pragma PAGE "TRANSEND_CNF_CLOSE_REQ"
1155 /*********************************************************************/
1156 /* */
1157 /* Name: transend_cnf_close_req */
1158 /* */
1159 /* Description: This procedure is called when a transfer-end confirm */
1160 /* is received. It calls FTM_TRANSFER_END_CNF_ and */
1161 /* checks the error status and state result. It then */
1162 /* calls FTM_FILE_CLOSE_REQ_ and returns to the calling */
1163 /* routine. */
1164 /* */
1165 /* Input: Transfer-end confirm */
1166 /* */
1167 /* Output: File-deselect/close request to remote responder */
1168 /* */