OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-65
Example 1 in TAL—Updating a Remote File (in
Nowait Mode)
349 BEGIN
350 tempbuf ':=' "$RECEIVE open error" -> @text_ptr;
351 text_len := @text_ptr - @tempbuf;
352 CALL WRITE ( termnum, outbuf, text_len );
353 CALL STOP;
354 END;
355
356 CALL READ ( fn, startup, $len(startup));
357 IF <> THEN
358 BEGIN
359 tempbuf ':=' "$RECEIVE read error" -> @text_ptr;
360 text_len := @text_ptr - @tempbuf;
361 CALL WRITE ( termnum, outbuf, text_len );
362 CALL STOP;
363 END;
364
365 CALL CLOSE ( fn );
366
367 !--------------------------------------------------------------------!
368 ! Open the local Guardian file for reading in nowait mode. !
369 !--------------------------------------------------------------------!
370
371 CALL OPEN ( local_file
372 , local_filenum
373 , OPEN_FLAGS);
374
375 IF <> THEN
376 BEGIN
377 CALL FILEINFO ( local_filenum, file_error );
378 tempbuf ':=' "Local file open error " -> @text_ptr;
379 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
380 , $DBL ( file_error )
381 , BASE );
382 text_len := @text_ptr - @tempbuf;
383 CALL WRITE ( termnum, outbuf, text_len );
384 CALL STOP;
385 END;
386
387 !--------------------------------------------------------------------!