Close (Dataset subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
Line 13: Line 13:
<li>A <var>Close</var> of an output dataset ensures that all output data is written
<li>A <var>Close</var> of an output dataset ensures that all output data is written
to disk.
to disk.
<li>A <var>Close</var> of a <var>Dataset</var> releases any internal locks on the underlying
<li>A <var>Close</var> of a <var>Dataset</var> releases any internal locks on the underlying
dataset or stream.
dataset or stream.
This allows another thread or user to access the dataset.
This allows another thread or user to access the dataset.
<li>A <var>Dataset</var> that is <var>Closed</var> can be re-<var>Open</var>ed.
 
<li>You can re-<var>Open</var> a <var>Dataset</var> that was <var>Closed</var>.
If the object is re-opened in input mode, it will be re-opened at the
If the object is re-opened in input mode, it will be re-opened at the
beginning, not where it left off at the time of the <var>Close</var>.
beginning, not where it left off at the time of the <var>Close</var>.
Line 23: Line 25:
the dataset or stream definition indicates append mode (DISP MOD).
the dataset or stream definition indicates append mode (DISP MOD).
</ul>
</ul>
==See also==
==See also==
{{Template:Dataset:Close footer}}
{{Template:Dataset:Close footer}}

Latest revision as of 21:37, 14 November 2012

Close this dataset (Dataset class)


Syntax

dataset:Close Throws WriteError

Syntax terms

dataset A variable containing a reference to a Dataset object to be closed.

Usage notes

  • A Close of an output dataset ensures that all output data is written to disk.
  • A Close of a Dataset releases any internal locks on the underlying dataset or stream. This allows another thread or user to access the dataset.
  • You can re-Open a Dataset that was Closed. If the object is re-opened in input mode, it will be re-opened at the beginning, not where it left off at the time of the Close. If the object is re-opened in output mode, it will either write over the start of the file or append to the end, depending on whether or not the dataset or stream definition indicates append mode (DISP MOD).

See also