OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-58
Writing a File: TAL Programming Example
622 text_len := @text_ptr - @tempbuf;
623 CALL WRITE ( termnum, outbuf, text_len );
624 CALL check_status;
625 END;
626
627 event := ZFTM^VAL^EVT^INITIALIZE^CNF;
628 CALL get_event ( event );
629
630 error := FTM_INITIALIZE_CNF_ ( cepi
631 , state_result
632 , action_result
633 , local_appl
634 , responding_appl
635 , remote_ae_title
636 , service_class
637 , func_units
638 , attr_groups
639 , contents_type_list
640 , diag );
641
642 IF ( error <> ZAPS^ERR^OK ) THEN
643 CALL check_error;
644
645 !------------------------------------------------------------------!
646 ! Check the state result and the action result. !
647 !------------------------------------------------------------------!
648
649 IF ( state_result = ZFTM^VAL^STATE^FAILURE ) THEN
650 CALL check_state;
651
652 IF ( action_result = ZFTM^VAL^ACTION^FAILURE ) THEN
653 CALL check_action;
654
655
656 !------------------------------------------------------------------!
657 ! Verify that the functional units have not been negotiated down !
658 ! from what was requested. If the requested functional units are !
659 ! not available, then discard the association and exit the program.!
660 ! Additional application-specific error handling or recovery could !