The statement disconnects a file from a unit.
Unit identifier for an external unit. If is not used, then u must be first.
Determines the disposition of the file-- is a character expression whose value, when trailing blanks are removed, can be or . The default value for the status specifier is . For temporary (scratch) files, is forced to always. For other files besides scratch files, the default is .
I/O status specifier-- must be an integer variable or an integer array element.
Error specifier-- must be the label of an executable statement in the same program containing the statement. The program control is transferred to this statement in case an error occurs while executing the statement.
The options can be specified in any order.
The and options are allowable alternates for , with a warning, if the flag is set.
Execution of proceeds as follows:
The specified unit is disconnected.
If is , the file connected to the specified unit is deleted.
If an argument is specified, ios is set to zero if no error was encountered; otherwise, it is set to a positive value.
All open files are closed with default sta at normal program termination. Regardless of the specified sta, scratch files, when closed, are always deleted.
Execution of a statement specifying a unit that does not exist, or a unit that has no file connected to it, has no effect.
Execution of a statement specifying a unit zero (standard error) is not allowed, but you can reopen it to some other file.
The unit or file disconnected by the execution of a statement can be connected again to the same, or a different, file or unit.
For tape I/O, use the routines.
Example 1: Close and keep:
CLOSE ( 2, STATUS='KEEP')
Example 2: Close and delete:
CLOSE ( 2, STATUS='DELETE', IOSTAT=I )
Example 3: Close and keep a scratch file even though the status is :
OPEN ( 2, STATUS='SCRATCH') ... CLOSE ( 2, STATUS='KEEP', IOSTAT=I )
- © 2010, Oracle Corporation and/or its affiliates
- Whats your most impressive dream
- Is sexism illegal in the US
- Do big US companies support universal healthcare
- How can I learn Tableau effectively
- Why is an isotope hazardous
- How did Anakin Skywalker receive his scar
- How did you achieve your childhood dream?no_redirect=1
- What do you do in a day
- How does one sleep at ISB
- How is weight loss
- How do electronics affect sleep
- Which social situations do you avoid
- Why is NAFTA good for the USA
- Is it worth to learn Android technologies
- How focused are college toppers in studies
- Are management consultants happy people