MPE/iX - CI Programming for Stability

July 18, 2008 HP World '01 27
File I/O
why not use INPUT in WHILE to read a flat file?, e.g.:
while not eof do
input varname < filename
endwhile
three main alternatives:
write to (create) and read from a MSG file via I/O redirection
use :PRINT and I/O redirection to read file 1 record at a time
use entry points and I/O redirection
MSG files work because each read is destructive, so when INPUT
<file reads the 1
st
record it automatically gets the next record.
PRINT works because start and end record numbers can be
selected.
once in an entry point where I/O has been redirected, you can
easily read a file.