OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-47
Writing a File: TAL Programming Example
194 ! Incorporate SIO definitions and literals. Allocate run-unit control !
195 ! block space. Allocate file control block space for the local file. !
196 ! Declare the record length, file code, buffer length, and file !
197 ! pointer for the local file. !
198 !---------------------------------------------------------------------!
199
200 ?nolist
201 ?source $system.system.gpldefs
202 ?list
203
204 ALLOCATE^CBS ( RUCB, COMMFCB, 1 );
205 ALLOCATE^FCB ( FTAMFLE, " TEMP " );
206
207 LITERAL
208 reclen = 134,
209 filecode = 101,
210 block^buf^len = 2048;
211
212 INT .File^ptr;
213
214 INT .block^buf [0:block^buf^len/2 - 1];
215
216 !---------------------------------------------------------------------!
217 ! End global data declarations !
218 !---------------------------------------------------------------------!
219
220 !---------------------------------------------------------------------!
221 ! External function declarations for FTM, APS, and Guardian !
222 !---------------------------------------------------------------------!
223
224 ?nolist
225 ?source extdecs0 ( FTM_INITIALIZE_REQ_
226 ? , FTM_INITIALIZE_CNF_
227 ? , FTM_BEGIN_GROUP_REQ_
228 ? , FTM_END_GROUP_REQ_
229 ? , FTM_CREATE_REQ_
230 ? , FTM_CREATE_CNF_
231 ? , FTM_OPEN_REQ_
232 ? , FTM_OPEN_CNF_