identification
division.
program-id.
rei0201.
*
environment division.
input-output section.
file-control.
select ken-file
assign "h:\rei0201.dat"
organization line sequential.
select itiran-file
assign "h:\rei0201.txt".
*
data division.
file section.
fd ken-file.
01 ken-rec.
05 kencode picture
9(02).
05 kenmei picture
X(08).
05 menseki picture
9(05).
05 jinko picture
9(05).
fd itiran-file.
01 itiran-rec picture X(132).
working-storage section.
01 e-flg picture X(03).
01 meisai-gyo.
05 filler picture
X(09) value space.
05 m-kencode
picture 9(02).
05 filler picture
X(05) value space.
05 m-kenmei picture
X(08).
05 filler picture
X(05) value space.
05 m-menseki
picture 9(05).
05 filler picture
X(05) value space.
05 m-jinko picture
9(05).
*
procedure division.
syori.
open input
ken-file output itiran-file
move
"off" to e-flg
perform until
e-flg = "on"
read ken-file
at end
move "on" to e-flg
not at end
; 
move kencode to m-kencode
move kenmei to m-kenmei
move menseki to m-menseki
move jinko to m-jinko
move meisai-gyo to itiran-rec
write itiran-rec after 1
end-read
end-perform
close ken-file itiran-file
stop run.