OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-203
Example 2 in TAL—Moving a File Between Two
Remote Systems (in Wait Mode)
1636 ?PAGE "GET_EVENT"
1637 !---------------------------------------------------------------------!
1638 ! !
1639 ! Name: get_event !
1640 ! !
1641 ! Description: The get_event procedure gets an available event. It !
1642 ! verifies that the event is the expected event and !
1643 ! that there are no errors associated with it. If an !
1644 ! unexpected event is received, it calls bad_event to !
1645 ! process the error. !
1646 ! !
1647 ! Input: Expected_event, the event that is expected to be !
1648 ! received on the association !
1649 ! !
1650 ! CEPI identifying the association that carries the !
1651 ! event !
1652 ! !
1653 ! Output: expected_event, which contains the received event !
1654 ! !
1655 !---------------------------------------------------------------------!
1656
1657 PROC get_event ( expected_event, cepi );
1658
1659 INT .EXT expected_event;
1660 INT cepi;
1661
1662 BEGIN
1663 INT event;
1664 INT .EXT event_code := $XADR(event);
1665
1666 !------------------------------------------------------------------!
1667 ! Wait for an event to be received. !
1668 !------------------------------------------------------------------!
1669
1670 status := APS_EVENT_RECEIVE_ ( cepi, WAIT_FOREVER );
1671
1672 IF ( status <> ZAPS^VAL^STATUS^EVENT ) THEN
1673 BEGIN
1674 !----------------------------------------------------------------!