LSTRLOB parameter: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (add <code>s)
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Template:LSTRLOB parameter subtitle}}
==Summary==
==Summary==
<dl>
<dl>
Line 10: Line 11:
<dd>All
<dd>All
<dt>Introduced
<dt>Introduced
<dd>[[Sirius Mods|"Sirius Mods"]] Version 7.7
<dd><var class="product">[[Sirius Mods]]</var> Version 7.7
</dl>
</dl>
==Description==
==Description==
When LSTRLOB=1, User Language programs running in <var class="product">Model 204</var> version V7R2 or later can use normal field reference syntax for Lob fields.  Otherwise (LSTRLOB=0), access to Lob fields must use the <var>Buffer</var> syntax.  
When <var>LSTRLOB</var> is 1, [[SOUL]] programs can use normal field reference syntax to retrieve or set the value of a Lob field.  Otherwise (<code>LSTRLOB=0</code>), access to Lob fields must use the <var>Buffer</var> syntax. <var>LSTRLOB</var> is generally available as of Model&nbsp;204 V7.5.


The default value of LSTRLOB is 1.  LSTRLOB has no effect for <var class="product">Model 204</var> version V7R1.
The default value of <var>LSTRLOB</var> is 1.


The "normal field reference syntax" applies to all uses of a <var>BLOB</var> or <var>CLOB</var> field name <b>except</b> for the <var>Note</var> statement.
The "normal field reference syntax" applies to all uses of a <var>BLOB</var> or <var>CLOB</var> field name <b>except</b> for the <var>[[Record loops#Note statement|Note]]</var> statement.


The types of allowed "normal field references" are shown in the following table, which assumes that field <code>LOB</code> has the <var>BLOB</var> or <var>CLOB</var> attribute:
The types of allowed "normal field references" are shown in the following table, which assumes that field <code>LOB</code> has the <var>BLOB</var> or <var>CLOB</var> attribute:
<table>
<table>
<tr><th>Type of reference</th><th>Examples</th></tr>
<tr class="head"><th>Type of reference</th><th>Examples</th></tr>
<tr><th>Used in expression</th><td><p class="code">%s = LOB</p><p class="code">%t = LOB:substring(%pos, %len)</p><p class="code">%xmNode:addElement('info', LOB)</p></td></tr>
<tr><td nowrap>Used in expression</td><td>
<tr><th><var>Print</var> statement</th><td><p class="code">print 'Value is:' and LOB</p></td></tr>
<p class="code">%s = LOB
<tr><th>Field updates</th><td><p class="code">%s1 = 'x':left(3000, pad='x')<br/>store record<br/>  LOB = %s1<br/>end store</p><p class="code">add LOB = %s2</p>Note that the normal field reference syntax in the <var>Store Record</var> and <var>Add</var> statements does not have a provision for the <var>Reserve</var> clause which is available on the <var>Buffer</var> syntax. This is not an issue for a <code>FILEORG=X'100'</code> file, because the <var>Reserve</var> clause is ignored in those files (Lob pages are chained rather than allocated contiguously).<p class="code">change LOB to %s3</p>Note that the <b>only</b> type of <var>Change</var> statement allowed for a field with the <var>MINLOBE</var> attribute is this form, using the normal field reference syntax.</td></tr>
 
%t = LOB:substring(%pos, %len)
 
%xmNode:addElement('info', LOB)</p></td></tr>
 
<tr><td><var>Print</var> statement</td><td>
<p class="code">print 'Value is:' and LOB</p></td></tr>
 
<tr><td>Field updates</td>
<td>
<p class="code">%s1 = 'x':left(3000, pad='x')<br/>store record<br/>  LOB = %s1<br/>end store</p>
<p class="code">add LOB = %s2</p>
<p class="note"><b>Note:</b> The normal field reference syntax in the <var>Store Record</var> and <var>Add</var> statements does not have a provision for the <var>Reserve</var> clause which is available on the <var>Buffer</var> syntax. This is not an issue for a <var>FILEORG</var> X'100' file, because the <var>Reserve</var> clause is ignored in those files (Lob pages are chained rather than allocated contiguously).</p>
 
<p class="code">change LOB to %s3</p>
<p class="note"><b>Note:</b> The <b>only</b> type of <var>Change</var> statement allowed for a field with the <var>MINLOBE</var> attribute is this form, using the normal field reference syntax.</p></td></tr>
</table>
</table>


[[Category:User Language syntax enhancements]]
[[Category:System parameters]]
[[Category:System parameters]]
[[Category:Parameters]]
[[Category:Parameters]]

Latest revision as of 19:52, 20 July 2018

Treat LOBs as Longstrings

Summary

Default value
1
Parameter type
System
Where set
System manager
Related products
All
Introduced
Sirius Mods Version 7.7

Description

When LSTRLOB is 1, SOUL programs can use normal field reference syntax to retrieve or set the value of a Lob field. Otherwise (LSTRLOB=0), access to Lob fields must use the Buffer syntax. LSTRLOB is generally available as of Model 204 V7.5.

The default value of LSTRLOB is 1.

The "normal field reference syntax" applies to all uses of a BLOB or CLOB field name except for the Note statement.

The types of allowed "normal field references" are shown in the following table, which assumes that field LOB has the BLOB or CLOB attribute:

Type of referenceExamples
Used in expression

%s = LOB %t = LOB:substring(%pos, %len) %xmNode:addElement('info', LOB)

Print statement

print 'Value is:' and LOB

Field updates

%s1 = 'x':left(3000, pad='x')
store record
LOB = %s1
end store

add LOB = %s2

Note: The normal field reference syntax in the Store Record and Add statements does not have a provision for the Reserve clause which is available on the Buffer syntax. This is not an issue for a FILEORG X'100' file, because the Reserve clause is ignored in those files (Lob pages are chained rather than allocated contiguously).

change LOB to %s3

Note: The only type of Change statement allowed for a field with the MINLOBE attribute is this form, using the normal field reference syntax.