(
(
(
CLOSE file
ref
[,file ref)
...
CLOSE
The CLOSE statement specifies files
to
be deactivated. An implicit CLOSE state-
ment
is
automatically executed for each active file
at
the
end
of
program execution.
The syntax
of
the CLOSE statement is·as shown:
CLOSE file ref [,file ref)
...
where:
file
ref
is
from
FLO
to
FL9 and represents the same file specified
in
the
OPEN
statement. Only one file reference
is
required.
Notes
About
CLOSE
• If a file
is
used for both input and
output
operations during execution
of
a single
program,
the
file must be closed and reopened between input and
output
references.
•
If
you
do
not
close a file (CLOSE
or
end
of
program), the file may become
unusable.
• If a file specified
in
a CLOSE
statement
is
not active when the CLOSE
statement
is
executed,
the
statement
is
ignored.
• The file references must be
the
same
as
those specified for
the
files
in
the
OPEN
statement.
Example
A sample CLOSE statement
is
as shown:
0020
CLOSE FL2, FL9
61