Closing an I/O path makes the path invalid. All subsequent ON event statements for the closed I/O path are not acted upon. If an I/O path name has not been declared in a COM statement it may be closed in the following ways:
1. Explicitly close a path by executing
ASSIGN @Io-path TO *
2. Re-assigning the I/O path
ASSIGN @Io-path TO target
3. Exiting the subprogram with SUBEND, SUBEXIT, ON...RECOVER, or RETURN value
4. Stopping the program with END, GET, LOAD, SCRATCH, SCRATCH A, SCRATCH C, or STOP.
If an I/O path name has been declared in a COM statement it may be closed in the following ways:
1. Explicitly close a path by executing
ASSIGN @Io-path TO *
2. Re-assigning the I/O path with
ASSIGN @Io-path TO target
3. Executing SCRATCH A, SCRATCH C, SUBEND, SUBEXIT, ON...RECOVER, or RETURN value.
4. Executing EDIT, GET, or LOAD in a program that has a COM statement that does not match the COM statement that contains the I/O path name.