Close (Dataset subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Created page with "==Close (Dataset subroutine)== This subroutine closes a dataset object. ==Close syntax== <p class="pre"> %dataset:close </p> ===Syntax terms=== <table class="syntaxTable"> <tr><t...")
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Close (Dataset subroutine)==
{{Template:Dataset:Close subtitle}}
This subroutine closes a dataset object.
 
==Close syntax==
==Syntax==
<p class="pre"> %dataset:close
{{Template:Dataset:Close syntax}}
</p>
===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.
   
   
</td></tr></table>
</td></tr></table>
==Usage Notes==
==Usage notes==
<ul>
<ul>
<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.
 
If the object is re-Opened in input mode, it will be re-opened at the
<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
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
Line 24: 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==
{{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