<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=HLI%3A_Record_locking_conflicts</id>
	<title>HLI: Record locking conflicts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=HLI%3A_Record_locking_conflicts"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;action=history"/>
	<updated>2026-04-17T05:53:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=104376&amp;oldid=prev</id>
		<title>ELowell: /* Handling record locking conflicts */</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=104376&amp;oldid=prev"/>
		<updated>2017-10-09T20:30:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Handling record locking conflicts&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:30, 9 October 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l87&quot;&gt;Line 87:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 87:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In SOUL, two special forms of ON units, the ON RECORD LOCKING CONFLICT and ON FIND CONFLICT, can be invoked to specify the action to be taken for a record locking conflict. A SOUL PAUSE statement can be used to cause the request to wait a specified time and then to retry the statement that caused the evaluation of the ON unit. &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In SOUL, two special forms of ON units, the ON RECORD LOCKING CONFLICT and ON FIND CONFLICT, can be invoked to specify the action to be taken for a record locking conflict. A SOUL PAUSE statement can be used to cause the request to wait a specified time and then to retry the statement that caused the evaluation of the ON unit. &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In your host language program, you can use the IFERLC call to help determine the cause of the record locking conflict and to specify an action to be taken.   &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In your host language program, you can use the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[IFERLC_(HLI_function)|&lt;/ins&gt;IFERLC&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;call to help determine the cause of the record locking conflict and to specify an action to be taken.   &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Sample host language error processing===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Sample host language error processing===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ELowell</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=83935&amp;oldid=prev</id>
		<title>ELowell at 16:35, 29 April 2016</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=83935&amp;oldid=prev"/>
		<updated>2016-04-29T16:35:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:35, 29 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l292&quot;&gt;Line 292:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 292:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==See also==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==See also==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template: HLI topic list}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template: HLI &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;programming &lt;/ins&gt;topic list}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Host Language Interface]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: Host Language Interface]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ELowell</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=82589&amp;oldid=prev</id>
		<title>ELowell: /* Model 204 locks at different levels */</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=82589&amp;oldid=prev"/>
		<updated>2016-01-29T23:27:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Model 204 locks at different levels&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:27, 29 January 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/ul&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For more information about record locking, see [[HLI: Find criteria for Model 204]]. &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For more information about record locking, see [[HLI: Find criteria for Model 204 &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;data&lt;/ins&gt;]]. &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Example of record locking conflict==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Example of record locking conflict==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ELowell</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=82588&amp;oldid=prev</id>
		<title>ELowell: /* IFAM2 application requires an EXEC lock */</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=82588&amp;oldid=prev"/>
		<updated>2016-01-29T23:26:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;IFAM2 application requires an EXEC lock&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:26, 29 January 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p class=&amp;quot;caption&amp;quot; style=&amp;quot;width:468px&amp;quot;&amp;gt;Example of record locking conflict&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p class=&amp;quot;caption&amp;quot; style=&amp;quot;width:468px&amp;quot;&amp;gt;Example of record locking conflict&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p class=&quot;figure&quot;&amp;gt;[[File:HLI_Prog_ch10_1.gif&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|468px&lt;/del&gt;]]&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p class=&quot;figure&quot;&amp;gt;[[File:HLI_Prog_ch10_1.gif]]&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===SOUL request opens CARS with read-only privileges===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===SOUL request opens CARS with read-only privileges===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ELowell</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=82574&amp;oldid=prev</id>
		<title>ELowell: Created page with &quot;==Overview== &lt;p&gt; This topic describes for the HLI programmer a typical locking conflict and provides an example of how to handle conflicts in a host language application. Refe...&quot;</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=HLI:_Record_locking_conflicts&amp;diff=82574&amp;oldid=prev"/>
		<updated>2016-01-29T23:12:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Overview== &amp;lt;p&amp;gt; This topic describes for the HLI programmer a typical locking conflict and provides an example of how to handle conflicts in a host language application. Refe...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This topic describes for the HLI programmer a typical locking conflict and provides an example of how to handle conflicts in a host language application. Refer to the guidelines for avoiding conflicts when you are coding your host language program.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==When a record locking conflict occurs==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If Model 204 cannot lock a record, a locking conflict occurs. Record locking conflicts can occur when multiple users try concurrently to access the same records and attempt overlapping updating operations. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A conflict arises when one or more users are reading a file (in SHR mode) and another user attempts to update the file (enqueuing in EXC mode) or when two or more users attempt to perform file maintenance (each requiring EXC mode access) on the same records retrieved from a file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For update operations from a host language application, locking guarantees an HLI thread exclusive control of a resource until the thread completes update processing on the resource. Conflicting requests are automatically delayed until exclusive control is released. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Model 204 locks at different levels===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Model 204 resolves internal enqueuing conflicts by locking at the following levels: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Files or groups &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sets of records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Single records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Arbitrary resources&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For more information about record locking, see [[HLI: Find criteria for Model 204]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example of record locking conflict==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this example, a SOUL request and an IFAM2 host language application attempt to access the same Model 204 record at the same time. Because the IFAM2 application requires an exclusive (EXC) lock, this situation causes a record locking conflict. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IFAM2 application requires an EXEC lock===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Events occur in the following order:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The SOUL request begins processing and finds all the records in the CARS file that were made in 1991 and starts to print a report. (The procedure enqueues the found records in SHR mode.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Then the host language application begins processing and finds all the FORD records in the CARS file, including some of the 1991 records selected by the SOUL request. The application then attempts an updating function that requires an EXC lock as it processes each record. However, the program cannot gain EXC access to any of the 1991 records. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following figure illustrates the record locking conflict involving the SOUL procedure and the host language application. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;caption&amp;quot; style=&amp;quot;width:468px&amp;quot;&amp;gt;Example of record locking conflict&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;figure&amp;quot;&amp;gt;[[File:HLI_Prog_ch10_1.gif|468px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SOUL request opens CARS with read-only privileges===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SOUL request begins processing first and opens the CARS file with read-only privileges (password is READS), selects the FORD records, and prints the information found in each record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SOUL request includes the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS&lt;br /&gt;
READS &lt;br /&gt;
BEGIN&lt;br /&gt;
1 FD MAKE=FORD&lt;br /&gt;
 YEAR=1991&lt;br /&gt;
2 FR 1&lt;br /&gt;
PRINT ALL INFORMATION&lt;br /&gt;
END&lt;br /&gt;
CLOSE CARS&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; The records in the found set remain locked in SHR mode while they are being printed by the for loop. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IFAM2 application attempts to update CARS===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The HLI IFAM2 batch application begins processing next and starts a multiple cursor IFSTRT thread, which allows update processing. The program opens the CARS file with update privileges (password is UPDATES) and selects the FORD records (using IFFAC). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The host language application starts a processing loop that performs the following functions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fetches (IFFTCH) each record in the found set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Calls IFUPDT to update the record, changing the COLOR field to TAN.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Writes an output record to a user-specified report file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Displays record counts.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, as soon as the host language program attempts to perform the updating function on the first 1991 record in the found set, it enqueues on the record in EXC mode, as shown in [[#Example of record locking conflict|Example of record locking conflict]]. Model 204 returns a completion code (RETCODE) of 3, which indicates that the required EXC lock on the record could not be obtained. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The excerpt from a COBOL host language program, in the section [[#Sample host language error processing|Sample host language error processing]], updates the FORD records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Resolution of the locking conflict ===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The host language application shown in [[#Example of record locking conflict|Example of record locking conflict]] cannot access the 1991 records (which are locked in SHR mode by the SOUL procedure) until the SOUL request finishes processing or explicitly releases the records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the SHR lock has been released, the host language application can access the record in EXC mode and update records with IFUPDT. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Handling record locking conflicts==&lt;br /&gt;
&lt;br /&gt;
===Specifying an action when a record locking conflict occurs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Model 204 allows the user to specify the action to be taken if, after an initial record locking attempt and subsequent wait, an effort to lock a set of records is still unsuccessful. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In SOUL, two special forms of ON units, the ON RECORD LOCKING CONFLICT and ON FIND CONFLICT, can be invoked to specify the action to be taken for a record locking conflict. A SOUL PAUSE statement can be used to cause the request to wait a specified time and then to retry the statement that caused the evaluation of the ON unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In your host language program, you can use the IFERLC call to help determine the cause of the record locking conflict and to specify an action to be taken.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sample host language error processing===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following COBOL program excerpts show error processing in a host language program using an ERROR-RTN subroutine.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The program tests the Model 204 completion return code (RETCODE) after each HLI call. In this example, if the return code is not equal to zero, the program transfers control to ERROR-RTN and stops processing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a return code of 3, the program displays a record locking conflict message. For all nonzero return codes, the program displays an error message with the name of the HLI function call and the return code value. The error routine also calls IFGERR and displays the text of the Model 204 error message. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;DATA DIVISION.&lt;br /&gt;
FILE SECTION.&lt;br /&gt;
FD  UPDATE-REPORT&lt;br /&gt;
    LABEL RECORDS ARE STANDARD&lt;br /&gt;
    BLOCK CONTAINS 0 RECORDS&lt;br /&gt;
    DATA RECORD IS CAR-REC-OUT.&lt;br /&gt;
01  CAR-REC-OUT.&lt;br /&gt;
    05  CAR-MAKE-OUT        PIC X(5).&lt;br /&gt;
    05  FILLER              PIC X(10).&lt;br /&gt;
    05  CAR-MODEL-OUT	       PIC X(5).&lt;br /&gt;
    05  FILLER              PIC X(10).&lt;br /&gt;
    05  CAR-YEAR-OUT        PIC X(2).&lt;br /&gt;
    05  FILLER              PIC X(10).&lt;br /&gt;
    05  CAR-COLOR-OUT       PIC X(3).&lt;br /&gt;
WORKING-STORAGE SECTION.&lt;br /&gt;
&lt;br /&gt;
01  M204-CALL-ARGS.&lt;br /&gt;
    05  RETCODE             PIC 9(5) COMP SYNC.&lt;br /&gt;
    05  DIR                 PIC 9(5) COMP SYNC VALUE &amp;quot;1&amp;quot;.&lt;br /&gt;
01  M204-ERROR.&lt;br /&gt;
    05  M204-CALL-ERROR     PIC X(8) VALUE SPACES.&lt;br /&gt;
    05  M204-RETCODE-ERROR  PIC 9(5) VALUE ZERO.&lt;br /&gt;
    05  M204-MSG-ERROR      PIC X(80) VALUE SPACES. &lt;br /&gt;
01  WK-VARS.&lt;br /&gt;
    05  WK-COLOR            PIC X(3) VALUE &amp;quot;TAN&amp;quot;.&lt;br /&gt;
    05  FIND-TOT            PIC 9(5) VALUE ZERO.&lt;br /&gt;
    05  UPDATE-TOT          PIC 9(5) VALUE ZERO.&lt;br /&gt;
01  START-THREAD.&lt;br /&gt;
    05  LANG-IND            PIC 9(5) COMP SYNC.&lt;br /&gt;
    05  LOGIN               PIC X(12) VALUE &amp;quot;CARSUSER;UPDATES;&amp;quot;.&lt;br /&gt;
    05  THRD-TYPE           PIC 9(5) VALUE &amp;quot;2&amp;quot; COMP SYNC.&lt;br /&gt;
    05  THRD-NO             PIC 9(5) COMP SYNC.&lt;br /&gt;
01  FILE-INFO.&lt;br /&gt;
    05  FILE-NAME           PIC X(10) VALUE &amp;quot;CARS;&amp;quot;.&lt;br /&gt;
    05  PASSWORD            PIC X(6) VALUE &amp;quot;UPDATES;&amp;quot;.&lt;br /&gt;
01  FIND-SPEC.&lt;br /&gt;
    05  FDSPEC              PIC X(10) VALUE &amp;quot;MAKE=FORD;&amp;quot;.&lt;br /&gt;
    05  COUNT               PIC 9(5) COMP SYNC.&lt;br /&gt;
    05  FDNAME              PIC X(7) VALUE &amp;quot;FDNAME;&amp;quot;.&lt;br /&gt;
    05  END-CALL            PIC X(4) VALUE &amp;quot;END;&amp;quot;.&lt;br /&gt;
01  CURSOR-PARMS.&lt;br /&gt;
    05  CURSPEC             PIC X(10) VALUE &amp;quot;IN FDNAME;&amp;quot;.&lt;br /&gt;
    05  CURNAME             PIC X(7) VALUE &amp;quot;CRNAME;&amp;quot;.&lt;br /&gt;
01  WORK-REC.&lt;br /&gt;
    05  MAKE                PIC X(5) VALUE SPACES.&lt;br /&gt;
    05  MODEL               PIC X(5) VALUE SPACES.&lt;br /&gt;
    05  YEAR                PIC X(2) VALUE SPACES.&lt;br /&gt;
    05  COLOR               PIC X(3) VALUE SPACES.&lt;br /&gt;
01  CALL-ARGS.&lt;br /&gt;
    05  RETCODE             PIC 9(5) COMP SYNC.&lt;br /&gt;
    05  RECNUM              PIC X(11).&lt;br /&gt;
    05  USERNUM             PIC X(5).&lt;br /&gt;
    05  FILENAME            PIC X(8).&lt;br /&gt;
01  DATA-SPEC               PIC X(49) VALUE&lt;br /&gt;
    &amp;quot;EDIT(MAKE,MODEL,YEAR,COLOR)(A(5),A(5),A(2),A(3));&amp;quot;.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
PROCEDURE DIVISION.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
* START A MULTIPLE CURSOR THREAD&lt;br /&gt;
*&lt;br /&gt;
CALL &amp;quot;IFSTRT&amp;quot; USING RETCODE,START-THREAD.&lt;br /&gt;
IF RETCODE IS NOT EQUAL TO ZERO THEN&lt;br /&gt;
  MOVE &amp;quot;IFSTRT  &amp;quot; TO M204-CALL-ERROR&lt;br /&gt;
  GO TO ERROR-RTN.&lt;br /&gt;
*&lt;br /&gt;
* OPEN CARS WITH UPDATE PRIVILEGES&lt;br /&gt;
*&lt;br /&gt;
CALL &amp;quot;IFOPEN&amp;quot; USING RETCODE,FILE-INFO.&lt;br /&gt;
IF RETCODE IS NOT EQUAL TO ZERO THEN&lt;br /&gt;
  MOVE &amp;quot;IFOPEN  &amp;quot; TO M204-CALL-ERROR&lt;br /&gt;
  GO TO ERROR-RTN.&lt;br /&gt;
*&lt;br /&gt;
* FIND AND COUNT FORD RECORDS&lt;br /&gt;
*&lt;br /&gt;
CALL &amp;quot;IFFAC&amp;quot; USING RETCODE,FDSPEC,COUNT,FDNAME,END-CALL.&lt;br /&gt;
IF RETCODE IS NOT EQUAL TO ZERO THEN&lt;br /&gt;
  MOVE &amp;quot;IFFAC   &amp;quot; TO M204-CALL-ERROR&lt;br /&gt;
  GO TO ERROR-RTN&lt;br /&gt;
*	&lt;br /&gt;
ELSE&lt;br /&gt;
* UPDATE AND WRITE FORD RECORDS&lt;br /&gt;
*&lt;br /&gt;
  MOVE COUNT TO FIND-TOT&lt;br /&gt;
  DISPLAY &amp;quot;TOTAL RECORDS FOUND IS &amp;quot; FIND-TOT&lt;br /&gt;
  CALL &amp;quot;IFOCUR&amp;quot; USING RETCODE,CURSPEC,CURNAME&lt;br /&gt;
  MOVE &amp;quot;IFOCUR  &amp;quot; TO M204-CALL-ERROR&lt;br /&gt;
  PERFORM UPDATE-AND-WRITE UNTIL &lt;br /&gt;
    RETCODE IS NOT EQUAL TO ZERO OR&lt;br /&gt;
    FIND-TOT IS EQUAL TO ZERO.&lt;br /&gt;
&lt;br /&gt;
IF RETCODE IS NOT EQUAL TO ZERO THEN&lt;br /&gt;
  GO TO ERROR-RTN&lt;br /&gt;
ELSE&lt;br /&gt;
*&lt;br /&gt;
* PRINT UPDATE TOTAL&lt;br /&gt;
*&lt;br /&gt;
  DISPLAY &amp;quot;TOTAL RECORD UPDATED IS &amp;quot; UPDATE-TOT&lt;br /&gt;
  CALL &amp;quot;IFCCUR&amp;quot; USING RETCODE,CURNAME&lt;br /&gt;
  IF RETCODE IS NOT EQUAL TO ZERO THEN&lt;br /&gt;
    MOVE &amp;quot;IFCCUR  &amp;quot; TO M204-CALL-ERROR&lt;br /&gt;
    GO TO ERROR-RTN.&lt;br /&gt;
*&lt;br /&gt;
GO TO END-RTN.&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
*&lt;br /&gt;
* SUBROUTINE TO PROCESS FORD RECORDS&lt;br /&gt;
*&lt;br /&gt;
UPDATE-AND-WRITE.&lt;br /&gt;
  MOVE &amp;quot;IFFTCH  &amp;quot; TO M204-CALL-ERROR.&lt;br /&gt;
  CALL &amp;quot;IFFTCH&amp;quot; USING RETCODE,WORK-REC,DIR,CURNAME,DATA-SPEC.&lt;br /&gt;
  PERFORM UPDATE-COLOR.&lt;br /&gt;
  PERFORM WRITE-REC.&lt;br /&gt;
  MOVE SPACES TO WORK-REC.&lt;br /&gt;
  SUBTRACT 1 FROM FIND-TOT.&lt;br /&gt;
*&lt;br /&gt;
* SUBROUTINE TO CHANGE COLOR TO TAN AND UPDATE FILE&lt;br /&gt;
*&lt;br /&gt;
UPDATE-COLOR.&lt;br /&gt;
  MOVE WK-COLOR TO COLOR.&lt;br /&gt;
  MOVE &amp;quot;IFUPDT  &amp;quot; TO M204-CALL-ERROR.&lt;br /&gt;
  CALL &amp;quot;IFUPDT&amp;quot; USING RETCODE,WORK-REC,CURNAME,DATA-SPEC.&lt;br /&gt;
  IF RETCODE IS EQUAL TO 3 THEN GO TO ERROR-RTN.&lt;br /&gt;
  MOVE &amp;quot;IFCMMT  &amp;quot; TO M204-CALL-ERROR.&lt;br /&gt;
  CALL &amp;quot;IFCMMT&amp;quot; USING RETCODE.&lt;br /&gt;
  ADD 1 TO UPDATE-TOT.&lt;br /&gt;
*&lt;br /&gt;
* SUBROUTINE TO WRITE A REPORT RECORD&lt;br /&gt;
*&lt;br /&gt;
WRITE-REC.&lt;br /&gt;
  MOVE MAKE TO CAR-MAKE-OUT.&lt;br /&gt;
  MOVE MODEL TO CAR-MODEL-OUT.&lt;br /&gt;
  MOVE YEAR TO CAR-YEAR-OUT.&lt;br /&gt;
  MOVE COLOR TO CAR-COLOR-OUT.&lt;br /&gt;
  WRITE CAR-REC-OUT.&lt;br /&gt;
&lt;br /&gt;
*&lt;br /&gt;
* SUBROUTINE TO DISPLAY HLI CALL ERRORS &lt;br /&gt;
*&lt;br /&gt;
ERROR-RTN.&lt;br /&gt;
  IF RETCODE IS EQUAL TO 3 THEN&lt;br /&gt;
  DISPLAY &amp;quot;RECORD LOCKING CONFLICT&amp;quot;.&lt;br /&gt;
  CALL &amp;quot;IFERLC&amp;quot; USING RETCODE, RECNUM, USERNUM, FILENAME&lt;br /&gt;
  &amp;quot;RECORD NUMBER = &amp;quot; RECNUM&lt;br /&gt;
    &amp;quot;USER NUMBER   = &amp;quot; USERNUM&lt;br /&gt;
    &amp;quot;IN FILE         &amp;quot; FILENAME.&lt;br /&gt;
  MOVE RETCODE TO M204-RETCODE-ERROR.&lt;br /&gt;
  DISPLAY &amp;quot;CRITICAL ERROR - UNSUCCESSFUL HLI FUNCTION CALL: &amp;quot;&lt;br /&gt;
     M204-CALL-ERROR &amp;quot;, WITH A RETCODE OF: &amp;quot; &lt;br /&gt;
     M204-RETCODE-ERROR.&lt;br /&gt;
  CALL &amp;quot;IFGERR&amp;quot; USING RETCODE, M204-MSG-ERROR.&lt;br /&gt;
  DISPLAY &amp;quot;MODEL 204 ERROR MESSAGE: &amp;quot; M204-MSG-ERROR.&lt;br /&gt;
  GO TO END-RTN.&lt;br /&gt;
*&lt;br /&gt;
* SUBROUTINE TO END THE TRANSACTION&lt;br /&gt;
*&lt;br /&gt;
END-RTN.&lt;br /&gt;
  CALL &amp;quot;IFCLOSE&amp;quot; USING RETCODE.&lt;br /&gt;
  CALL &amp;quot;IFFNSH&amp;quot; USING RETCODE.&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  STOP RUN.&amp;lt;/nowiki&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Controlling record locking conflicts==&lt;br /&gt;
&lt;br /&gt;
===Releasing records===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the following guidelines for releasing records: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Release records as soon as you no longer need them. Use IFRELR to release records, including those on a list. (To free pages in CCATEMP, use IFCLST when you no longer need the records in a list.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Place the records you need on a list, release the records, and process from the list in situations where no updates are taking place or where updates are known not to affect the data in question.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Processing update units===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the following guidelines for processing update units:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use IFCMMT at the end of logical updates and keep logical updates short. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If using HLI from an Online monitor, such as CICS, try to keep update units within the same terminal I/O point.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Changes to the database ===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the following guidelines for applications that make changes to the database:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In an application that reads and updates, segregate updating functions from read-only functions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Perform the following functions during off-peak hours: IFRFLD, IFNFLD, and IFDFLD. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Defer index updates whenever possible. Because exclusive locks are not held as long, deferring index updates speeds updating. Only a part of the work is being done while the lock is held. For more information about index updates, see [[File Load utility]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template: HLI topic list}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Host Language Interface]]&lt;/div&gt;</summary>
		<author><name>ELowell</name></author>
	</entry>
</feed>