OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-59
Writing a File: TAL Programming Example
661 ! be implemented if required by an application. !
662 !------------------------------------------------------------------!
663 IF ( func_units.zwrite <> ZAPS^VAL^TRUE OR
664 func_units.zfilemgmt <> ZAPS^VAL^TRUE OR
665 func_units.zgroup <> ZAPS^VAL^TRUE ) THEN
666 BEGIN
667 tempbuf ':=' "Functional units unavailable on association"
668 -> @text_ptr;
669 text_len := @text_ptr - @tempbuf;
670 CALL WRITE ( termnum, outbuf, text_len );
671
672 status := FTM_U_ABORT_REQ_ ( cepi
673 , ! action result !
674 , ! diagnostics ! );
675 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
676 CALL check_status;
677
678 CALL APS_DISCARD_ ( cepi );
679 tempbuf ':=' "Association discarded" -> @text_ptr;
680 text_len := @text_ptr - @tempbuf;
681 CALL WRITE ( termnum, outbuf, text_len );
682 CALL STOP;
683 END;
684
685 CALL file_selection_open_regime;
686
687 !------------------------------------------------------------------!
688 ! Terminate the FTAM regime. !
689 !------------------------------------------------------------------!
690
691 status := FTM_TERMINATE_REQ_ ( cepi );
692 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
693 CALL check_status;
694
695 event := ZFTM^VAL^EVT^TERMINATE^CNF;
696 CALL get_event ( event );
697
698 !------------------------------------------------------------------!
699 ! The charging parameter is used to convey information about costs !