RecordLength (Dataset property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
Line 2: Line 2:


This numeric property indicates the record length (LRECL) for the dataset.
This numeric property indicates the record length (LRECL) for the dataset.
It is only settable while the object is in the <var>Closed</var> state.
It is only settable while the object is in the <var>Closed</var> [[Dataset class#The DatasetState enumeration|state]].
An attempt to set it while the dataset is not closed results in request
An attempt to set it while the dataset is not closed results in request cancellation.
cancellation.
 
==Syntax==
==Syntax==
{{Template:Dataset:RecordLength syntax}}
{{Template:Dataset:RecordLength syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%currentNumber</th>
<tr><th>%currentNumber</th>
<td>A variable to receive the record length of the <var class="term>dataset</var> object.
<td>A variable to receive the record length of the <var class="term>dataset</var> object.</td></tr>
</td></tr>
 
<tr><th>dataset</th>
<tr><th>dataset</th>
<td>A reference to an instance of a <var>Dataset</var> object.
<td>A reference to an instance of a <var>Dataset</var> object.</td></tr>
</td></tr>
 
<tr><th>newNumber</th>
<tr><th>newNumber</th>
<td>A variable to be used to set the <var class="term>dataset</var> object's record length.
<td>A variable to be used to set the <var class="term>dataset</var> object's record length.</td></tr>
</td></tr></table>
</table>


==Usage notes==
==Usage notes==
<ul>
<ul>
<li><var>RecordLength</var> can be set to any value from 1 to 32767.
<li><var>RecordLength</var> can be set to any value from 1 to 32767.
<li>The <var>RecordLength</var> default value is 0.
<li>The <var>RecordLength</var> default value is 0.
However, if <var>RecordLength</var> is not set for a dataset before it is opened, the open
However, if <var>RecordLength</var> is not set for a dataset before it is opened, the open
process will attempt to determine an appropriate record length for the
process will attempt to determine an appropriate record length for the dataset.
dataset.
 
<li>For input datasets, the record length will usually be set from the input
<li>For input datasets, the record length will usually be set from the input
file attributes, whether or not the <var>RecordLength</var> property had been set.
file attributes, whether or not the <var>RecordLength</var> property had been set.
<li>After an <var>[[Open (Dataset function)|Open]]</var>, <var>RecordLength</var>
<li>After an <var>[[Open (Dataset function)|Open]]</var>, <var>RecordLength</var>
reflects the true record length used for the dataset.
reflects the true record length used for the dataset.
</ul>
</ul>
==See also==
==See also==
{{Template:Dataset:RecordLength footer}}
{{Template:Dataset:RecordLength footer}}

Latest revision as of 23:38, 14 November 2012

The record length of this dataset (Dataset class)


This numeric property indicates the record length (LRECL) for the dataset. It is only settable while the object is in the Closed state. An attempt to set it while the dataset is not closed results in request cancellation.

Syntax

%currentNumber = dataset:RecordLength dataset:RecordLength = newNumber

Syntax terms

%currentNumber A variable to receive the record length of the dataset object.
dataset A reference to an instance of a Dataset object.
newNumber A variable to be used to set the dataset object's record length.

Usage notes

  • RecordLength can be set to any value from 1 to 32767.
  • The RecordLength default value is 0. However, if RecordLength is not set for a dataset before it is opened, the open process will attempt to determine an appropriate record length for the dataset.
  • For input datasets, the record length will usually be set from the input file attributes, whether or not the RecordLength property had been set.
  • After an Open, RecordLength reflects the true record length used for the dataset.

See also