Guardian Programmer's Guide

Table Of Contents
Using the Sequential Input/Output Procedures
Guardian Programmer’s Guide 421922-014
15 - 20
Sample Initialization
?INSPECT, SYMBOLS
?NOLIST, SOURCE $SYSTEM.SYSTEM.GPLDEFS
?LIST
!Allocate the RUCB and the common FCB:
ALLOCATE^CBS(RUCB,COMMON^FCB,3);
!Allocate an FCB for each SIO file:
ALLOCATE^FCB(INFILE," #IN ");
ALLOCATE^FCB(OUTFILE," #OUT ");
ALLOCATE^FCB(DFILE,"$OURVOL MYSUBVOLDATAFILE");
!The following DEFINE is required because TAL does not
!support type WADDR
?IFNOT PTAL
DEFINE WADDR INT # ;
?ENDIF PTAL
!Set up input for INITIALIZER call:
LITERAL NUM^FCBS = 2; !number of FCBs
WADDR FCB^ARRAY[O:NUM^FCBS-1]; !pointers to FCBs
LITERAL PROCESS = 0, !identify process file
TERMINAL = 6; !identify terminal file
INT DEVICE^TYPE, !type of device
PHYS^REC^LEN, !length of physical record
INTERACTIVE; !set if input file same as
!output file
?NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS0(SET^FILE,INITIALIZER,
? CHECK^FILE,DEVICEINFO,FNAMECOMPARE,
? PROCESS_STOP_)
?LIST