OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-40
Example 1 in C—Updating a Remote File (in Nowait
Mode)
1091
1092 void open_cnf_write_req ()
1093
1094 {
1095
1096 /******************************************************************/
1097 /* Retrieve the file-open confirm data. */
1098 /******************************************************************/
1099
1100 error = FTM_FILE_OPEN_CNF_ ( cepi
1101 , &state_result
1102 , &action_result
1103 , (int *) &remote_file
1104 , /* initial_attr */
1105 , (int *) &contents_type
1106 , (int *) &diag );
1107
1108 check_error ();
1109
1110 /******************************************************************/
1111 /* Check the state result and the action result. */
1112 /******************************************************************/
1113
1114 check_action_diag ();
1115 if ( state_result == ZFTM_VAL_STATE_FAILURE )
1116 {
1117 bad_state ();
1118 }
1119
1120 /**************************** **************************************/
1121 /* Send a write-request primitive to the remote responder to */
1122 /* establish the data-transfer regime. Set up the required */
1123 /* parameters and call FTM_WRITE_REQ_. */
1124 /*******************************************************************/
1125
1126 /*******************************************************************/
1127 /* Use the insert operation to append records to an FTAM-2 file. */
1128 /*******************************************************************/
1129