OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-81
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
973 !--------------------------------------------------------------------!
974
975 !--------------------------------------------------------------------!
976 ! Initialize the remote-file-name parameter. The remote-file-name !
977 ! format is dependent on the remote system. !
978 !--------------------------------------------------------------------!
979
980 remote_file.zlen := $occurs(remote_file_name);
981 remote_file.zb ':=' remote_file_name FOR remote_file.zlen BYTES;
982
983 !--------------------------------------------------------------------!
984 ! If the remote file exists, it is selected and opened. If the file !
985 ! does not exist, the file-open request fails. !
986 !--------------------------------------------------------------------!
987
988 file_status := ZFTM^VAL^FOPEN^OLD;
989
990 !--------------------------------------------------------------------!
991 ! Set up the following remote file-access parameter required for !
992 ! this application: insert. !
993 !--------------------------------------------------------------------!
994
995 requested_access.zread := ZAPS^VAL^FALSE;
996 requested_access.zinsert := ZAPS^VAL^TRUE;
997 requested_access.zreplace := ZAPS^VAL^FALSE;
998 requested_access.zextend := ZAPS^VAL^FALSE;
999 requested_access.zerase := ZAPS^VAL^FALSE;
1000 requested_access.zreadattr := ZAPS^VAL^FALSE;
1001 requested_access.zchngattr := ZAPS^VAL^FALSE;
1002 requested_access.zdelete := ZAPS^VAL^FALSE;
1003
1004 !--------------------------------------------------------------------!
1005 ! Set up the following remote file process-mode parameter required !
1006 ! for this application: insert. !
1007 !--------------------------------------------------------------------!
1008
1009 process_mode.zread := ZAPS^VAL^FALSE;
1010 process_mode.zinsert := ZAPS^VAL^TRUE;
1011 process_mode.zreplace := ZAPS^VAL^FALSE;