-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdico.cob
More file actions
28 lines (24 loc) · 712 Bytes
/
Copy pathdico.cob
File metadata and controls
28 lines (24 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
identification division.
program-id. dico.
environment division.
input-output section.
file-control.
select word assign to 'dico.txt'
organization is line sequential.
data division.
file section.
fd word.
01 word-file pic A(25).
working-storage section.
01 ws-word pic A(25).
01 ws-eof pic A(1).
procedure division.
open input word.
perform until ws-eof='Y'
read word into ws-word
at end move 'Y' to ws-eof
not at end display ws-word
end-read
end-perform.
close word.
stop run.