OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-59
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
115 LITERAL NOWAIT = 0D; ! Indicates nowait mode !
116 LITERAL WAIT_FOREVER = -1D; ! MFM_AWAITIOX_ wait value !
117 LITERAL FALSE = 0; ! Boolean value for FALSE !
118 LITERAL TRUE = 1; ! Boolean value for TRUE !
119 LITERAL MAX_RECORDS = 5; ! Maximum number of records !
120 LITERAL BASE = 10; ! Used with DNUMOUT as base !
121 LITERAL MAX_BUF = 250; ! Maximum bytes to send !
122 LITERAL MAX_READ_COUNT = 132; ! Maximum bytes to read !
123 LITERAL OPEN_FLAGS = 1; ! Open for nowait read !
124
125
126 !----------------------------------------------------------------------!
127 ! Environment-specific fields !
128 ! You will need to change these fields to reflect your FTAM !
129 ! environment. local_file must contain a valid expanded Guardian !
130 ! file name (in internal format), and remote_file_name must contain !
131 ! a valid file name for the remote system. In this example, !
132 ! remote_file_name is shown as a Guardian file name. !
133 ! !
134 ! When changing these values, you might also need to change !
135 ! the length of the corresponding variables (array size). !
136 !----------------------------------------------------------------------!
137
138 STRING .EXT local_appl_name[0:4] := "APPL1";
139 STRING .EXT responding_appl_name[0:4] := "APPL2";
140 STRING .EXT manager_name[0:23] := "$APMGR ";
141 INT .local_file[0:11] := "$VOLUME SUBVOL LOCALF ";
142 STRING .EXT remote_file_name[0:21] := "$VOLUME.SUBVOL.REMOTEF";
143
144
145 !----------------------------------------------------------------------!
146 ! Miscellaneous variables !
147 !----------------------------------------------------------------------!
148
149 INT event_code; ! FTAM event code !
150 INT(32) tag; ! Tag value for nowait I/O !
151 INT records := 0; ! Number of records sent !
152 INT local_filenum; ! Local file number !
153 INT cepi := NOCEPI; ! Connection endpoint id !