OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-72
Writing a File: TAL Programming Example
1168 IF ( action_result = ZFTM^VAL^ACTION^FAILURE ) THEN
1169 CALL check_action;
1170
1171
1172 END; --- data_transfer_regime ---
1173
1174
1175 ?PAGE "GET_EVENT"
1176 !--------------------------------------------------------------------!
1177 ! !
1178 ! Name: get_event !
1179 ! !
1180 ! Description: The get_event procedure gets an available event. It !
1181 ! verifies that the event is the expected event and !
1182 ! that there are no errors associated with it. If an !
1183 ! unexpected event is received, it sends an !
1184 ! error message. !
1185 !--------------------------------------------------------------------!
1186
1187 PROC get_event ( expected_event );
1188
1189 INT .EXT expected_event;
1190
1191 BEGIN
1192 INT event;
1193 INT .EXT event_code := $XADR(event);
1194
1195 !-----------------------------------------------------------------!
1196 ! Wait for an event to be received. !
1197 !-----------------------------------------------------------------!
1198
1199 status := APS_EVENT_RECEIVE_ ( cepi, WAIT_FOREVER );
1200 IF ( status <> ZAPS^VAL^STATUS^EVENT ) THEN
1201 CALL check_status;
1202
1203 !-----------------------------------------------------------------!
1204 ! Get the event code. !
1205 !-----------------------------------------------------------------!
1206