Guardian Programmer's Guide

Table Of Contents
Using the Sequential Input/Output Procedures
Guardian Programmer’s Guide 421922-014
15 - 22
Sample Initialization
! If interactive, then set up the access mode for the input
! file for reading and writing. There is no need to set
! the output file because it refers to the same file:
IF INTERACTIVE THEN
CALL SET^FILE(INFILE,ASSIGN^OPENACCESS,
READWRITE^ACCESS)
! If the the input and output files are different, then set
! up the access mode for the input file as read only and
! the access mode of the output file as write only:
ELSE BEGIN
CALL SET^FILE(INFILE,ASSIGN^OPENACCESS,
READ^ACCESS);
CALL SET^FILE(OUTFILE,ASSIGN^OPENACCESS,
WRITE^ACCESS);
END;
END;