OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-17
Example 1 in C—Updating a Remote File (in Nowait
Mode)
193 long buffer_addr; /* Returned buffer address */
194 int count_transferred; /* Number of bytes read */
195 int buf_count_transferred; /* Holding place for # of bytes */
196
197 /**********************************************************************/
198 /* Variables used by the FTM procedures */
199 /**********************************************************************/
200
201 long file_status; /* Used by file-open request */
202 long delete_action; /* Do not delete after close */
203 long state_result; /* Status of regime change */
204 long action_result; /* Status of FTAM operation */
205 long fadu_op; /* Insert operation is used */
206 int document_type[5] = /* Object ID for FTAM-2 */
207 { 1, 0, 8571, 5, 2 };
208
209 /**********************************************************************/
210 /* Boolean variables used to manage nowait I/O processing */
211 /**********************************************************************/
212
213 int local_read_io_cmplt = TRUE; /* Local file read completed */
214 int remote_io_cmplt = TRUE; /* Data-req to remote completed*/
215 int remote_file_update_cmplt = FALSE; /* While loop control flag */
216 int file_update_failed = TRUE; /* Remote file update failed */
217
218 /**********************************************************************/
219 /* Error-handling variables */
220 /**********************************************************************/
221
222 int status; /* Used for I/O-request calls */
223 int error; /* Used for confirm calls */
224 int error_code; /* Returns error code */
225 int error_subcode; /* Returns error subcode */
226
227
228 /***********************************************************************/
229 /* Structures used by the FTM procedures */
230 /**********************************************************************/
231