OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-71
Writing a File: TAL Programming Example
1129
1130 !-------------------------------------------------------------!
1131 ! Call FTM_DATA_REQ_ to transfer data to the remote system. !
1132 !-------------------------------------------------------------!
1133
1134 error := FTM_DATA_REQ_ ( cepi , data_value_ptr );
1135 IF ( error <> ZAPS^ERR^OK ) THEN
1136 CALL check_error;
1137 END;
1138
1139 END
1140 UNTIL EOF_flag = 1;
1141
1142 status := FTM_DATA_END_REQ_ ( cepi );
1143 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
1144 CALL check_status;
1145
1146
1147 !--------------------------------------------------------------------!
1148 ! Send an FTM_TRANSFER_END_REQ_ call to the remote system and wait !
1149 ! for a confirm. This action terminates the data-transfer regime. !
1150 !--------------------------------------------------------------------!
1151
1152 !--------------------------------------------------------------------!
1153 ! Terminate the data-transfer regime. !
1154 !--------------------------------------------------------------------!
1155
1156 status := FTM_TRANSFER_END_REQ_ ( cepi );
1157 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
1158 CALL check_status;
1159
1160 event := ZFTM^VAL^EVT^TRANSEND^CNF;
1161 CALL get_event ( event );
1162
1163 error := FTM_TRANSFER_END_CNF_ ( cepi
1164 , action_result
1165 , diag );
1166 IF ( error <> ZAPS^ERR^OK ) THEN
1167 CALL check_error;