Close (Dataset subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 1: Line 1:
{{Template:Dataset:Close subtitle}}
{{Template:Dataset:Close subtitle}}


This subroutine closes a dataset object.
==Syntax==
==Syntax==
{{Template:Dataset:Close syntax}}
{{Template:Dataset:Close syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%dataset</th>
<tr><th>dataset</th>
<td>A variable containing a reference to a <var>Dataset</var> object to be closed.
<td>A variable containing a reference to a <var>Dataset</var> object to be closed.
   
   
Line 14: 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 dataset 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 dataset object that is <var>Closed</var> can be re-Opened.
<li>A <var>Dataset</var> that is <var>Closed</var> can be re-<var>Open</var>ed.
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>.
If the object is re-opened in output mode, it will either write over
If the object is re-opened in output mode, it will either write over

Revision as of 21:50, 20 May 2011

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.
  • A Dataset that is Closed can be re-Opened. 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