OSI/FTAM Programming Guide

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Guide528612-001
5-53
Writing a File: TAL Programming Example
427 tempbuf ':=' "Open^File for local file failed with error #"
428 -> @text_ptr;
429 @text_ptr := @text_ptr + DNUMOUT ( text_ptr
430 , $DBL (error)
431 , BASE );
432 text_len := @text_ptr - @tempbuf;
433 CALL WRITE ( termnum, outbuf, text_len );
434 CALL STOP;
435 END;
436
437 CALL ftam_regime;
438
439 !--------------------------------------------------------------------!
440 ! Display a message on the terminal stating that the program !
441 ! completed successfully. !
442 !--------------------------------------------------------------------!
443
444 tempbuf ':=' "Remote file written successfully" -> @text_ptr;
445 text_len := @text_ptr - @tempbuf;
446 CALL WRITE ( termnum, outbuf, text_len );
447
448 END; --- appl_prog ---
449
450
451 ?PAGE "FTAM_REGIME"
452 !---------------------------------------------------------------------!
453 ! !
454 ! Name: ftam_regime !
455 ! !
456 ! Description: This procedure establishes the FTAM regime and gives !
457 ! control to the file-selection regime. !
458 ! When the procedure regains control, it terminates the !
459 ! FTAM regime. !
460 !---------------------------------------------------------------------!
461
462 PROC ftam_regime;
463
464 BEGIN
465