hello, it's me again .
i've just trried the method i suggested above with the coding below and it seems to work o.k.
the only problem is that you are limited to the width of the compilers screen window(whatever its called!) whereas printouts are often wider that this and therefore will wrap onto the next line on your screen making it a bit confusing.
anyway, here is the code i used:
environment division.
input-output section.
file-control.
select output-file assign to "rubbish.dat"
organization line sequential.
data division.
file section.
fd output-file.
01 out-rec.
03 num-1 pic x(4).
03 num-2 pic x(4).
03 num-3 pic x(4).
working-storage section.
01 group-for-screen-output.
03 rec-details-a pic x(4).
03 filler pic x(4) value spaces.
03 rec-details-b pic x(4).
03 filler pic x(4) value spaces.
03 rec-details-c pic x(4).
01 eof-flag pic x value "n" .
procedure division.
open input output-file
read output-file at end
move "y" to eof-flag
not at end
perform until eof-flag = "y"
move num-1 to rec-details-a
move num-2 to rec-details-b
move num-3 to rec-details-c
display group-for-screen-output
read output-file at end move "y" to eof-flag
end-perform
end-read
close output-file
stop run.
and here is the layout of the "rubbish.dat" output-file that i used:
one two thre
fourfivesix
seveeighnine
see ya
jimlee (student)