OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-69
Writing a File: TAL Programming Example
1051 !--------------------------------------------------------------------!
1052
1053 PROC data_transfer_regime;
1054
1055 BEGIN
1056
1057 !------------------------------------------------------------------!
1058 ! Initialize parameters for the FTM_WRITE_REQ_ procedure. !
1059 !------------------------------------------------------------------!
1060
1061 !------------------------------------------------------------------!
1062 ! To establish a position at the beginning of an FTAM-1 type file, !
1063 ! specify a FADU of "first." !
1064 !------------------------------------------------------------------!
1065
1066 fadu_id.zid := ZFTM^VAL^FADUID^FIRSTLAST;
1067 fadu_id.zfirstlast := ZFTM^VAL^FADUID^FIRST;
1068 fadu_op := ZFTM^VAL^FADU^OP^REPLACE;
1069
1070 !------------------------------------------------------------------!
1071 ! Request a write operation. !
1072 !------------------------------------------------------------------!
1073
1074 status := FTM_WRITE_REQ_ ( cepi
1075 , fadu_op
1076 , fadu_id );
1077 IF ( status <> ZAPS^VAL^STATUS^OK ) THEN
1078 CALL check_status;
1079
1080
1081 !------------------------------------------------------------------!
1082 ! Read the local file and send the data with an FTM_DATA_REQ_ call.!
1083 ! When EOF is reached, call FTM_DATA_END_REQ_ to signal the end !
1084 ! of the file to the remote system. !
1085 !------------------------------------------------------------------!
1086
1087 EOF_flag := 0;
1088 DO
1089 BEGIN