OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-74
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
700 ! completes. !
701 !--------------------------------------------------------------!
702
703 status := APS_EVENT_RECEIVE_ ( cepi
704 , ! WAIT_FOREVER !
705 , $dbl (EVENTREC_TAG) );
706
707 CALL check_status;
708
709 FILEOPEN_TAG,
710 TRANSFEREND_TAG,
711 FILECLOSE_TAG,
712 TERMINATE_TAG ->
713 !--------------------------------------------------------------!
714 ! These requests do not require any action. The !
715 ! ftam_event_rcvd procedure has already issued an event- !
716 ! receive. !
717 !--------------------------------------------------------------!
718
719 ;
720
721 WRITE_TAG ->
722 !--------------------------------------------------------------!
723 ! The remote system is now set up for writing. Read the first !
724 ! record from the file into the local buffer. The file was !
725 ! opened in nowait mode. !
726 !--------------------------------------------------------------!
727
728 CALL READX ( local_filenum
729 , local_buffer
730 , MAX_READ_COUNT
731 , ! count_read - waited I/O only !
732 , $dbl (READ_TAG) );
733 IF <> THEN
734 BEGIN
735 CALL FILEINFO ( local_filenum, file_error );
736 tempbuf ':=' "Local file error " -> @text_ptr;
737 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
738 , $DBL ( file_error )