<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://m204wiki.rocketsoftware.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tbullock</id>
	<title>m204wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://m204wiki.rocketsoftware.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tbullock"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Special:Contributions/Tbullock"/>
	<updated>2026-04-16T21:39:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=DEFINE_PROCESSGROUP_command:_Horizon_for_TCP/IP&amp;diff=82928</id>
		<title>DEFINE PROCESSGROUP command: Horizon for TCP/IP</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=DEFINE_PROCESSGROUP_command:_Horizon_for_TCP/IP&amp;diff=82928"/>
		<updated>2016-02-23T23:03:04Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: OUTLIMIT is in the examples and M204 will take it, don&amp;#039;t know what it does though.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Privileges&lt;br /&gt;
&amp;lt;dd&amp;gt;User 0 or system manager&lt;br /&gt;
&amp;lt;dt&amp;gt;Function&lt;br /&gt;
&amp;lt;dd&amp;gt;Sets up a TCP/IP connection via Horizon for processgroup. Supported in all operating systems.&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;DEFINE PROCESSGROUP name [LIKE previousname] WITH&lt;br /&gt;
  SCOPE=SYSTEM&lt;br /&gt;
  LINK=linkname &lt;br /&gt;
  REMOTEID={address | symbolicaddress}  LOOKUP=IPV6ONLY|IPV4ONLY|ANY&lt;br /&gt;
  INLIMIT={nnnn | 0}&lt;br /&gt;
  OUTLIMIT={nnnn | 0}&lt;br /&gt;
  [PORT=nnnnn]&lt;br /&gt;
  [GUESTUSER={ACCEPT | REJECT}]&lt;br /&gt;
  [LOGIN=TRUST | NOTRUST}]&lt;br /&gt;
  [MASK={dotted-decimal | 255.255.255.255}]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Where:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;name is used on DEFINE PROCESS commands to refer to this processgroup. The length of the name must be eight characters or less. ALL is a reserved word and cannot be used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LINK&amp;lt;/var&amp;gt; is required and associates the group with a locally defined link that implies the transport type and conversation protocol. A linkname must match the name used in a local DEFINE LINK command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;REMOTEID=address specifies the network address of one or, if a mask is specified, many partner remote nodes in the network. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;address can be: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;a 32-bit number written in dotted-decimal notation, such as 182.148.55.206&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;(z/OS only) an IPv6 address, with up to 8 halfwords separated by colons, such as &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C0:12:46:F0:00:00:00:01&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;, which can also be written as &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;C0:12:46:F0::01&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;. In other words, the double colon shows that there are missing halfwords of binary zeros.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;REMOTEID=symbolicaddress specifies the symbolic address of one partner remote node in the network, such as MYMVS1, or SMTP.MYDOMAIN.COM. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The MASK parameter cannot be used with REMOTEID=symbolicaddress. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
To set up a Horizon for TCP/IP connection, take the following steps. You define a link, processgroup, and a process for a client and open the link. Then you define the same items on the server side and open the link, as shown in the following steps. &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;For the client&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Define a link for a client named TCPC. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE LINK TCPC WITH SCOPE=SYSTEM PROTOCOL=IP -&lt;br /&gt;
LOCALID=192.207.28.129  INBUFSIZE=4096 -&lt;br /&gt;
TRANSPORT=TCPSE -&lt;br /&gt;
CONNECTIONS=60   SERVPORT=65535&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Define a processgroup named TCPG&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE PROCESSGROUP TCPG WITH SCOPE=SYSTEM LINK=TCPC -&lt;br /&gt;
INLIMIT=30 OUTLIMIT=30   REMOTEID=192.207.28.129 -&lt;br /&gt;
MASK=255.255.255.255 PORT=65534&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of PORT, 65534, is used as the SERVPORT value in the DEFINE LINK command for the server.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Define a process named CPR&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE PROCESS CPR  WITH SCOPE=SYSTEM -&lt;br /&gt;
DATALEN=9999   PARTNER=SPR -&lt;br /&gt;
DESTINATION=TCPG  UIDSOURCE=OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The value of PARTNER, SPR, is the process name in the DEFINE PROCESS command for the server.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Open the client link named TCPC&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN LINK TCPC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;For the server&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Define a link for the server named TCPS that corresponds to the link for the client. In this example, the SERVPORT value 65534 matches the PORT value defined in the client DEFINE PROCESSGROUP command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE LINK TCPS WITH SCOPE=SYSTEM PROTOCOL=IP -&lt;br /&gt;
LOCALID=192.207.28.129  INBUFSIZE=4096 -&lt;br /&gt;
TRANSPORT=TCPSE -&lt;br /&gt;
CONNECTIONS=60   SERVPORT=65534&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Define a processgroup TSPG for the server&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE  PROCESSGROUP TSPG   WITH SCOPE=SYSTEM - LINK=TCPS -&lt;br /&gt;
INLIMIT=30 OUTLIMIT=30   REMOTEID=192.207.28.129 -&lt;br /&gt;
MASK=255.255.255.255 &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Define a process named SPR for the server&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE PROCESS SPR  WITH SCOPE=SYSTEM FROM TSPG -&lt;br /&gt;
DATALEN=9999  TIMEOUT=0 -&lt;br /&gt;
SUBSYSTEM=CONS SUBSYSPARM=&#039;CONSPROC RE-TPROC - NOPEN&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The process name defined for the server must match the value of the PARTNER parameter in the client DEFINE PROCESS command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Open the server link named TCPS&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN LINK TCPS   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;/ol&amp;gt;&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;b&amp;gt;IPv6 addressing&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;IPv6 addressing is supported on IBM z/OS systems only.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Take care using symbolic addresses when your Online is running on a host that is enabled for IPv6 addressing. If your Online needs to communicate with IPv4 partner nodes, you must specify LOOKUP=IPV4ONLY on the LINK or PROCESSGROUP definition. For details, see &amp;quot;Usage Notes&amp;quot; in [[DEFINE LINK command: Horizon for TCP/IP|DEFINE LINK: Horizon for TCP/IP]].&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: System manager commands]]&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=DaysToString_(Float_function)&amp;diff=82303</id>
		<title>DaysToString (Float function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=DaysToString_(Float_function)&amp;diff=82303"/>
		<updated>2015-12-28T21:11:49Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: This one takes positive number only for some reason.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Float:DaysToString subtitle}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;DaysToString&amp;lt;/var&amp;gt; [[Intrinsic classes|intrinsic]] function operates on a &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing days since 1900 and returns a formatted string representing that date/time.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Float:DaysToString syntax}}&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%string&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A variable to receive the formatted [[Datetime_string_formats|date/time string]] result of the &amp;lt;var&amp;gt;DaysToString&amp;lt;/var&amp;gt; method.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;float&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing days since 1900. Range 0 - 2958463.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;format&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A valid [[Datetime_string_formats|date/time string format]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;DaysToString&amp;lt;/var&amp;gt; function is available as of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Sirius Mods&amp;lt;/var&amp;gt; Version 7.8. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;These statements use &amp;lt;var&amp;gt;DaysToString&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[StringToDays (String_function)|StringToDays]]&amp;lt;/var&amp;gt; to convert a value in &amp;lt;code&amp;gt;MM/DD/YY&amp;lt;/code&amp;gt; format to the &amp;lt;code&amp;gt;Month DAY, YYYY&amp;lt;/code&amp;gt; format. They also show the effect of the &amp;lt;var&amp;gt;CentSpan&amp;lt;/var&amp;gt; parameter:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;printText {~=&#039;12/22/11&#039;:stringToDays(&#039;MM/DD/YY&#039;, centspan=2000):daysToString(&#039;Month DAY, YYYY&#039;)}&lt;br /&gt;
&lt;br /&gt;
printText {~=&#039;12/22/11&#039;:stringToDays(&#039;MM/DD/YY&#039;, centspan=1910):daysToString(&#039;Month DAY, YYYY&#039;)} &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The results are:&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;&#039;12/22/11&#039;:stringToDays(&#039;MM/DD/YY&#039;, centspan=2000):daysToString(&#039;Month DAY, YYYY&#039;)=December 22, 2011 &lt;br /&gt;
&lt;br /&gt;
&#039;12/22/11&#039;:stringToDays(&#039;MM/DD/YY&#039;, centspan=1910):daysToString(&#039;Month DAY, YYYY&#039;)=December 22, 1911  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;See also the &amp;lt;var&amp;gt;StringToDays&amp;lt;/var&amp;gt; [[StringToDays (String function)#Examples|examples]].&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related intrinsic methods (provide conversion from one form of date representation to another):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[MillisecondsToString (Float_function)|MillisecondsToString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[SecondsToString (Float_function)|SecondsToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToDays (String_function)|StringToDays]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToMilliseconds (String_function)|StringToMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToSeconds (String_function)|StringToSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[TimeStringConvert (String_function)|TimeStringConvert]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; methods:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeMilliseconds (System function)|CurrentTimeMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeSeconds (System function)|CurrentTimeSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeDays (System function)|CurrentTimeDays ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeString (System function)|CurrentTimeString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Float:DaysToString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=MillisecondsToString_(Float_function)&amp;diff=82302</id>
		<title>MillisecondsToString (Float function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=MillisecondsToString_(Float_function)&amp;diff=82302"/>
		<updated>2015-12-28T20:51:44Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Oops never mind&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Float:MillisecondsToString subtitle}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;MillisecondsToString&amp;lt;/var&amp;gt; [[Intrinsic classes|intrinsic]] function operates on a &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing milliseconds since 1900 and returns a formatted string representing that date/time.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Float:MillisecondsToString syntax}}&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%string&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A variable to receive the formatted [[Datetime_string_formats|date/time string]] result of the &amp;lt;var&amp;gt;MillisecondsToString&amp;lt;/var&amp;gt; method.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;float&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing milliseconds since 1900. Range -4638816000000 - 255611289599999.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;format&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A valid [[Datetime_string_formats|date/time string format]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
See the &amp;lt;var&amp;gt;StringToMilliseconds&amp;lt;/var&amp;gt; [[StringToMilliseconds (String function)#Examples|example]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related intrinsic methods (provide conversion from one form of date representation to another):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[DaysToString (Float_function)|DaysToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[SecondsToString (Float_function)|SecondsToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToDays (String_function)|StringToDays]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToMilliseconds (String_function)|StringToMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToSeconds (String_function)|StringToSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[TimeStringConvert (String_function)|TimeStringConvert]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; methods:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeMilliseconds (System function)|CurrentTimeMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeSeconds (System function)|CurrentTimeSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeDays (System function)|CurrentTimeDays ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeString (System function)|CurrentTimeString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Float:MillisecondsToString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=MillisecondsToString_(Float_function)&amp;diff=82301</id>
		<title>MillisecondsToString (Float function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=MillisecondsToString_(Float_function)&amp;diff=82301"/>
		<updated>2015-12-28T20:48:02Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Same thing x 1000&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Float:MillisecondsToString subtitle}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;MillisecondsToString&amp;lt;/var&amp;gt; [[Intrinsic classes|intrinsic]] function operates on a &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing milliseconds since 1900 and returns a formatted string representing that date/time.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Float:MillisecondsToString syntax}}&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%string&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A variable to receive the formatted [[Datetime_string_formats|date/time string]] result of the &amp;lt;var&amp;gt;MillisecondsToString&amp;lt;/var&amp;gt; method.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;float&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing milliseconds since 1900. Range -4638816000000 - 255611289599999.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;format&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A valid [[Datetime_string_formats|date/time string format]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
See the &amp;lt;var&amp;gt;StringToMilliseconds&amp;lt;/var&amp;gt; [[StringToMilliseconds (String function)#Examples|example]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related intrinsic methods (provide conversion from one form of date representation to another):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[DaysToString (Float_function)|DaysToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[SecondsToString (Float_function)|SecondsToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[MillisecondsToString (Float_function)|MillisecondsToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToDays (String_function)|StringToDays]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToMilliseconds (String_function)|StringToMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToSeconds (String_function)|StringToSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[TimeStringConvert (String_function)|TimeStringConvert]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; methods:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeMilliseconds (System function)|CurrentTimeMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeSeconds (System function)|CurrentTimeSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeDays (System function)|CurrentTimeDays ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeString (System function)|CurrentTimeString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Float:MillisecondsToString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=MillisecondsToString_(Float_function)&amp;diff=82300</id>
		<title>MillisecondsToString (Float function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=MillisecondsToString_(Float_function)&amp;diff=82300"/>
		<updated>2015-12-28T20:43:55Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Negative numbers work just fine.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Float:MillisecondsToString subtitle}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;MillisecondsToString&amp;lt;/var&amp;gt; [[Intrinsic classes|intrinsic]] function operates on a &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing milliseconds since 1900 and returns a formatted string representing that date/time.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Float:MillisecondsToString syntax}}&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%string&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A variable to receive the formatted [[Datetime_string_formats|date/time string]] result of the &amp;lt;var&amp;gt;MillisecondsToString&amp;lt;/var&amp;gt; method.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;float&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing milliseconds since 1900. Range -4638816000000 - 255611289599999.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;format&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A valid [[Datetime_string_formats|date/time string format]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
See the &amp;lt;var&amp;gt;StringToMilliseconds&amp;lt;/var&amp;gt; [[StringToMilliseconds (String function)#Examples|example]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related intrinsic methods (provide conversion from one form of date representation to another):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[DaysToString (Float_function)|DaysToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[SecondsToString (Float_function)|SecondsToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToDays (String_function)|StringToDays]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToMilliseconds (String_function)|StringToMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToSeconds (String_function)|StringToSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[TimeStringConvert (String_function)|TimeStringConvert]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; methods:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeMilliseconds (System function)|CurrentTimeMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeSeconds (System function)|CurrentTimeSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeDays (System function)|CurrentTimeDays ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeString (System function)|CurrentTimeString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Float:MillisecondsToString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SecondsToString_(Float_function)&amp;diff=82299</id>
		<title>SecondsToString (Float function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SecondsToString_(Float_function)&amp;diff=82299"/>
		<updated>2015-12-28T20:39:54Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Yea it will take negative numbers.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Float:SecondsToString subtitle}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;SecondsToString&amp;lt;/var&amp;gt; [[Intrinsic classes|intrinsic]] function operates on a &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing seconds since 1900 and returns a formatted string representing that date/time.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Float:SecondsToString syntax}}&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%string&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A variable to receive the formatted [[Datetime_string_formats|date/time string]] result of the &amp;lt;var&amp;gt;SecondsToString&amp;lt;/var&amp;gt; method.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;float&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Float&amp;lt;/var&amp;gt; value representing seconds since 1900.  Range -4638816000 - 255611289599.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;format&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A valid [[Datetime_string_formats|date/time string format]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
See the &amp;lt;var&amp;gt;StringToSeconds&amp;lt;/var&amp;gt; [[StringToSeconds (String function)#Examples|example]].&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related intrinsic methods (provide conversion from one form of date representation to another):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[DaysToString (Float_function)|DaysToString]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[MillisecondsToString (Float_function)|MillisecondsToString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToDays (String_function)|StringToDays]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToMilliseconds (String_function)|StringToMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[StringToSeconds (String_function)|StringToSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[TimeStringConvert (String_function)|TimeStringConvert]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Related &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; methods:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeMilliseconds (System function)|CurrentTimeMilliseconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeSeconds (System function)|CurrentTimeSeconds]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeDays (System function)|CurrentTimeDays ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;[[CurrentTimeString (System function)|CurrentTimeString ]]&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Float:SecondsToString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=WakeupAt_(System_function)&amp;diff=82298</id>
		<title>WakeupAt (System function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=WakeupAt_(System_function)&amp;diff=82298"/>
		<updated>2015-12-28T20:24:32Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: 12 hour limit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:System:WakeupAt subtitle}}&lt;br /&gt;
The &amp;lt;var&amp;gt;[[WakeupAt (System function)|WakeupAt]]&amp;lt;/var&amp;gt; function is an enhanced alternative      &lt;br /&gt;
as the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Pause&amp;lt;/var&amp;gt; statement, allowing wakeup time resolution of 1 millisecond,&lt;br /&gt;
and returns the current time in milliseconds.                                             &lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:System:WakeupAt syntax}}&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%number&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;The current time, after waking up, in milliseconds.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th nowrap=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;nobr&amp;quot;&amp;gt;%(System)&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. &amp;lt;var&amp;gt;WakeupAt&amp;lt;/var&amp;gt; can also be invoked via a &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; object variable, which may be &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;timeInMilliseconds&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The time, in milliseconds, at which to wake up. May not be more than 12 hours in the future. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The following code fragment pauses for 1 second at the start of each iteration of the &amp;lt;var&amp;gt;Repeat&amp;lt;/var&amp;gt; loop:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%time = %(system):[[CurrentTimeMilliseconds (System function)|currentTimeMilliseconds]]&lt;br /&gt;
repeat&lt;br /&gt;
   %time = %time + 1000&lt;br /&gt;
   %time = %(system):wakeupAt(%time)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template:System:WakeupAt footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=LOGWHO_command&amp;diff=81820</id>
		<title>LOGWHO command</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=LOGWHO_command&amp;diff=81820"/>
		<updated>2015-12-09T20:10:46Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Leading zeros&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Privileges&lt;br /&gt;
&amp;lt;dd&amp;gt;System administrator&lt;br /&gt;
&amp;lt;dt&amp;gt;Function&lt;br /&gt;
&amp;lt;dd&amp;gt;Lists the user IDs of all users who are currently logged in to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Format==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOGWHO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Syntax notes==&lt;br /&gt;
LOGWHO &amp;lt;b&amp;gt;can&amp;lt;/b&amp;gt; be issued from within a procedure - this has been the case since V6R1, or perhaps longer.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOGWHO&lt;br /&gt;
USER 0 SUPERKLUGE&lt;br /&gt;
USER 1 CCA CENSUS CARS&lt;br /&gt;
USER 3 DPH HEALTH&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;p&amp;gt;The LOGWHO command lists the user IDs of all users currently logged in to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. LOGWHO also lists each SNA Communications Server (formerly VTAM) terminal that is in session with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; even if no user is currently logged in through that thread; in this case, NO ACCOUNT appears in the user ID field of the output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;For each user ID listed, LOGWHO provides a terminal identification field if the SNA Communications Server or IUCV access method is being used by that thread. LOGWHO also displays the names of any files opened by each user ID.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
LOGWHO also lists process and processgroup names.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====LOGWHO for PQO====&lt;br /&gt;
For Parallel Query Option/204 (PQO) users, the LOGWHO display depends on whether it is issued for a client or server. Issued at a client node, LOGWHO shows the remote files currently open. Issued at a server node for a service thread, the display includes identification of client users and any service thread subsystem. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the PQO display follows. The fields are left-justified and blank-filled, except for nn, the user number, which is right-justified, zero-filled, and in a field of two digits for numbers 0 through 99 or of as many digits necessary for larger numbers. &amp;lt;b&amp;gt;bb&amp;lt;/b&amp;gt; is two blanks.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;USER nn userid&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;termid&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;file1&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;file2...&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
[CLNT:&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;mmmmm&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;ON&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;bb&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;clntname] [APSY: apsyname]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;th&amp;gt;Term&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Thread&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;nn&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User thread number &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User thread number of the service thread&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;userid&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User login ID&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client user&#039;s login ID&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;termid&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User terminal ID or z/VM machine name&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client&#039;s node name as specified on local DEFINE PROCESSGROUP command REMOTEID parameter&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th rowspan=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;i&amp;gt;file1, file2,&amp;lt;/i&amp;gt;...&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Names of any open local files, and&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Names of open remote files, using the full remote file specification (filename AT location)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Names of any open local files&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;mmmmm  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;User number of the client thread currently using the service thread&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;clntname&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Client User 0 LOCATION parameter value&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;apsyname&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Service&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Name of the subsystem into which service thread is logged, if any&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In addition to the list of regular user IDs, LOGWHO prints a list of terminal lines that have encountered severe I/O errors and have been shut down (dead users). Also printed is a list of users to be reactivated (hardwired terminals that have been temporarily shut down because of I/O errors and that can be reactivated with the REACTIVATE command).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To execute the LOGWHO command, reply STATUS to the outstanding HALT message.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Sending LOGWHO output to the USE data set====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If there is an open USE data set, the LOGWHO command output is directed to it. See [[RESET COMMAND command|RESET COMMAND: Control USE data set support]] for a discussion of how to direct the output.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: System administrator commands]]&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$X2C&amp;diff=81769</id>
		<title>$X2C</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$X2C&amp;diff=81769"/>
		<updated>2015-11-17T19:17:12Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Lower case text really prints lower case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;The $X2C function changes a 2-byte character of input into 1-byte hexadecimal-equivalent EBCDIC characters. Called with a character string, $X2C returns a character string that is half as long. The maximum input length is 255 bytes. If the input length is more than 255 bytes or if input contains invalid hexadecimal data, a null string is returned. There is no function to translate 2-byte hexadecimal characters to ASCII characters. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The output is one half the length of the input. Each pair of hexadecimal characters in the output becomes an EBCDIC character. For example, &lt;br /&gt;
C&#039;01&#039; = X&#039;01&#039; or E8C5E2 = &#039;YES.&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The format for the $X2C function is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$X2C(inputchar)   &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where inputchar is the input character string (either a %variable or a quoted literal) to be converted to one-byte hexadecimal-equivalent characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Input must be an even number of bytes (divisible by 2) and contain only combinations of the following characters:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;0123456789ABCDEF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If the input character string is invalid for any reason and cannot be converted, then the output string returned by the function is set to a null.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
  %INPUT_IN_HEX = &#039;05&#039;&lt;br /&gt;
  %PAD_CHAR = $X2C(%INPUT_IN_HEX)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
PRINT $X2C(&#039;C1C2C3&#039;)&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
(output is ABC)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
PRINT $X2C(&#039;F1&#039;)&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
(output is 1)    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;This example produces a hexadecimal to decimal conversion:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PROCEDURE X2D&lt;br /&gt;
B&lt;br /&gt;
PRINT $UNBIN($X2C($PAD($READ(&#039;X2D enter hex value&#039;),&#039;0&#039;,8)))&lt;br /&gt;
END&lt;br /&gt;
END PROCEDURE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;resulting in this output:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$$X2D enter hex value  &amp;lt;--- $READ prompt&lt;br /&gt;
FC35                   &amp;lt;--- User enters some hexadecimal input&lt;br /&gt;
64565                  &amp;lt;--- Procedure prints output value in Decimal&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:SOUL $functions]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$ItsOpen&amp;diff=81540</id>
		<title>$ItsOpen</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$ItsOpen&amp;diff=81540"/>
		<updated>2015-11-05T21:19:48Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: That&amp;#039;s a data line, not a header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;The $ITSOPEN function lets you determine whether a file is open. $ITSOPEN only checks files, not groups of files. The return codes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;the file is not open&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;the file is open&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The format for the $ITSOPEN function is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$ITSOPEN({[FILE] name [AT location] | [PERM | TEMP] [GROUP] name})&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where name (optional) is a %variable or a literal name of the file or group. You &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;must&amp;lt;/var&amp;gt; enter the filename in uppercase. A file synonym name can also be used. If you do not enter a location (specifying a null argument), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses the reference context (at compile time) of the statement which calls the function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%FILE IS STRING LEN 8&lt;br /&gt;
%FILE = $READ(&#039;ENTER THE FILENAME&#039;)&lt;br /&gt;
IF $ITSOPEN(%FILE) THEN&lt;br /&gt;
     PRINT %FILE &#039; IS OPEN&#039;&lt;br /&gt;
ELSE &lt;br /&gt;
     PRINT %FILE &#039; IS NOT OPEN&#039;&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:SOUL $functions]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$ItsOpen&amp;diff=81539</id>
		<title>$ItsOpen</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$ItsOpen&amp;diff=81539"/>
		<updated>2015-11-05T21:14:09Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: needed a length&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;The $ITSOPEN function lets you determine whether a file is open. $ITSOPEN only checks files, not groups of files. The return codes are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;0&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;the file is not open&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;the file is open &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The format for the $ITSOPEN function is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$ITSOPEN({[FILE] name [AT location]&lt;br /&gt;
&lt;br /&gt;
 | [PERM | TEMP] [GROUP] name})&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where name (optional) is a %variable or a literal name of the file or group. You &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;must&amp;lt;/var&amp;gt; enter the filename in uppercase. A file synonym name can also be used. If you do not enter a location (specifying a null argument), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses the reference context (at compile time) of the statement which calls the function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%FILE IS STRING LEN 8&lt;br /&gt;
%FILE = $READ(&#039;ENTER THE FILENAME&#039;)&lt;br /&gt;
IF $ITSOPEN(%FILE) THEN&lt;br /&gt;
     PRINT %FILE &#039; IS OPEN&#039;&lt;br /&gt;
ELSE &lt;br /&gt;
     PRINT %FILE &#039; IS NOT OPEN&#039;&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:SOUL $functions]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Object_variables&amp;diff=81477</id>
		<title>Object variables</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Object_variables&amp;diff=81477"/>
		<updated>2015-10-29T23:16:56Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: &amp;amp;apos;&amp;amp;apos; to avoid italics&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An object variable is a proxy or substitute for an object. You do not access or perform actions against an object directly but instead via operations on an object variable that references the object. This page discusses how you &lt;br /&gt;
create, work with, and discard object variables.&lt;br /&gt;
==Why use an object reference instead of an object==&lt;br /&gt;
Object variables are used to declare variables that refer to instances of&lt;br /&gt;
a class.&lt;br /&gt;
Despite their name, they are not really objects, as such,&lt;br /&gt;
but references or pointers to objects.&lt;br /&gt;
The underlying objects themselves are never directly accessible and can only&lt;br /&gt;
be accessed via an object reference.&lt;br /&gt;
This concept of reference variables being used to access underlying objects&lt;br /&gt;
is common to all object-oriented languages.&lt;br /&gt;
There are two, primary reasons for this:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Objects can get quite large, and moving them around an application&lt;br /&gt;
rather than moving references around would be extremely expensive.&lt;br /&gt;
&amp;lt;li&amp;gt;Objects usually represent some &amp;quot;real world&amp;quot; entity.&lt;br /&gt;
To have multiple copies of such an entity in an application creates&lt;br /&gt;
the possibility that these copies would get out of synch, causing&lt;br /&gt;
application complexity and even bugs.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assignment and comparison operations are&lt;br /&gt;
probably the two most significant places to note the distinction between&lt;br /&gt;
object variables being references to the objects or the objects themselves.&lt;br /&gt;
The following is an example of assignment of an object reference, rather&lt;br /&gt;
than an object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
      variable type  is string len 16&lt;br /&gt;
   end public&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%rover     is object pet&lt;br /&gt;
%fluffy    is object pet&lt;br /&gt;
 ...&lt;br /&gt;
%rover:type = &#039;Dog&#039;&lt;br /&gt;
%fluffy = %rover&lt;br /&gt;
%fluffy:type = &#039;Cat&#039;&lt;br /&gt;
print %rover:type&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because the statement &amp;lt;code&amp;gt;%fluffy = %rover&amp;lt;/code&amp;gt; assigns to %fluffy a reference&lt;br /&gt;
to the same object as %rover, both variables end up referring&lt;br /&gt;
to the same object.&lt;br /&gt;
The statement &amp;lt;code&amp;gt;%fluffy:type = &#039;Cat&#039;&amp;lt;/code&amp;gt; therefore changes&lt;br /&gt;
the underlying object pointed to by %rover (since it&#039;s the same object&lt;br /&gt;
as the one pointed to by %fluffy).&lt;br /&gt;
As a result, the Print statement prints &amp;lt;code&amp;gt;Cat&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As assignment assigns references, comparison compares references.&lt;br /&gt;
That is, a comparison between two object references does not compare the objects&lt;br /&gt;
being referred to, but it instead compares whether two object references point to&lt;br /&gt;
the same object.&lt;br /&gt;
&lt;br /&gt;
Consider the following example::&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
      variable type  is string len 16&lt;br /&gt;
   end public&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%rover     is object pet&lt;br /&gt;
%fluffy    is object pet&lt;br /&gt;
 ...&lt;br /&gt;
%rover = new&lt;br /&gt;
%fluffy = new&lt;br /&gt;
%rover:type = &#039;Dog&#039;&lt;br /&gt;
%fluffy:type = &#039;Dog&#039;&lt;br /&gt;
if %fluffy eq %rover then&lt;br /&gt;
   print &#039;They&amp;amp;apos;&amp;amp;apos;re equal!&#039;&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will not print &amp;lt;code&amp;gt;They&#039;re equal&amp;lt;/code&amp;gt;.&lt;br /&gt;
Even though the objects&lt;br /&gt;
pointed to by %fluffy and %rover have the same variable values, they&lt;br /&gt;
are different objects, so %fluffy is not equal to %rover.&lt;br /&gt;
However, if the code were changed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
      variable type  is string len 16&lt;br /&gt;
   end public&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%rover     is object pet&lt;br /&gt;
%fluffy    is object pet&lt;br /&gt;
 ...&lt;br /&gt;
%rover:type = &#039;Dog&#039;&lt;br /&gt;
%rover = %fluffy&lt;br /&gt;
if %fluffy eq %rover then&lt;br /&gt;
   print &#039;They&amp;amp;apos;&amp;amp;apos;re equal!&#039;&lt;br /&gt;
end if&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;They&#039;re equal&amp;lt;/code&amp;gt; will be printed, because &amp;lt;code&amp;gt;%rover = %fluffy&amp;lt;/code&amp;gt;&lt;br /&gt;
sets &amp;lt;code&amp;gt;%rover&amp;lt;/code&amp;gt; to point to the same object as &amp;lt;code&amp;gt;%fluffy&amp;lt;/code&amp;gt;, making them equal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
Since order comparisons (GE, LE, GT, and LT) are meaningless for references &amp;amp;mdash;&lt;br /&gt;
when is a reference to one object greater than a reference to another? &amp;amp;mdash;&lt;br /&gt;
only equality and inequality (EQ and NE) comparisons are allowed for objects. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Despite the foregoing remarks, for most purposes, one can still think of&lt;br /&gt;
object variables as being&lt;br /&gt;
the objects themselves, rather than references to the object.&lt;br /&gt;
For example, in the statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%rover:type = &#039;Ferret&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it is quite natural to think of the statement as setting %rover&#039;s Type to&lt;br /&gt;
&amp;quot;ferret,&amp;quot; rather than as setting the type of the object referenced&lt;br /&gt;
by %rover to &amp;quot;Ferret.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Creating object instances==&lt;br /&gt;
Since object variables are references to objects, two questions naturally&lt;br /&gt;
arise: what object does an object variable refer to initially, and&lt;br /&gt;
where does the referenced object come from?&lt;br /&gt;
The answer to the first question is that an object variable initially&lt;br /&gt;
points to &#039;&#039;no&#039;&#039; object.&lt;br /&gt;
So, the following program would cause a request cancellation error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
      variable type  is string len 16&lt;br /&gt;
   end public&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%rover     is object pet&lt;br /&gt;
 &lt;br /&gt;
%rover:type = &#039;Dog&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The statement &amp;lt;code&amp;gt;%rover:type = &#039;Dog&#039;&amp;lt;/code&amp;gt; attempts to set the object&#039;s&lt;br /&gt;
type to &amp;quot;Dog,&amp;quot; but there is no instance of an object for&lt;br /&gt;
which to set the type.&lt;br /&gt;
This kind of error is sometimes referred to as a &#039;&#039;&#039;null pointer&lt;br /&gt;
exception&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
So how, then, is an object created?&lt;br /&gt;
The answer is via a &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;, usually the default one named &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Using New or other Constructors===&lt;br /&gt;
When you invoke a &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; method, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; creates an object instance which is available to the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; code. The &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Operates on the new instance (which is the value of &amp;lt;code&amp;gt;%this&amp;lt;/code&amp;gt; within the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;p&amp;gt;Unlike a shared method, a &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; operates on an object instance.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Returns the value of &amp;lt;code&amp;gt;%this&amp;lt;/code&amp;gt; as the result. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Like a &amp;lt;var&amp;gt;Subroutine&amp;lt;/var&amp;gt;, the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;&#039;s &amp;lt;var&amp;gt;Return&amp;lt;/var&amp;gt; statement may not specify a value, but like a &amp;lt;var&amp;gt;Function&amp;lt;/var&amp;gt;, the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; does produce a result.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In any non-&amp;lt;var&amp;gt;[[Dynamic dispatch#Overridable versus Abstract methods|Abstract]]&amp;lt;/var&amp;gt; class, you can invoke a default &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;, named &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt;, which operates no further on &amp;lt;code&amp;gt;%this&amp;lt;/code&amp;gt; and simply returns a new instance for explicit or implicit assignment. As described below, you can explicitly define &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; to operate on the new instance, you can define other constructors in addition to &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt;, and you can also [[#Private constructors|&amp;quot;disallow&amp;quot;]] &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; from use outside the class definition.&lt;br /&gt;
&lt;br /&gt;
====Syntax for Constructors====&lt;br /&gt;
The syntax for invoking a &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; is the same as the syntax for&lt;br /&gt;
invoking a &amp;lt;var&amp;gt;Shared&amp;lt;/var&amp;gt; method which returns an instance of the class.&lt;br /&gt;
&lt;br /&gt;
To invoke the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; constructor and assign its result:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%rover = new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
You can explicitly indicate the class of the object as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%rover = %(pet):new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While specifying the class in this way is unnecessary and might&lt;br /&gt;
be viewed as detrimental because it results in the class name&lt;br /&gt;
being sprinkled around inside application code, it might also&lt;br /&gt;
be viewed as beneficial &amp;amp;mdash; making the object class&lt;br /&gt;
clear in the part of code where the object is created.&lt;br /&gt;
&lt;br /&gt;
====Customizing a Constructor====&lt;br /&gt;
Sometimes it is useful to run code when creating an instance of a class.&lt;br /&gt;
In such cases, you can explicitly define the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
      variable initTime is float&lt;br /&gt;
      constructor new&lt;br /&gt;
   end public&lt;br /&gt;
   constructor new&lt;br /&gt;
      %initTime = $sir_datens&lt;br /&gt;
   end constructor&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the class variable &amp;lt;code&amp;gt;initTime&amp;lt;/code&amp;gt; is set&lt;br /&gt;
to the time the instance of the object is created.&lt;br /&gt;
That code runs when the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; is invoked in a program to create a &amp;lt;code&amp;gt;pet&amp;lt;/code&amp;gt; instance:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%josh  is object pet&lt;br /&gt;
 ...&lt;br /&gt;
%josh = new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes it is useful to have a constructor take parameters.&lt;br /&gt;
For example, if it doesn&#039;t make sense to have a Pet object without&lt;br /&gt;
a Type, make the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; constructor require an input parameter that&lt;br /&gt;
sets the class Type variable:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
      variable type  is string len 16&lt;br /&gt;
      constructor new(%type is string len 16)&lt;br /&gt;
   end public&lt;br /&gt;
   constructor new(%type is string len 16)&lt;br /&gt;
      %this:type = %type&lt;br /&gt;
   end constructor&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The parameters&lt;br /&gt;
must be specified on the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; constructor:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%snoopy  is object pet&lt;br /&gt;
 ...&lt;br /&gt;
%snoopy = new(&#039;Beagle&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;[[Sirius Mods]]&amp;lt;/var&amp;gt; Version 7.2,&lt;br /&gt;
constructors are allowed to change the object being constructed.&lt;br /&gt;
For example, variable &amp;lt;code&amp;gt;ExistingObj&amp;lt;/code&amp;gt; assigns&lt;br /&gt;
an existing &amp;lt;code&amp;gt;Dachsie&amp;lt;/code&amp;gt; object when constructor &amp;lt;code&amp;gt;Newbie&amp;lt;/code&amp;gt; is called:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class dachsie&lt;br /&gt;
   public&lt;br /&gt;
    ...&lt;br /&gt;
     constructor newbie&lt;br /&gt;
    ...&lt;br /&gt;
   end public&lt;br /&gt;
 &lt;br /&gt;
   public shared&lt;br /&gt;
     variable ExistingObj is object dachsie&lt;br /&gt;
   end public shared&lt;br /&gt;
 &lt;br /&gt;
   constructor newbie&lt;br /&gt;
     %this = %(this):existingObj&lt;br /&gt;
   end constructor&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, this feature was actually provided for a different purpose,&lt;br /&gt;
and using it in the context shown above requires caution.&lt;br /&gt;
While &amp;lt;code&amp;gt;%this&amp;lt;/code&amp;gt; is an input parameter to the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt;, changing it changes the&lt;br /&gt;
object returned to the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; invoker, so it acts almost like an output parameter.&lt;br /&gt;
Modifying &amp;lt;code&amp;gt;%this&amp;lt;/code&amp;gt; within the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; can also produce unexpected behavior&lt;br /&gt;
if the &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; is itself called from an [[Inheritance and polymorphism|extension class Construct statement]].&lt;br /&gt;
&lt;br /&gt;
Instead of using a &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; to return a modified object as in the example&lt;br /&gt;
above, you should consider using a [[#Virtual Constructor methods|&amp;quot;factory method&amp;quot;]].&lt;br /&gt;
&lt;br /&gt;
====Other ways to use a Constructor====&lt;br /&gt;
A &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; can also be used in these ways:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To specify a new instance of a class as an input parameter to a method:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
    ...&lt;br /&gt;
     subroutine compare(%pet is object pet)&lt;br /&gt;
    ...&lt;br /&gt;
   end public&lt;br /&gt;
  ...&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%lassie is object pet&lt;br /&gt;
 ...&lt;br /&gt;
%lassie:compare( new(&#039;Collie&#039;) )&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Without being explicitly specified,&lt;br /&gt;
to automatically create an instance of an object&lt;br /&gt;
when an object variable is first referenced.&lt;br /&gt;
For such instantiation, you must&lt;br /&gt;
specify &amp;lt;var&amp;gt;[[Classes and Objects#The Auto keyword on object declarations|Auto New]]&amp;lt;/var&amp;gt; in the object&#039;s declaration.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using multiple Constructors====&lt;br /&gt;
Most object-oriented languages support only a single constructor name for a class.&lt;br /&gt;
If multiple constructors are needed, this is achieved with overloading &amp;amp;mdash;&lt;br /&gt;
the use of different methods with the same name that are distinguished by&lt;br /&gt;
their parameter lists.&lt;br /&gt;
Overloading, however, can be confusing, and it is limited: you can&#039;t&lt;br /&gt;
have multiple methods with the same name and the same datatypes in the&lt;br /&gt;
parameter list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; supports &#039;&#039;&#039;multiple constructors&#039;&#039;&#039;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class resource&lt;br /&gt;
   public&lt;br /&gt;
     constructor newFromUrl(%url is string len 255)&lt;br /&gt;
     constructor newFromProc(%proc is string len 255)&lt;br /&gt;
      ...&lt;br /&gt;
   end public&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
  ...&lt;br /&gt;
%res  is object resource&lt;br /&gt;
  ...&lt;br /&gt;
%res = newFromUrl(&#039;http://nfl.com/score&#039;)&lt;br /&gt;
  ...&lt;br /&gt;
%res = newFromProc(&#039;LOCAL.RESOURCE.PROC&#039;)&lt;br /&gt;
  ...&lt;br /&gt;
%res = new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example illustrates:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Constructors not called New are invoked in exactly the same way&lt;br /&gt;
as the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; constructor.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A function that invokes a constructor can be used in any other&lt;br /&gt;
context in which the &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; can be used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It is recommended that you always begin &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; names with the&lt;br /&gt;
word &amp;quot;New&amp;quot; to distinguish them from other methods.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Private Constructors====&lt;br /&gt;
Although this section has discussed only public constructors, that is,&lt;br /&gt;
constructors defined for use outside the class definition,&lt;br /&gt;
you may also define &#039;&#039;&#039;private constructors&#039;&#039;&#039;,&lt;br /&gt;
which may only be invoked from inside the class.&lt;br /&gt;
You declare such a &amp;lt;var&amp;gt;Constructor&amp;lt;/var&amp;gt; in the &amp;lt;var&amp;gt;Private&amp;lt;/var&amp;gt; block of a class definition,&lt;br /&gt;
and you define it with your other methods after the declaration blocks.&lt;br /&gt;
&lt;br /&gt;
If you want to define a private constructor named New, however,&lt;br /&gt;
you must make sure to specify &amp;lt;code&amp;gt;Disallow New&amp;lt;/code&amp;gt;&lt;br /&gt;
in the &amp;lt;var&amp;gt;Public&amp;lt;/var&amp;gt; block of the class definition (see [[Classes and Objects#Declaration block syntax|&amp;quot;Declaration block&lt;br /&gt;
syntax&amp;quot;]]).&lt;br /&gt;
No other private constructors require an additional &amp;lt;var&amp;gt;Disallow New&amp;lt;/var&amp;gt; in the&lt;br /&gt;
&amp;lt;var&amp;gt;Public&amp;lt;/var&amp;gt; block.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;b id=&amp;quot;Virtual Constructor methods&amp;quot;&amp;gt;&amp;lt;/b&amp;gt;Virtual constructors===&lt;br /&gt;
It is possible to have a non-constructor shared function return an&lt;br /&gt;
instance of a class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class resource&lt;br /&gt;
   public shared&lt;br /&gt;
      function newFromUrl(%url is string len 255) -&lt;br /&gt;
               is object resource&lt;br /&gt;
      ...&lt;br /&gt;
   end public shared&lt;br /&gt;
 &lt;br /&gt;
   function newFromUrl(%url is string len 255) -&lt;br /&gt;
            is object resource&lt;br /&gt;
       %return is object resource&lt;br /&gt;
       print &#039;In the factory&#039;&lt;br /&gt;
       %return = new&lt;br /&gt;
   end function&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
  ...&lt;br /&gt;
%res  is object resource&lt;br /&gt;
  ...&lt;br /&gt;
%res = %res:newFromUrl(&#039;http://nfl.com/score&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such functions are often called &#039;&#039;&#039;factory methods&#039;&#039;&#039; or&lt;br /&gt;
virtual constructors.&lt;br /&gt;
As the example illustrates, two things distinguish factory methods&lt;br /&gt;
from constructors:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;They can run code before the object is instantiated.&lt;br /&gt;
&amp;lt;li&amp;gt;They might not actually instantiate an object but return a reference to an existing instance. Such a method may not truly be a factory method.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
The support for multiple constructors means that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt;&lt;br /&gt;
users need factory methods less than those using&lt;br /&gt;
most other object-oriented programming languages.&lt;br /&gt;
&lt;br /&gt;
Virtual constructors can be invoked in much the same way that regular constructors are invoked, that is, without specifying the class name if the class name can be determined from context.&lt;br /&gt;
For example, the above example of the NewFromUrl virtual constructor can be changed to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%res  is object resource&lt;br /&gt;
  ...&lt;br /&gt;
%res = newFromUrl(&#039;http://nfl.com/score&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, if a method called Send in class Coworker took a resource&lt;br /&gt;
object as an input parameter, the NewFromUrl virtual constructor could&lt;br /&gt;
also be used as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%sufjan   is object coworker&lt;br /&gt;
 ...&lt;br /&gt;
%sufjan:send(newFromUrl(&#039;http://asthmatickitty.com&#039;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because the naming rules for virtual constructors are now&lt;br /&gt;
identical to that for regular constructors, the two can be used&lt;br /&gt;
interchangeably, and one can be changed to the other as requirements&lt;br /&gt;
change, without breaking existing applications.&lt;br /&gt;
&lt;br /&gt;
==Object variables within class definitions==&lt;br /&gt;
Classes can, themselves, contain object variables:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
    ...&lt;br /&gt;
      variable owner is object human&lt;br /&gt;
    ...&lt;br /&gt;
   end public&lt;br /&gt;
 ...&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remember that an object variable is not really the object itself but&lt;br /&gt;
a reference to an underlying object so, in the case of an object&lt;br /&gt;
variable inside a class block, the class does not contain another&lt;br /&gt;
object, per se, but simply a reference to another object.&lt;br /&gt;
&lt;br /&gt;
It is possible for two different classes to each contain references to each other.&lt;br /&gt;
But for an object variable to be defined, the object class must already have&lt;br /&gt;
been declared.&lt;br /&gt;
So if two classes contain references to each other, at least one must&lt;br /&gt;
be declared without the references before the other.&lt;br /&gt;
The simplest way to do this is with an empty Class block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class human&lt;br /&gt;
end class&lt;br /&gt;
 &lt;br /&gt;
class pet&lt;br /&gt;
   public&lt;br /&gt;
    ...&lt;br /&gt;
      variable owner is object human&lt;br /&gt;
    ...&lt;br /&gt;
   end public&lt;br /&gt;
 ...&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
class human&lt;br /&gt;
   public&lt;br /&gt;
    ...&lt;br /&gt;
      variable dog is object pet&lt;br /&gt;
    ...&lt;br /&gt;
   end public&lt;br /&gt;
 ...&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also possible for a class to contain object variables that&lt;br /&gt;
refer to the containing class:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class pet&lt;br /&gt;
   public&lt;br /&gt;
    ...&lt;br /&gt;
      variable sibling is object pet&lt;br /&gt;
    ...&lt;br /&gt;
   end public&lt;br /&gt;
 ...&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In such a case, no empty &amp;lt;var&amp;gt;Class&amp;lt;/var&amp;gt; block is necessary to declare the class&lt;br /&gt;
because the &amp;lt;var&amp;gt;Class&amp;lt;/var&amp;gt; block containing the object variable is sufficient&lt;br /&gt;
to declare the existence of the class.&lt;br /&gt;
&lt;br /&gt;
==Discarding objects==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;New&amp;lt;/var&amp;gt; constructor creates an instance of a class.&lt;br /&gt;
This instance is maintained until it is either implicitly or explicitly&lt;br /&gt;
discarded (or destroyed in the terminology of some object-oriented languages).&lt;br /&gt;
===Discarding explicitly===&lt;br /&gt;
&lt;br /&gt;
An underlying object can be discarded explicitly by invoking the &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt;&lt;br /&gt;
method (system subroutine) against it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%mick   is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%mick = new(&#039;Terrier&#039;)&lt;br /&gt;
 ...&lt;br /&gt;
* Done with object pointed to by %mick&lt;br /&gt;
%mick:discard&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Discard method never takes any input parameters and returns no value,&lt;br /&gt;
so it is a Subroutine.&lt;br /&gt;
The Discard method is an AllowNullObject method because it can be invoked&lt;br /&gt;
with a null object, such as one that was never set:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%mick   is object dog&lt;br /&gt;
 &lt;br /&gt;
for %i from 1 to 10&lt;br /&gt;
   %mick:discard&lt;br /&gt;
   ...&lt;br /&gt;
end for&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first loop iteration, above, &amp;lt;code&amp;gt;%mick&amp;lt;/code&amp;gt; would not be set, so the&lt;br /&gt;
&amp;lt;code&amp;gt;%mick:discard&amp;lt;/code&amp;gt; call would not have anything to discard,&lt;br /&gt;
but it would not indicate a request-cancelling null-pointer error.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Not all objects may be discarded explicitly: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Some objects are integral parts of other objects, and discarding one cannot be done without compromising the other. For example, you may not explicitly &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt; an XmlNode object, though as discussed [[#xmlnode|below]], you may discard it by using the &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; method.&lt;br /&gt;
&amp;lt;li&amp;gt;Some objects may be explicitly defined with a &amp;lt;var&amp;gt;[[Classes and Objects#Disallow clause|Disallow Discard]]&amp;lt;/var&amp;gt; clause, which protects them from being discarded directly.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Discarding implicitly===&lt;br /&gt;
Objects may be discarded implicitly, when there are no&lt;br /&gt;
more references to the underlying object.&lt;br /&gt;
If there are no references to an underlying object, there is no&lt;br /&gt;
way to retrieve or set values in the object or to invoke methods against&lt;br /&gt;
the object.&lt;br /&gt;
Since there is no reason to maintain the object any more, the&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus SOAP User Language Interface&amp;lt;/var&amp;gt; automatically discards the object.&lt;br /&gt;
The following code demonstrates this principle:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%bunny   is object dog&lt;br /&gt;
  ...&lt;br /&gt;
%bunny = new(&#039;Ibizan Hound&#039;)&lt;br /&gt;
%bunny:show&lt;br /&gt;
%bunny:feed&lt;br /&gt;
%bunny = new(&#039;Yorkshire Terrier&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the statement &amp;lt;code&amp;gt;%bunny = new(&#039;Yorkshire terrier&#039;)&amp;lt;/code&amp;gt; is executed,&lt;br /&gt;
a new object is created, but it is no longer possible to access the object&lt;br /&gt;
instantiated by &amp;lt;code&amp;gt;%bunny = new(&#039;Ibizan hound&#039;)&amp;lt;/code&amp;gt; &amp;amp;mdash; there are&lt;br /&gt;
no longer any references to that object.&lt;br /&gt;
Because of that, the first Dog object is automatically discarded when the&lt;br /&gt;
second Dog object is created and referenced by &amp;lt;code&amp;gt;%bunny&amp;lt;/code&amp;gt;.&lt;br /&gt;
If a second reference to that object had been set, it would not have been&lt;br /&gt;
discarded:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%bunny   is object dog&lt;br /&gt;
%dallas  is object dog&lt;br /&gt;
  ...&lt;br /&gt;
%bunny = new(&#039;German Shepherd&#039;)&lt;br /&gt;
%dallas = %bunny&lt;br /&gt;
%bunny:show&lt;br /&gt;
%bunny:feed&lt;br /&gt;
%bunny = new(&#039;Yorkshire terrier&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A reference to an object can be inside another object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class dog&lt;br /&gt;
   public&lt;br /&gt;
      variable name  is string len 32&lt;br /&gt;
      variable breed is string len 32&lt;br /&gt;
      variable nextCompetitor is object&lt;br /&gt;
      ...&lt;br /&gt;
   end public&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%first   is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%first = new(&#039;Josh&#039;, &#039;Newfoundland&#039;)&lt;br /&gt;
%first:nextCompetitor = new(&#039;Mick&#039;, &#039;Kerry Blue Terrier&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the object created by&lt;br /&gt;
&amp;lt;code&amp;gt;new(&#039;Mick&#039;, &#039;Kerry Blue Terrier&#039;)&amp;lt;/code&amp;gt; can be accessed&lt;br /&gt;
via &amp;lt;code&amp;gt;%first:nextCompetitor&amp;lt;/code&amp;gt;, so it will not be implicitly&lt;br /&gt;
discarded.&lt;br /&gt;
In such a way, it is possible to build a chain of objects:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%first   is object dog&lt;br /&gt;
%last    is object dog&lt;br /&gt;
%new     is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%new   = new(&#039;Josh&#039;, &#039;Newfoundland&#039;)&lt;br /&gt;
%first = %new&lt;br /&gt;
%last  = %new&lt;br /&gt;
%new   = new(&#039;Mick&#039;, &#039;Kerry Blue Terrier&#039;)&lt;br /&gt;
%last:nextCompetitor = %new&lt;br /&gt;
%last  = %new&lt;br /&gt;
%new   = new(&#039;Les&#039;, &#039;Pekingese&#039;)&lt;br /&gt;
%last:nextCompetitor = %new&lt;br /&gt;
%last  = %new&lt;br /&gt;
%new   = new(&#039;Bunny&#039;, &#039;Ibizan Hound&#039;)&lt;br /&gt;
%last:nextCompetitor = %new&lt;br /&gt;
%last  = %new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, the object created by&lt;br /&gt;
&amp;lt;code&amp;gt;new(&#039;Les&#039;, &#039;Pekingese&#039;)&amp;lt;/code&amp;gt; can be accessed by&lt;br /&gt;
&amp;lt;code&amp;gt;%first:nextCompetitor:nextCompetitor&amp;lt;/code&amp;gt;, so it is not implicitly&lt;br /&gt;
discarded.&lt;br /&gt;
&lt;br /&gt;
By linking objects in such a way, it is possible to create a wide variety&lt;br /&gt;
of object super-structures, including chains, trees, webs, and cycles.&lt;br /&gt;
A &#039;&#039;&#039;cycle&#039;&#039;&#039; is a collection of objects where the objects are linked&lt;br /&gt;
in such a way as to form a ring:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%first   is object dog&lt;br /&gt;
%last    is object dog&lt;br /&gt;
%new     is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%new   = new(&#039;Josh&#039;, &#039;Newfoundland&#039;)&lt;br /&gt;
%first = %new&lt;br /&gt;
%last  = %new&lt;br /&gt;
%new   = new(&#039;Mick&#039;, &#039;Kerry Blue Terrier&#039;)&lt;br /&gt;
%last:nextCompetitor = %new&lt;br /&gt;
%last  = %new&lt;br /&gt;
%new   = new(&#039;Les&#039;, &#039;Pekingese&#039;)&lt;br /&gt;
%last:nextCompetitor = %first&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A cycle can even be created with a single object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%new     is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%new   = new(&#039;Josh&#039;, &#039;Newfoundland&#039;)&lt;br /&gt;
%new:nextCompetitor = %new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A web of objects can contain many cycles of objects.&lt;br /&gt;
&lt;br /&gt;
If a cycle of objects is created, each object in the cycle&lt;br /&gt;
will always have at least one reference to it &amp;amp;mdash; the previous&lt;br /&gt;
item in the cycle.&lt;br /&gt;
This means that even if all other references to the objects in a cycle&lt;br /&gt;
were eliminated, the objects would still not be discarded because they&lt;br /&gt;
would each still have a reference to them, even though those references,&lt;br /&gt;
themselves, aren&#039;t reachable from any variables in the request.&lt;br /&gt;
The following illustrates a case where two objects cannot be reached via&lt;br /&gt;
any %variable, but they won&#039;t be discarded because they reference each other:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%first   is object dog&lt;br /&gt;
%last    is object dog&lt;br /&gt;
%new     is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%first = new(&#039;Josh&#039;, &#039;Newfoundland&#039;)&lt;br /&gt;
%new   = new(&#039;Mick&#039;, &#039;Kerry Blue Terrier&#039;)&lt;br /&gt;
%first:nextCompetitor = %new&lt;br /&gt;
%new:nextCompetitor   = %first&lt;br /&gt;
%new   = new(&#039;Les&#039;, &#039;Pekingese&#039;)&lt;br /&gt;
%first = %new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such objects will not be discarded by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; until the user logs off.&lt;br /&gt;
Most object-oriented languages solve this problem with [[Global and session objects#Managing object storage|garbage collection]] &amp;amp;mdash; a process in which all objects are scanned to determine if they are &amp;quot;reachable&amp;quot; from some base variables (in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; these would be local and common %variables).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; has a &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; method, which provides an alternative approach to&lt;br /&gt;
some of these cases that is less expensive than garbage collection and simpler than &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; is discussed in the next section.&lt;br /&gt;
&lt;br /&gt;
==Deep discard of objects==&lt;br /&gt;
The Discard method ([[Global and session objects#Using system class methods to access global and session objects|Object class]] subroutine) is usually available to explicitly&lt;br /&gt;
discard the object referenced by an object variable.&lt;br /&gt;
If an object contains a reference to another object (of the same or a&lt;br /&gt;
different class), an explicit Discard results in the elimination of the reference.&lt;br /&gt;
This removal of the reference can result in an implicit discard of the&lt;br /&gt;
reference object, as shown in the following example.&lt;br /&gt;
&lt;br /&gt;
The object referenced by &amp;lt;code&amp;gt;%chain&amp;lt;/code&amp;gt; contains&lt;br /&gt;
a reference to another object.&lt;br /&gt;
When &amp;lt;code&amp;gt;%chain&amp;lt;/code&amp;gt; is discarded, the reference to the object with the name&lt;br /&gt;
&amp;lt;code&amp;gt;Frack&amp;lt;/code&amp;gt; is lost.&lt;br /&gt;
Since this is the only reference to that object, the object is then implicitly&lt;br /&gt;
discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class linkedList&lt;br /&gt;
   public&lt;br /&gt;
      variable   name is string len 32&lt;br /&gt;
      variable   next is object linkedList&lt;br /&gt;
   end public&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%chain     is object linkedList&lt;br /&gt;
%chain = new&lt;br /&gt;
 &lt;br /&gt;
%chain:name = &#039;Frick&#039;&lt;br /&gt;
%chain:next = new&lt;br /&gt;
%chain:next:name = &#039;Frack&#039;&lt;br /&gt;
 &lt;br /&gt;
%chain:discard&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now suppose the class definition remains the same, but the code is changed to&lt;br /&gt;
the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%chain     is object linkedList&lt;br /&gt;
%link      is object linkedList&lt;br /&gt;
 &lt;br /&gt;
%chain = new&lt;br /&gt;
%chain:name = &#039;Frick&#039;&lt;br /&gt;
%chain:next = new&lt;br /&gt;
%chain:next:name = &#039;Frack&#039;&lt;br /&gt;
%link = %chain:next&lt;br /&gt;
 &lt;br /&gt;
%chain:discard&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, even when the object referenced by &amp;lt;code&amp;gt;%chain&amp;lt;/code&amp;gt; is discarded,&lt;br /&gt;
and its reference to the &amp;lt;code&amp;gt;Frack&amp;lt;/code&amp;gt; object goes away, there is still a reference to&lt;br /&gt;
the &amp;lt;code&amp;gt;Frack&amp;lt;/code&amp;gt; object, namely, &amp;lt;code&amp;gt;%link&amp;lt;/code&amp;gt;, so that object is not discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; also has a generic &#039;&#039;&#039;DeepDiscard&#039;&#039;&#039; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%obj:DeepDiscard&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like the &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt; method, &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; explicitly discards the method object. But, unlike Discard, it also explicitly discards all objects that are referenced directly or indirectly (a reference to an object that contains a reference to another object, and so on) by the object being discarded. This makes DeepDiscard useful for discarding an entire chain of objects, an object tree, an object cycle, or even an object forest, even if there are still references to some of the objects in the request.&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; cleans up an object cycle or forest, it is an&lt;br /&gt;
efficient alternative to having garbage collection clean these up, if there is&lt;br /&gt;
an obvious point in code where the object cycle or forest is no longer used.&lt;br /&gt;
&lt;br /&gt;
Just as with the &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt; method, there is a danger with &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; that&lt;br /&gt;
some reference to an explicitly discarded object might still be required.&lt;br /&gt;
But because it has a potential to&lt;br /&gt;
discard more objects, the risk is somewhat greater with &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt;,&lt;br /&gt;
so it should be used with caution.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; method cannot be used on any object in a class that&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;is declared with a &amp;lt;var&amp;gt;[[Classes and Objects#Disallow clause|Disallow Discard]]&amp;lt;/var&amp;gt; clause&lt;br /&gt;
&amp;lt;li&amp;gt;contains a reference to a class defined with &amp;lt;var&amp;gt;Disallow Discard&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;contains an indirect reference to a class that is defined with &amp;lt;var&amp;gt;Disallow Discard&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Without these rules, an explicit &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; of an object could result in the explicit discard of an object of a class that expressly disallows explicit discards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;xmlnode&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
For most system classes, &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; works identically to &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt;.&lt;br /&gt;
The exceptions to this are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;Screenfield&amp;lt;/var&amp;gt; objects, which you may &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; but not &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt;.&lt;br /&gt;
If you &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; a &amp;lt;var&amp;gt;Screenfield&amp;lt;/var&amp;gt;, the underlying &amp;lt;var&amp;gt;Screen&amp;lt;/var&amp;gt; object is also discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;XmlNode&amp;lt;/var&amp;gt; objects, which you may &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; but not &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt;.&lt;br /&gt;
If you &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; an &amp;lt;var&amp;gt;XmlNode&amp;lt;/var&amp;gt;, the underlying &amp;lt;var&amp;gt;XmlDoc&amp;lt;/var&amp;gt; object is also discarded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;XmlNodelist&amp;lt;/var&amp;gt; objects, which you may &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt;.&lt;br /&gt;
If you &amp;lt;var&amp;gt;Discard&amp;lt;/var&amp;gt; an &amp;lt;var&amp;gt;XmlNodelist&amp;lt;/var&amp;gt;, the &amp;lt;var&amp;gt;XmlNodelist&amp;lt;/var&amp;gt; object (only) is discarded.&lt;br /&gt;
If you &amp;lt;var&amp;gt;DeepDiscard&amp;lt;/var&amp;gt; an &amp;lt;var&amp;gt;XmlNodelist&amp;lt;/var&amp;gt;, both the &amp;lt;var&amp;gt;XmlNodelist&amp;lt;/var&amp;gt; object and the&lt;br /&gt;
underlying &amp;lt;var&amp;gt;XmlDoc&amp;lt;/var&amp;gt; object are discarded.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Working with null valued object variables==&lt;br /&gt;
If an object variable does not refer to an object, either because&lt;br /&gt;
it was never set, or because the object to which it referred was&lt;br /&gt;
discarded, it is considered to have a &#039;&#039;&#039;Null&#039;&#039;&#039; value.&lt;br /&gt;
While, an object variable with a &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt; value cannot be used as&lt;br /&gt;
the object for most methods (except those declared with &amp;lt;var&amp;gt;AllowNullObject&amp;lt;/var&amp;gt;),&lt;br /&gt;
they can be used in comparisons.&lt;br /&gt;
&lt;br /&gt;
The most common comparison done with objects, in fact, is to test&lt;br /&gt;
whether the object is &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%first   is object dog&lt;br /&gt;
%new     is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%new   = new(&#039;Josh&#039;, &#039;Newfoundland&#039;)&lt;br /&gt;
if %first eq null then&lt;br /&gt;
   %first = new&lt;br /&gt;
else&lt;br /&gt;
   %last:nextCompetitor = %new&lt;br /&gt;
end of&lt;br /&gt;
%last  = new&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a null object variable is compared with another object variable,&lt;br /&gt;
it is considered equal if, and only if, the other object variable is&lt;br /&gt;
null.&lt;br /&gt;
&lt;br /&gt;
A null object variable can be assigned to another object variable:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%first   is object dog&lt;br /&gt;
%new     is object dog&lt;br /&gt;
 &lt;br /&gt;
%new   = %first&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And a variable can be explicitly set to Null:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%winner  is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%winner = null&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In both comparisons and assignments, &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt; is actually a shorthand for a [[Shared class members|shared]] null property on the class, and it can be indicated as such:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%winner  is object dog&lt;br /&gt;
 ...&lt;br /&gt;
%winner = %(dog):null&lt;br /&gt;
 ...&lt;br /&gt;
if %winner eq %(dog):null&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
The value &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt; can also be passed as an input parameter to&lt;br /&gt;
a method:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class show&lt;br /&gt;
   public&lt;br /&gt;
      ...&lt;br /&gt;
      function score(%entrant is object dog allowNull) -&lt;br /&gt;
               is float&lt;br /&gt;
      ...&lt;br /&gt;
   end public&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%winner  is object dog&lt;br /&gt;
%akc     is object show&lt;br /&gt;
 ...&lt;br /&gt;
%minScore = %akc:score(null)&lt;br /&gt;
 ...&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; Assigning a value to an object property, that is to a Property that&lt;br /&gt;
returns an object, is a special case of passing an input parameter to a method.&lt;br /&gt;
The value assigned is&lt;br /&gt;
an implicit parameter of the &amp;lt;var&amp;gt;Set&amp;lt;/var&amp;gt; method of the property.&lt;br /&gt;
In such cases, you may validly assign a Null value,&lt;br /&gt;
as if the implicit parameter included an implicit AllowNull keyword.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An object that is explicitly discarded causes all references to that&lt;br /&gt;
object to become null: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%first   is object dog&lt;br /&gt;
%new     is object dog&lt;br /&gt;
 &lt;br /&gt;
%new   = new(&#039;Dallas&#039;, &#039;German Shepherd&#039;)&lt;br /&gt;
%first = %new&lt;br /&gt;
%first:discard&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
In the above example, both &amp;lt;code&amp;gt;%first&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%new&amp;lt;/code&amp;gt; are&lt;br /&gt;
set to &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt; after the &amp;lt;code&amp;gt;%first:discard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Passing object variables as parameters==&lt;br /&gt;
Object variables can be passed as method or complex subroutine parameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class clown&lt;br /&gt;
   public&lt;br /&gt;
      subroutine honk(%nose is object nose)&lt;br /&gt;
      ...&lt;br /&gt;
   end public&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%bozo    is object clown&lt;br /&gt;
%schnoz  is object nose&lt;br /&gt;
 ...&lt;br /&gt;
%bozo:honk(%schnoz)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, passing a null object variable as a method or complex subroutine&lt;br /&gt;
parameter causes request cancellation.&lt;br /&gt;
However, the &#039;&#039;&#039;AllowNull&#039;&#039;&#039; keyword can be specified as an Input parameter&lt;br /&gt;
qualifier in the method or complex subroutine declaration to indicate that&lt;br /&gt;
the method or complex subroutine will accept null objects:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class clown&lt;br /&gt;
   public&lt;br /&gt;
      subroutine honk(%nose is object nose allowNull)&lt;br /&gt;
      ...&lt;br /&gt;
   end public&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An Output object variable is always allowed to be null and can be set&lt;br /&gt;
by a method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class clown&lt;br /&gt;
   public&lt;br /&gt;
      subroutine honk(%nose is object nose output)&lt;br /&gt;
      ...&lt;br /&gt;
   end public&lt;br /&gt;
   subroutine honk(%nose is object nose output)&lt;br /&gt;
      %nose = new(&#039;red&#039;)&lt;br /&gt;
   end subroutine&lt;br /&gt;
   ...&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%bozo    is object clown&lt;br /&gt;
%schnoz  is object nose&lt;br /&gt;
 ...&lt;br /&gt;
%bozo = new&lt;br /&gt;
%bozo:honk(%schnoz)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, &amp;lt;code&amp;gt;%schnoz&amp;lt;/code&amp;gt; would be set to reference a new instance of&lt;br /&gt;
a &amp;lt;code&amp;gt;nose&amp;lt;/code&amp;gt; object that was instantiated by the &amp;lt;code&amp;gt;honk&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
An Input object variable is passed by value to a method&lt;br /&gt;
and may be modified within the method.&lt;br /&gt;
The method actually receives a copy of a pointer to the object.&lt;br /&gt;
The copied pointer may be used to modify the referenced&lt;br /&gt;
object, and the&lt;br /&gt;
modifications are propagated to the object outside the subroutine.&lt;br /&gt;
Changes to the &#039;&#039;pointer&#039;&#039; like assignment or new instantiation,&lt;br /&gt;
are allowed, but they are &#039;&#039;not&#039;&#039; propagated to the outer object.&lt;br /&gt;
&lt;br /&gt;
In the example below, the subroutine modifies the &amp;lt;code&amp;gt;%schnoz&amp;lt;/code&amp;gt; object color,&lt;br /&gt;
but the reassignment to &amp;lt;code&amp;gt;%schnozola&amp;lt;/code&amp;gt; does not affect &amp;lt;code&amp;gt;%schnoz&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;class clown&lt;br /&gt;
public&lt;br /&gt;
subroutine honk(%nose is object nose output)&lt;br /&gt;
 ...&lt;br /&gt;
property color is string&lt;br /&gt;
 ...&lt;br /&gt;
end public&lt;br /&gt;
 &lt;br /&gt;
subroutine honk(%nose is object nose output)&lt;br /&gt;
%schnozola is object nose&lt;br /&gt;
If %clown eq %bozo&lt;br /&gt;
  &#039;red&#039; = %nose:color&lt;br /&gt;
 ...&lt;br /&gt;
%nose = %schnozola&lt;br /&gt;
 ...&lt;br /&gt;
end subroutine&lt;br /&gt;
 ...&lt;br /&gt;
property color is string&lt;br /&gt;
 ...&lt;br /&gt;
end property color&lt;br /&gt;
end class&lt;br /&gt;
 ...&lt;br /&gt;
%bozo is object clown&lt;br /&gt;
%schnoz is object nose&lt;br /&gt;
 ...&lt;br /&gt;
%bozo = new&lt;br /&gt;
%bozo:honk(%schnoz)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote class=&amp;quot;note&amp;quot;&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; A case where a method significantly affects the object referenced by&lt;br /&gt;
an Input object variable is the Discard method.&lt;br /&gt;
A Discard method invoked against an Input parameter sets&lt;br /&gt;
the Input parameter and call argument to Null.&lt;br /&gt;
&lt;br /&gt;
This can happen directly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;subroutine honk  (%nose is object nose input)&lt;br /&gt;
 &lt;br /&gt;
   %nose:discard&lt;br /&gt;
 &lt;br /&gt;
end subroutine&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, it can happen indirectly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;subroutine honk  (%nose is object nose input)&lt;br /&gt;
 &lt;br /&gt;
   %beak is object nose&lt;br /&gt;
 &lt;br /&gt;
   %beak = %nose&lt;br /&gt;
   %beak:discard&lt;br /&gt;
 &lt;br /&gt;
end subroutine&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Classes and Objects]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Copying objects]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Global and session objects]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Managing server space for objects]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Object oriented programming in SOUL]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Overviews]]&lt;br /&gt;
[[Category:SOUL object-oriented programming topics]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SetString_(System_function)&amp;diff=81395</id>
		<title>SetString (System function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SetString_(System_function)&amp;diff=81395"/>
		<updated>2015-10-23T22:32:40Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Oops lost the newline.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:System:SetString subtitle}}&lt;br /&gt;
The &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; shared [[Notation conventions for methods#Callable functions|callable]] function sets a [[System class#System and subsystem globals and strings|system-wide string]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:System:SetString syntax}}&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%number&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A numeric result that indicates whether the string update succeeded.  &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%number&amp;lt;/var&amp;gt; is set to 1 upon success. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;oldValue&amp;lt;/var&amp;gt; is specified and does not match the current setting of the string, the update is not performed and a 0 is returned.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;nobr&amp;quot;&amp;gt;%(System)&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; can also be invoked via a &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; object variable, which may be &amp;lt;var&amp;gt;null&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the global string to be set.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the new value for the global string.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;oldValue&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies a value to be compared against the current value of the &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; string before doing the update. This is an optional argument.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All errors result in request cancellation.&lt;br /&gt;
&amp;lt;li&amp;gt;It is not an error to set a string that is not set.&lt;br /&gt;
&amp;lt;li&amp;gt;Unlike &amp;lt;var&amp;gt;[[SetGlobal_(System_subroutine)#Usage_notes|SetGlobal]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; does not turn off multiprocessing, and it is designed for fairly high levels of updating.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The following statement sets the system string called &amp;lt;code&amp;gt;DIAMONDS&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%(system):setString(&#039;DIAMONDS&#039;, &#039;CLEAR&#039;)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;oldValue&amp;lt;/var&amp;gt; argument makes it possible to use &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; strings as structures that can be safely updated by multiple users. For example, one might want to maintain a system-wide counter. This can be accomplished as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value    is float&lt;br /&gt;
%newValue is float&lt;br /&gt;
&lt;br /&gt;
%value = %(system):string(&#039;Counter&#039;)&lt;br /&gt;
%newValue = %value + 1&lt;br /&gt;
%(system):setString(&#039;Counter&#039;, %newValue)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Unfortunately, another thread might update the value of the counter between the time the above code retrieves the value (with &amp;lt;var&amp;gt;[[String_(System_function)|String]]&amp;lt;/var&amp;gt;) and the time it updates it (with &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt;).  In such a case, an increment of the counter might be missed. This is more likely, of course, in an &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;MP/204&amp;lt;/var&amp;gt; environment, but you should not count on it being impossible in a non-&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;MP/204&amp;lt;/var&amp;gt; environment.  To safely update a counter, you can do the following:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value    is float&lt;br /&gt;
%newValue is float&lt;br /&gt;
%success  is float&lt;br /&gt;
&lt;br /&gt;
repeat while not %success&lt;br /&gt;
   %value = %(system):string(&#039;Counter&#039;)&lt;br /&gt;
   %newValue = %value + 1&lt;br /&gt;
   %success = %(system):setString(&#039;Counter&#039;, %newValue,  %value)&lt;br /&gt;
end repeat&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
If no user has updated &amp;lt;code&amp;gt;Counter&amp;lt;/code&amp;gt; between the &amp;lt;var&amp;gt;[[String_(System_function)|String]]&amp;lt;/var&amp;gt; and the &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; methods, the update would succeed. If some other user has updated it, the update would not be performed, &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; would return a 0, and the repeat loop would be repeated.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
While this looks nasty &amp;amp;mdash; it seems the code could loop forever &amp;amp;mdash; it&#039;s not that bad. Since the only thing that causes the &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; to fail is another user updating the same string at the same time; even if a hundred users were in this loop, at least one of them would succeed on each iteration. So unless the system is doing almost nothing else, all the updates would be performed in fairly short order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This technique can be used with considerably more complex data-structures. For example, one can actually store a serialized &amp;lt;var&amp;gt;[[XmlDoc_API#The_XmlDoc_class|XmlDoc]]&amp;lt;/var&amp;gt; in a &amp;lt;var&amp;gt;system&amp;lt;/var&amp;gt; string. A request can retrieve the current structure, manipulate it, and then replace the updated structure:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value    is longString&lt;br /&gt;
%newValue is longString&lt;br /&gt;
%myDoc    is object xmlDoc&lt;br /&gt;
%success is float&lt;br /&gt;
&lt;br /&gt;
repeat while not %success&lt;br /&gt;
   %value = %(system):string(&#039;Complicated&#039;)&lt;br /&gt;
   %myDoc = new&lt;br /&gt;
   %myDoc:loadXml(%value)&lt;br /&gt;
     ... manipulate myDoc&lt;br /&gt;
   %newValue = %myDoc:serial(,&#039;EBCDIC&#039;)&lt;br /&gt;
   %success = %(system):setString(&#039;Complicated&#039;, -&lt;br /&gt;
                                  %newValue, %value)&lt;br /&gt;
end repeat&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Note that the above code assumes that the &amp;lt;code&amp;gt;Complicated&amp;lt;/code&amp;gt; system string is already set. If the application cannot guarantee that &amp;lt;code&amp;gt;Complicated&amp;lt;/code&amp;gt; has been set, there should be a test for the null string, bypassing the &amp;lt;var&amp;gt;[[LoadXml_(XmlDoc/XmlNode_function)|loadXml]]&amp;lt;/var&amp;gt; operation and instead populating the &amp;lt;var&amp;gt;XmlDoc&amp;lt;/var&amp;gt; with some initial nodes.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The document is stored in the system string in EBCDIC. This is not necessary &amp;amp;mdash; the document could be stored in UTF-8 encoding &amp;amp;mdash; it is just easier to debug this code if it is saved in EBCDIC.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template:System:SetString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SetString_(System_function)&amp;diff=81394</id>
		<title>SetString (System function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SetString_(System_function)&amp;diff=81394"/>
		<updated>2015-10-23T22:31:30Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Align, and make the data types agree.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:System:SetString subtitle}}&lt;br /&gt;
The &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; shared [[Notation conventions for methods#Callable functions|callable]] function sets a [[System class#System and subsystem globals and strings|system-wide string]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:System:SetString syntax}}&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%number&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;A numeric result that indicates whether the string update succeeded.  &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%number&amp;lt;/var&amp;gt; is set to 1 upon success. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;oldValue&amp;lt;/var&amp;gt; is specified and does not match the current setting of the string, the update is not performed and a 0 is returned.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;nobr&amp;quot;&amp;gt;%(System)&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; can also be invoked via a &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; object variable, which may be &amp;lt;var&amp;gt;null&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the global string to be set.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the new value for the global string.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;oldValue&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies a value to be compared against the current value of the &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; string before doing the update. This is an optional argument.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All errors result in request cancellation.&lt;br /&gt;
&amp;lt;li&amp;gt;It is not an error to set a string that is not set.&lt;br /&gt;
&amp;lt;li&amp;gt;Unlike &amp;lt;var&amp;gt;[[SetGlobal_(System_subroutine)#Usage_notes|SetGlobal]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; does not turn off multiprocessing, and it is designed for fairly high levels of updating.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The following statement sets the system string called &amp;lt;code&amp;gt;DIAMONDS&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%(system):setString(&#039;DIAMONDS&#039;, &#039;CLEAR&#039;)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;oldValue&amp;lt;/var&amp;gt; argument makes it possible to use &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; strings as structures that can be safely updated by multiple users. For example, one might want to maintain a system-wide counter. This can be accomplished as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value    is float%newValue is float&lt;br /&gt;
&lt;br /&gt;
%value = %(system):string(&#039;Counter&#039;)&lt;br /&gt;
%newValue = %value + 1&lt;br /&gt;
%(system):setString(&#039;Counter&#039;, %newValue)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Unfortunately, another thread might update the value of the counter between the time the above code retrieves the value (with &amp;lt;var&amp;gt;[[String_(System_function)|String]]&amp;lt;/var&amp;gt;) and the time it updates it (with &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt;).  In such a case, an increment of the counter might be missed. This is more likely, of course, in an &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;MP/204&amp;lt;/var&amp;gt; environment, but you should not count on it being impossible in a non-&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;MP/204&amp;lt;/var&amp;gt; environment.  To safely update a counter, you can do the following:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value    is float&lt;br /&gt;
%newValue is float&lt;br /&gt;
%success  is float&lt;br /&gt;
&lt;br /&gt;
repeat while not %success&lt;br /&gt;
   %value = %(system):string(&#039;Counter&#039;)&lt;br /&gt;
   %newValue = %value + 1&lt;br /&gt;
   %success = %(system):setString(&#039;Counter&#039;, %newValue,  %value)&lt;br /&gt;
end repeat&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
If no user has updated &amp;lt;code&amp;gt;Counter&amp;lt;/code&amp;gt; between the &amp;lt;var&amp;gt;[[String_(System_function)|String]]&amp;lt;/var&amp;gt; and the &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; methods, the update would succeed. If some other user has updated it, the update would not be performed, &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; would return a 0, and the repeat loop would be repeated.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
While this looks nasty &amp;amp;mdash; it seems the code could loop forever &amp;amp;mdash; it&#039;s not that bad. Since the only thing that causes the &amp;lt;var&amp;gt;SetString&amp;lt;/var&amp;gt; to fail is another user updating the same string at the same time; even if a hundred users were in this loop, at least one of them would succeed on each iteration. So unless the system is doing almost nothing else, all the updates would be performed in fairly short order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This technique can be used with considerably more complex data-structures. For example, one can actually store a serialized &amp;lt;var&amp;gt;[[XmlDoc_API#The_XmlDoc_class|XmlDoc]]&amp;lt;/var&amp;gt; in a &amp;lt;var&amp;gt;system&amp;lt;/var&amp;gt; string. A request can retrieve the current structure, manipulate it, and then replace the updated structure:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value    is longString&lt;br /&gt;
%newValue is longString&lt;br /&gt;
%myDoc    is object xmlDoc&lt;br /&gt;
%success is float&lt;br /&gt;
&lt;br /&gt;
repeat while not %success&lt;br /&gt;
   %value = %(system):string(&#039;Complicated&#039;)&lt;br /&gt;
   %myDoc = new&lt;br /&gt;
   %myDoc:loadXml(%value)&lt;br /&gt;
     ... manipulate myDoc&lt;br /&gt;
   %newValue = %myDoc:serial(,&#039;EBCDIC&#039;)&lt;br /&gt;
   %success = %(system):setString(&#039;Complicated&#039;, -&lt;br /&gt;
                                  %newValue, %value)&lt;br /&gt;
end repeat&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Note that the above code assumes that the &amp;lt;code&amp;gt;Complicated&amp;lt;/code&amp;gt; system string is already set. If the application cannot guarantee that &amp;lt;code&amp;gt;Complicated&amp;lt;/code&amp;gt; has been set, there should be a test for the null string, bypassing the &amp;lt;var&amp;gt;[[LoadXml_(XmlDoc/XmlNode_function)|loadXml]]&amp;lt;/var&amp;gt; operation and instead populating the &amp;lt;var&amp;gt;XmlDoc&amp;lt;/var&amp;gt; with some initial nodes.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The document is stored in the system string in EBCDIC. This is not necessary &amp;amp;mdash; the document could be stored in UTF-8 encoding &amp;amp;mdash; it is just easier to debug this code if it is saved in EBCDIC.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template:System:SetString footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SetGlobal_(Subsystem_subroutine)&amp;diff=81342</id>
		<title>SetGlobal (Subsystem subroutine)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SetGlobal_(Subsystem_subroutine)&amp;diff=81342"/>
		<updated>2015-10-22T23:18:44Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Needs an output variable too.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Subsystem:SetGlobal subtitle}}&lt;br /&gt;
The &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; shared subroutine sets a [[Subsystem_class#System_and_subsystem_globals_and_strings|subsystem global]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Subsystem:SetGlobal syntax}}&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;nobr&amp;quot;&amp;gt;%(Subsystem)&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; can also be invoked via a &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; object variable, which may be &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the global to be set.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the new value for the global.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All errors result in request cancellation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is not an error to set a global that is not set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; class &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; sets the global for the current &amp;lt;var&amp;gt;subsystem&amp;lt;/var&amp;gt; context (indicated by &amp;lt;var&amp;gt;[[Context (Subsystem property)|Context]]&amp;lt;/var&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Like &amp;lt;var&amp;gt;[[$Setg_Subsys]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; momentarily turns off multi-processing, so should not be used heavily in an &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;MP/204&amp;lt;/var&amp;gt; environment.  &amp;lt;var&amp;gt;[[SetString (Subsystem function)|SetString]]&amp;lt;/var&amp;gt; does not suffer this limitation and should be used in these situations.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;setGlobal&amp;lt;/var&amp;gt; method, in the &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; class, performs a function identical to the &amp;lt;var&amp;gt;$Setg_Subsys&amp;lt;/var&amp;gt; function. That is, the following two statements are identical:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%(subsystem):setGlobal(&#039;PHLEGMATIC&#039;, &#039;STOLID&#039;)&lt;br /&gt;
%rc = $Setg_Subsys(&#039;PHLEGMATIC&#039;, &#039;STOLID&#039;)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For more information about subsystem  globals, see [[Subsystem class#System and subsystem globals and strings|System and Subsystem globals and strings]].&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Subsystem:SetGlobal footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SetGlobal_(Subsystem_subroutine)&amp;diff=81341</id>
		<title>SetGlobal (Subsystem subroutine)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SetGlobal_(Subsystem_subroutine)&amp;diff=81341"/>
		<updated>2015-10-22T23:13:43Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Function not String&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:Subsystem:SetGlobal subtitle}}&lt;br /&gt;
The &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; shared subroutine sets a [[Subsystem_class#System_and_subsystem_globals_and_strings|subsystem global]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:Subsystem:SetGlobal syntax}}&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;nobr&amp;quot;&amp;gt;%(Subsystem)&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; can also be invoked via a &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; object variable, which may be &amp;lt;var&amp;gt;Null&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;name&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the global to be set.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the new value for the global.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All errors result in request cancellation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is not an error to set a global that is not set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; class &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; sets the global for the current &amp;lt;var&amp;gt;subsystem&amp;lt;/var&amp;gt; context (indicated by &amp;lt;var&amp;gt;[[Context (Subsystem property)|Context]]&amp;lt;/var&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Like &amp;lt;var&amp;gt;[[$Setg_Subsys]]&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;SetGlobal&amp;lt;/var&amp;gt; momentarily turns off multi-processing, so should not be used heavily in an &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;MP/204&amp;lt;/var&amp;gt; environment.  &amp;lt;var&amp;gt;[[SetString (Subsystem function)|SetString]]&amp;lt;/var&amp;gt; does not suffer this limitation and should be used in these situations.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;setGlobal&amp;lt;/var&amp;gt; method, in the &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; class, performs a function identical to the &amp;lt;var&amp;gt;$Setg_Subsys&amp;lt;/var&amp;gt; function. That is, the following two statements are identical:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%(subsystem):setGlobal(&#039;PHLEGMATIC&#039;, &#039;STOLID&#039;)&lt;br /&gt;
$Setg_Subsys(&#039;PHLEGMATIC&#039;, &#039;STOLID&#039;)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For more information about subsystem  globals, see [[Subsystem class#System and subsystem globals and strings|System and Subsystem globals and strings]].&amp;lt;/ul&amp;gt;&lt;br /&gt;
{{Template:Subsystem:SetGlobal footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=ListOfStrings_(System_function)&amp;diff=81340</id>
		<title>ListOfStrings (System function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=ListOfStrings_(System_function)&amp;diff=81340"/>
		<updated>2015-10-22T22:15:18Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Line up nicer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:System:ListOfStrings subtitle}}&lt;br /&gt;
The &amp;lt;var&amp;gt;ListOfStrings&amp;lt;/var&amp;gt; shared function returns a &amp;lt;var&amp;gt;[[Stringlist class|Stringlist]]&amp;lt;/var&amp;gt; containing information about [[System class#System and subsystem globals and strings|system-wide strings]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:System:ListOfStrings syntax}}&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%sl&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The &amp;lt;var&amp;gt;Stringlist&amp;lt;/var&amp;gt; variable that contains the data about the global strings selected according to the pattern in &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var class=&amp;quot;nobr&amp;quot;&amp;gt;%(System)&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method. &amp;lt;var&amp;gt;ListOfStrings&amp;lt;/var&amp;gt; can also be invoked via a &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; object variable, which may be &amp;lt;var&amp;gt;null&amp;lt;/var&amp;gt;.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;string&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An optional identifying string which may include wildcard characters.  Descriptions of the global strings whose names match the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; pattern are returned to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%sl&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Stringlist&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This argument defaults to an asterisk (&amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt;), that is, all global strings, and its eligible wildcard characters are shown below:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;*&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Matches any group of 0 or more characters&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;?&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Matches any single character&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;quot;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;An escape, which means the next character is treated literally, even if it is a double quotation mark (&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt;), question mark (&amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;), or asterisk (&amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt;)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All errors result in request cancellation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The items placed on the target &amp;lt;var&amp;gt;Stringlist&amp;lt;/var&amp;gt; are put there in no particular order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The data returned to the &amp;lt;var&amp;gt;Stringlist&amp;lt;/var&amp;gt; is in character format with the following contents:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Bytes 1-10 &amp;amp;mdash; Userid that last set the global.&lt;br /&gt;
&amp;lt;li&amp;gt;Bytes 12-28 &amp;amp;mdash; Date and time global last set, in YY/MM/DD HH:MI:SS format.&lt;br /&gt;
&amp;lt;li&amp;gt;Bytes 30-53 &amp;amp;mdash; Subsystem context for global. Null for system strings.&lt;br /&gt;
&amp;lt;li&amp;gt;Bytes 54-&amp;amp;nbsp; &amp;amp;mdash; Global name.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You can map to an image the information in each &amp;lt;var&amp;gt;Stringlist&amp;lt;/var&amp;gt; item (described in the previous bullet) as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;image desc&lt;br /&gt;
   userid     is string len  11&lt;br /&gt;
   dateTime   is string len  18&lt;br /&gt;
   subsystem  is string len  24&lt;br /&gt;
   name       is string len 255&lt;br /&gt;
end image&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Note that the image items are one byte longer than the item lengths indicated in the previous bullet. Those bytes would be blank, so standard trailing-blank stripping for image items will cause that extra blank to be stripped. The above image could then be used to map the entries, as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%sl is object stringList&lt;br /&gt;
%i is float&lt;br /&gt;
&lt;br /&gt;
%sl = %(subsystem):listOfStrings&lt;br /&gt;
identify image desc&lt;br /&gt;
%sl:[[BindImage (Stringlist subroutine)|bindImage]](&#039;DESC&#039;)&lt;br /&gt;
&lt;br /&gt;
for %i from 1 to %sl:count&lt;br /&gt;
   prepare image desc&lt;br /&gt;
   %sl:[[GetImage (Stringlist subroutine)|getImage]](%i)&lt;br /&gt;
   print %desc:userid and %desc:dateTime and -&lt;br /&gt;
         %desc:subsystem and %desc:name&lt;br /&gt;
end for&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The following statement prints the description of all system strings that end in &amp;lt;code&amp;gt;XML&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%(system):listOfStrings(&#039;*.XML&#039;):print&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template:System:ListOfStrings footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=CASE_command&amp;diff=81293</id>
		<title>CASE command</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=CASE_command&amp;diff=81293"/>
		<updated>2015-10-22T00:30:43Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: 2 is the LINEND option.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;CASE Mixed/Upper command&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You may issue either of the following commands in the [[Model 204 full-screen editor]]:&lt;br /&gt;
&lt;br /&gt;
; CASE Mixed &lt;br /&gt;
: This command indicates that terminal input is accepted “as is,” without translation to uppercase. This is similar to invoking the *LOWER command prior to entering the Full Screen Editor. The second word of this command, “Mixed”, may be abbreviated to any prefix.&lt;br /&gt;
; CASE Upper&lt;br /&gt;
: This command indicates that terminal input is translated to uppercase.  This is similar to invoking the *UPPER command prior to entering the Full Screen Editor. The second word of this command, “Upper”, may be abbreviated to any prefix.&lt;br /&gt;
&lt;br /&gt;
This command will not affect the case translation setting (*UPPER/*LOWER) that was in effect “outside” the editor; that is, when you exit the editor, the case translation will be as it was prior to entering the editor.&lt;br /&gt;
&lt;br /&gt;
In addition to the CASE command, the initial case translation setting within the editor can be automatically set to *LOWER, using the &#039;1&#039; bit of the [[SIREDIT Parameter|SIREDIT parameter]].&lt;br /&gt;
&lt;br /&gt;
Neither the CASE command nor the *UPPER/*LOWER setting affect the input on the editor command line.&lt;br /&gt;
&lt;br /&gt;
The matching of strings (for example, “/subroutine”) can be done in a case-insensitive manner, using the X&#039;20&#039; bit of the [[SIREDIT parameter|SIREDIT parameter]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Editor commands]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=VTYPE_parameter&amp;diff=81290</id>
		<title>VTYPE parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=VTYPE_parameter&amp;diff=81290"/>
		<updated>2015-10-22T00:09:51Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Yep it does.  And if you later change VTYPE to STRING you must do VLEN too.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:VTYPE parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;STRING&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;User&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;By any user&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V6.1&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;p&amp;gt;The default %variable type in User Language&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;VTYPE is a character string parameter. Valid settings of VTYPE are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
FIXED&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
STRING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
UNDEFINED&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Setting VTYPE to UNDEFINED forces explicit declaration of all %variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Setting VTYPE to UNDEFINED will also set VLEN to 0.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:User parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Unspace_(String_function)&amp;diff=78894</id>
		<title>Unspace (String function)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Unspace_(String_function)&amp;diff=78894"/>
		<updated>2015-08-11T21:39:55Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Spell &amp;#039;onr&amp;#039; more better.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:String:Unspace subtitle}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;Unspace&amp;lt;/var&amp;gt; [[Intrinsic classes|intrinsic]] function removes the whitespace characters from the method object string and it returns the resulting string. Options are available to:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Define which character or characters are to be interpreted as whitespace&lt;br /&gt;
&amp;lt;li&amp;gt;Remove leading whitespace, trailing whitespace, both, or neither&lt;br /&gt;
&amp;lt;li&amp;gt;Collapse to a single whitespace character any sequences of non-leading, non-trailing whitespace&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
{{Template:String:Unspace syntax}}&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%outString&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A variable to receive the string result of the &amp;lt;var&amp;gt;Unspace&amp;lt;/var&amp;gt; method.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;string&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The input method object string&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;Spaces&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;Spaces&amp;lt;/var&amp;gt; is an optional, [[Notation conventions for methods#Named parameters|name required]], parameter that is a string that specifies the set of characters considered to be whitespace. The default set is the blank space (&amp;lt;code&amp;gt;&#039; &#039;&amp;lt;/code&amp;gt;) character.  &lt;br /&gt;
&amp;lt;p&amp;gt;If you specify multiple &amp;lt;var&amp;gt;Spaces&amp;lt;/var&amp;gt; characters, the first character of the string is the replacement space character: a single one of these is substituted for each sequence of one or more non-leading, non-trailing &amp;lt;var&amp;gt;Spaces&amp;lt;/var&amp;gt; characters in the method object string.&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;Leading&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;Leading&amp;lt;/var&amp;gt; is an optional, name required, parameter that is a &amp;lt;var&amp;gt;[[Enumerations#Using_Boolean_enumerations|Boolean Enumeration]]&amp;lt;/var&amp;gt; value that specifies whether to strip all leading whitespace characters. The default is &amp;lt;var&amp;gt;True&amp;lt;/var&amp;gt;, strip leading whitespace.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;Trailing&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;Trailing&amp;lt;/var&amp;gt; is an optional, name required, parameter that is a &amp;lt;var&amp;gt;Boolean&amp;lt;/var&amp;gt; enumeration value that specifies whether to strip all trailing whitespace characters. The default is &amp;lt;var&amp;gt;True&amp;lt;/var&amp;gt;, strip trailing whitespace.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;Compress&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;Compress&amp;lt;/var&amp;gt; is an optional, name required, parameter that is a &amp;lt;var&amp;gt;Boolean&amp;lt;/var&amp;gt; enumeration value that specifies whether to collapse each sequence of spaces to a single space. The default is &amp;lt;var&amp;gt;True&amp;lt;/var&amp;gt;, collapse such sequences.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Duplicate &amp;lt;var&amp;gt;Spaces&amp;lt;/var&amp;gt; characters are tolerated and do not affect the result.&lt;br /&gt;
&amp;lt;li&amp;gt;Prior to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Sirius Mods&amp;lt;/var&amp;gt; Version 7.8, &amp;lt;var&amp;gt;Unspace&amp;lt;/var&amp;gt; compressed a string consisting entirely of whitespace characters to a single whitespace character. As of Version 7.8 (and also in Version 7.7 maintenance), &amp;lt;var&amp;gt;Unspace&amp;lt;/var&amp;gt; converts a string of whitespace characters to a null string. The Version 7.8 result of&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;printText {~} = X{&#039;    &#039;:unspace}X&amp;lt;/p&amp;gt;&lt;br /&gt;
is:&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;&#039;    &#039;:unspace = XX&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;Unspace&amp;lt;/var&amp;gt; is available as of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Sirius Mods&amp;lt;/var&amp;gt; Version 7.3.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
The following are example &amp;lt;var&amp;gt;Unspace&amp;lt;/var&amp;gt; statements:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%ls is longstring&lt;br /&gt;
%ls = &#039;    so  me     chars   &#039;&lt;br /&gt;
&lt;br /&gt;
[[PrintText statement|printText]] {~} = &#039;{%ls:unspace()}&#039;&lt;br /&gt;
printText {~} = &#039;{%ls:unspace(Spaces=&#039;X &#039;)}&#039;&lt;br /&gt;
printText {~} = &#039;{%ls:unspace(Spaces=&#039;X&#039;)}&#039;&lt;br /&gt;
printText {~} = &#039;{%ls:unspace(leading=false)}&#039;&lt;br /&gt;
printText {~} = &#039;{%ls:unspace(trailing=false)}&#039;&lt;br /&gt;
printText {~} = &#039;{%ls:unspace(compress=false)}&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
The results are respectively:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%ls:unspace() = &#039;so me chars&#039;&lt;br /&gt;
%ls:unspace(Spaces=&#039;X &#039;) = &#039;soXmeXchars&#039;&lt;br /&gt;
%ls:unspace(Spaces=&#039;X&#039;) = &#039;    so  me     chars&#039;   &lt;br /&gt;
%ls:unspace(leading=false) = &#039; so me chars&#039;&lt;br /&gt;
%ls:unspace(trailing=false) = &#039;so me chars &#039;&lt;br /&gt;
%ls:unspace(compress=false) = &#039;so  me     chars&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template:String:Unspace footer}}&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78870</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78870"/>
		<updated>2015-08-06T23:10:47Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Oops M not G&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6M,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7M,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=7M,&lt;br /&gt;
// PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=1M&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78869</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78869"/>
		<updated>2015-08-06T23:09:32Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Oops M not G&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6M,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=7M,&lt;br /&gt;
// PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=1M&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78868</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78868"/>
		<updated>2015-08-06T23:07:40Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Space the JCL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=7M,&lt;br /&gt;
// PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=1M&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78866</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78866"/>
		<updated>2015-08-06T23:05:17Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Space the JCL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=7M,&lt;br /&gt;
// PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,1),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=1M&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78863</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78863"/>
		<updated>2015-08-06T23:00:51Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: 3380 LOL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78862</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78862"/>
		<updated>2015-08-06T22:59:19Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: More funny spaced JCL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78861</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78861"/>
		<updated>2015-08-06T22:57:45Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Clean the JCL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=7G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//CCAPRINT  DD SYSOUT=A&lt;br /&gt;
//CCAEXITS  DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3380&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN     DD *&lt;br /&gt;
  SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
  RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
  MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,CCAEXITS,N)&lt;br /&gt;
  END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78858</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78858"/>
		<updated>2015-08-06T22:53:56Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Don&amp;#039;t need the dot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB&lt;br /&gt;
LRECL=270 BLKSIZE=27998 (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//CCAPRINT DD SYSOUT=A&lt;br /&gt;
//CCAEXITS DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78857</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78857"/>
		<updated>2015-08-06T22:52:33Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Clean up JCL&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
               procedure call provided by the&lt;br /&gt;
               Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5     DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5     DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
//             UNIT=3390,SPACE=(TRK,(5,2)),&lt;br /&gt;
//             DCB=BLKSIZE=27998&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//CCAPRINT DD SYSOUT=A&lt;br /&gt;
//CCAEXITS DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78856</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78856"/>
		<updated>2015-08-06T22:48:31Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Fix JCL errors.   3380 hahaha!        Actually the //SORTWKnn datasets are dynamically allocated nowadays...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
//             REGION=6G,&lt;br /&gt;
//             PARM=&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB   DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS  DD SYSOUT=A&lt;br /&gt;
//SYSOUT    DD SYSOUT=A&lt;br /&gt;
//SORTIN    DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
//             DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT   DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
//             DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
//             DCB=(RECFM=FB,LRECL=24,BLKSIZE=32760)&lt;br /&gt;
//SORTWK01  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=3390&lt;br /&gt;
//SORTWK02  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03  DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
//             UNIT=(3390,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
  SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
            procedure call provided by the&lt;br /&gt;
           Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
// TAPE5 DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
// UNIT=3380,SPACE=(TRK,(5,2)),&lt;br /&gt;
// DCB=BLKSIZE=15476&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//CCAPRINT DD SYSOUT=A&lt;br /&gt;
//CCAEXITS DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78853</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78853"/>
		<updated>2015-08-06T22:41:03Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: LOL 3380&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;SORTIN is the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The following DCB subparameters are recommended:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24 BLKSIZE=27998   (1/2 track on a 3390 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
            procedure call provided by the&lt;br /&gt;
           Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
// TAPE5 DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
// UNIT=3380,SPACE=(TRK,(5,2)),&lt;br /&gt;
// DCB=BLKSIZE=15476&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//CCAPRINT DD SYSOUT=A&lt;br /&gt;
//CCAEXITS DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78852</id>
		<title>Deferred update feature</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Deferred_update_feature&amp;diff=78852"/>
		<updated>2015-08-06T22:37:47Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Fix JCL syntax errors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whenever you change or add a large number of records to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, the process can be made more efficient, in terms of execution time, disk I/O, and storage utilization, by deferring the changes or additions that update Tables C and D: updates involving KEY, NUMERIC RANGE, ORDERED, and FRV fields. In the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature, the deferred updates to Tables C and D are stored in deferred update data sets while Tables A and B are updated. The deferred updates are then sorted and applied to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This article describes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Basic &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; deferred update feature&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How the feature is implemented&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Several different job forms-number of job steps-that the feature can take. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a file is opened in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; protects the file by making it impossible to free the file in that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; run. This limitation is necessary to protect the file from being updated before the deferred updates have been applied. All files are closed completely (free) at the end of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; job.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two phases of Table updating in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file during the deferred update process are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading Tables A and B and loading the index (Tables C and D) updates into the deferred update data sets&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Loading the deferred index updates into Tables C and D&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===First phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process involves executing whatever configuration of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; would be run if updates to the index were not being deferred: BATCH204, ONLINE, IFAM1, or IFAM4. Storing new records or changing existing records proceeds normally until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is put into deferred update mode by a special form of the OPEN command or the IFOPEN call. Thereafter, only Table A, the internal file dictionary, and Table B, the VISIBLE data, of the file are updated. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The index information pertaining to FOR EACH VALUE (FRV), KEY, NUMERIC RANGE, and ORDERED retrieval fields is not added directly to Table C and Table D. Instead, it is written to one or two deferred update data sets for processing in later job steps. &amp;lt;/p&amp;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 index update generated by a FILE RECORDS UNDER statement is never deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Query results between deferred update phases====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that you add the field name = value pair NAME = MURRAY to an existing record in file PEOPLE. PEOPLE is in deferred update mode, and the NAME field is KEY and VISIBLE. If the record is retrieved by some other (preexisting) KEY field, a PRINT NAME statement prints MURRAY, because the field is VISIBLE and is, therefore, stored in Table B. However, the statement FIND ALL RECORDS FOR WHICH NAME = MURRAY does not find the record, because the index information NAME = MURRAY has not yet been added to Tables C and D. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Second phase of deferred update===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The second phase of the deferred update process is executed only after the first phase of deferred update process is complete. The second phase of the deferred update process sorts each of the deferred update data sets created in the first phase, then applies the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the sorted updates from the deferred update data sets adds the information necessary to perform retrievals based on the new KEY, NUMERIC RANGE, and ORDERED retrieval field values. For instance, after applying the deferred updates, the retrieval statement FIND ALL RECORDS FOR WHICH NAME = MURRAY finds the record in the previous example.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Additional job steps in a deferred update====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file contains FRV (FOR EACH VALUE) fields, applying the deferred index updates to Tables C and D generates an additional deferred update data set. This additional deferred update data set contains more deferred index updates for fields with the FRV (for-each-value) attribute, which must also be sorted, and the sorted deferred updates applied to Tables C and D.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the NAME field described previously also has the FRV attribute and that MURRAY is a new value of NAME that has never occurred in any record. The statement FOR EACH VALUE OF NAME does not find the value MURRAY until certain information is added to Tables C and D. This information is contained in the additional deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The procedure for deferring updates to the index normally requires multiple job steps instead of the one job step required if the updates are not deferred. The deferred update feature can use three, five, or seven job steps, depending on the attributes of the fields being deferred and the number of deferred update data sets specified on the OPEN command or the IFOPEN call. The specific job steps required for deferred update processing are described in detail in the section [[#Job steps|Job steps]].     &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Opening deferred update files==&lt;br /&gt;
 &lt;br /&gt;
===Types of deferred update data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are two forms of deferred update data sets. The OPEN command that places the file in deferred update mode and the attributes of the fields being updated determine whether a fixed-length data set, a variable-length data set, or both are used for the deferred updates.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred update OPEN syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;IFOPEN&amp;lt;/var&amp;gt; [[Media:M204 HLIReference V75.pdf|Host Language Interface]] function have special forms that place the file being opened into deferred update mode. In these forms, you can specify one or two deferred update data sets. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; command syntax in this case is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;OPEN [FILE] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/span&amp;gt;,{[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/span&amp;gt;]}&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; is the name of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file to be opened.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is the name of the fixed-length deferred update data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; is supplied in the OPEN command, deferred updates to KEY and NUMERIC RANGE fields are written to this data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is the name of the variable-length deferred update data set. If &amp;lt;i&amp;gt;dsname2&amp;lt;/i&amp;gt; is supplied in the OPEN command, deferred updates to ORDERED fields are written to this data set. If only &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is supplied in the OPEN command, all index updates are written to this data set. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; is not supplied in the OPEN command, updates to ORDERED fields are not deferred. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Naming conventions&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A deferred update data set must have a name starting with the letters TAPE. It can be placed on either magnetic tape or a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To which &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; responds:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0656: UPDATES DEFERRED TO TAPEPEOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Usage&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the special form of OPEN only once per main step for a particular file. Subsequent ordinary OPEN commands treat the file as though the already declared deferred update data set(s) were specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum number of deferred update files you can have open in a run is 192. If you try to open any more than 192 files, the OPEN fails and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.1529: MAXIMUM DEFERRED UPDATE FILES ALREADY OPEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Space requirements&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space requirements for the deferred update data sets depend on which type of data set is used and the number of KEY, NUMERIC RANGE, or ORDERED retrieval fields that have their index updates deferred during the first phase of the deferred update process.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Example 1: Opening a deferred update file with the first data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the first update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt;, specified. The updates to the Ordered Index-the ORDERED fields-are not deferred. The Ordered Index updates are applied during the first phase of the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 2: Opening a deferred update file with the second data set specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the CARS file is placed in deferred update mode by using the OPEN command with only the second update data set name, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt;, specified. Note the two leading commas before the data set name):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY, NUMERIC RANGE, and ORDERED fields are all deferred to TAPECARV, a variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example 3: Opening a deferred update file with both data sets specified&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Deferring all the updates to the variable-length data set is somewhat less efficient than splitting the updates by providing both deferred update data sets, as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The updates to KEY and NUMERIC RANGE fields are written to the fixed-length data set, TAPECARF, and the updates to ORDERED fields are written to the variable-length data set, TAPECARV.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Active-defer in deferred update files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you open a file in deferred update mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; places the file in active-defer mode, and the file stays in this mode for the life of the run. The file stays in this mode until the first Z step is successfully completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the file is in active-defer mode, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; displays the following error message whenever the file is opened:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0624: FILE IS IN DEFERRED UPDATE MODE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, after the first successful Z step has been run, this message is turned off, whether or not there are still updates to be completed.&amp;lt;/p&amp;gt;&lt;br /&gt;
==Deferred updates: Phase 1==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The system parameter DUFILES gives the number of files that have been opened in deferred update mode in the current run.)   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file is placed in deferred update mode, updates to the file that normally update the index structures are deferred to the deferred update data set(s). These updates can be the result of User Language requests, Host Language Interface functions, or file updating commands. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Number of deferred update data sets required===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must specify at least one deferred update data set in the JCL or FILEDEFs for each file in deferred update mode. If updates are deferred for more than one file in the first phase step, a separate sequence of the remaining second phase steps must be run for each file opened in deferred update mode. (See the seven-, five-, and three-step process descriptions [[#Job steps|Job steps]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The fixed-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname1&amp;lt;/var&amp;gt; in the OPEN command described in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for fixed-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the fixed-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For fixed-length deferred update CMS files, the FILEDEF statement must specify &amp;quot;BLOCK 24&amp;quot; for files stored on disk. This results in a blocking factor of one and prevents errors from occurring during checkpointing.    &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred KEY and NUMERIC RANGE field space requirements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC RANGE fields are deferred to the fixed-length data set, the space requirements for the fixed-length deferred update data set are as follows:     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a KEY field that is added or deleted, one 24-byte record is written to the data set. A changed field counts twice; the old value is deleted and the new one is added.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For each occurrence of a NUMERIC RANGE retrieval field that is added or deleted, the average number of 24-byte records written is equal to:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length deferred update data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length data set name corresponds to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname2&amp;lt;/var&amp;gt; discussed in [[#Deferred update OPEN syntax|Deferred update OPEN syntax]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DCB parameters for variable-length data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default DCB parameters for the variable-length data sets are: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=6000 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, set the BLKSIZE parameter with the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can override the BLKSIZE on the data set or file definition statement. If enough space is available, set BLKSIZE to a full track for most efficient processing. See the description of SPCORE on [[#Setting the SPCORE parameter|Setting the SPCORE parameter]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the variable deferred index update entries is 270.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates to ORDERED fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to ORDERED fields are deferred to the variable-length data set, the space requirements for the variable-length deferred update data set are one record for each occurrence of an ORDERED field that is added or deleted of a length equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;15 + the length of the ORDERED field value being added or deleted is written to the data set&lt;br /&gt;
&amp;lt;/p&amp;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 length of an ORDERED NUMERIC deferred numeric value is always 8. The numeric values of an ORDERED NUMERIC field are always stored as FLOAT 8 numbers in the Ordered Index, even if the numbers are stored as FLOAT 16 in Table B. The length of an ORDERED NUMERIC deferred nonnumeric value is the length of the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A changed field writes two records: one record to delete the old value and one record to add the new value. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deferring updates to KEY and NUMERIC fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the updates to KEY and NUMERIC range fields, as well as ORDERED fields, are deferred to the variable-length data set, the additional space required in the variable-length deferred update data set is as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For each&lt;br /&gt;
occurrence of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;That is added or deleted...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One 28-byte record is written to the data set. A changed field writes two records: one record to delete the old value and one record to add the new value.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;NUMERIC RANGE retrieval field &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Average number of 28-byte records written is equal to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;4 + (4.5 * the number of digits in the occurrence)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the SPCORE parameter==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SPCORE determines how much spare core or unallocated main memory is available after the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; program has finished initializing itself. When a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is first placed into deferred update mode, there must be enough spare core to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate the output buffers for each deferred update data set. Each data set requires a spare core of BUFNO*BLKSIZE bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If more than one deferred update data set is used and/or more than one file goes into deferred update mode, spare core must be large enough to accommodate all the output buffers and associated structures. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/OS, the parameter SPCORE is normally set on User 0&#039;s parameter line - the first input line, containing parameter assignments that further define system options and work area sizes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VSE, the SIZE parameter is set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Under z/VM, SPCORE is usually set in the CCAIN input. (See the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model&amp;amp;nbsp;204 System Manager&#039;s Guide&amp;lt;/var&amp;gt; for further explanation.)  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Phase 1 sample JCL==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section presents z/OS and z/VSE JCL examples for the first phase of the deferred update process. The section that include a single z/VM example begins in [[#z/VM deferred update example|z/VM deferred update example]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence is an example of the first phase in a deferred update procedure. The file PEOPLE is provided with one fixed-length deferred update data set. The file CARS is provided with two deferred update data sets: one fixed-length deferred update data set and one variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// EXEC ...        Include here the basic JCL&lt;br /&gt;
                   or cataloged procedure invocation&lt;br /&gt;
                   provided by the Model 204 system&lt;br /&gt;
                             manager to run BATCH204.&lt;br /&gt;
//PEOPLE    DD DSN=M204.FILE.PEOPLE,DISP=SHR&lt;br /&gt;
//TAPEPEOP  DD DSN=M204.DEFER.PEOPLE,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CARS      DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//TAPECARF  DD DSN=M204.DEFER.FIXED.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//TAPECARV  DD DSN=M204.DEFER.VAR.CARS,DISP=(NEW,CATLG),UNIT=TAPE&lt;br /&gt;
//CCAIN     DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .            Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .            and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE example, Phase 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// JOB UPDATE FILES CARS AND PEOPLE&lt;br /&gt;
// DLBL PEOPLE,&#039;M204.FILE.PEOPLE&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.DEFER.PEOPLE&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL CARS,&#039;M204.FILE.CARS&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS016,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS016,TAPE&lt;br /&gt;
// TLBL SYS017,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS017,TAPE&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
user zero parameters&lt;br /&gt;
DEFINE DATASET TAPEPEOP WITH SCOPE=SYSTEM DDNAME=SYS015 -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=6000&lt;br /&gt;
DEFINE DATASET TAPECARF LIKE TAPEPEOP WITH DDNAME=SYS016&lt;br /&gt;
DEFINE DATASET TAPECARV WITH SCOPE=SYSTEM DDNAME=SYS017 -&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
     .&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN PEOPLE,TAPEPEOP&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B;&lt;br /&gt;
     .          KEY and NUMERIC RANGE deferred updates&lt;br /&gt;
     .         written to TAPEPEOP. Any Ordered&lt;br /&gt;
     .         Index updates are not deferred.&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
INCLUDE procedure  Updating for Tables A and B; KEY&lt;br /&gt;
     .              and NUMERIC RANGE deferred updates&lt;br /&gt;
     .            written to TAPECARF. Ordered&lt;br /&gt;
     .            Index updates written to TAPECARV.&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Deferred updates: Phase 2==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as three data sets might require sorting and application to Tables C and D: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed-length data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable-length data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FRV (fixed-length) data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Descriptions of processing each of these data sets follow. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the fixed-length deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you use a fixed-length deferred update data set, it must be sorted by some job step after the first phase step. The fixed-length records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the fixed-length deferred update data set under z/OS, z/VSE, or z/VM. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate IBM manual for additional information.  &amp;lt;/p&amp;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 z/VM SORT command is not adequate if large files are involved, because it lacks the required capacity. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT data sets===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the fixed-length deferred update data set.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify the SORTOUT DCB parameters as shown in [[#DCB parameters for fixed-length data sets|DCB parameters for fixed-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommended DCB subparameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following DCB subparameters are recommended: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB .&lt;br /&gt;
LRECL=24 BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the sort program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement sorts fixed-length deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of this statement is to sort the records in ascending order by the first 16 bytes.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets depends on the number of records in the fixed-length deferred update data set. In general, set the total amount of space in all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets to about twice the number of bytes in the fixed-length deferred update data set that you are sorting.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that there are 100,000 records in the fixed-length deferred update data set. This is 2,400,000 bytes or about 4 cylinders (rounding up) of a 3380 disk. If you use three sort work data sets for sorting the fixed-length deferred update data set, space parameters of three cylinders apiece yield a total of nine cylinders, or slightly more than twice the size of the fixed-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the fixed-length deferred update data set===&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.FIXED.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the previous JCL. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Following is an example of z/VSE JCL to sort the fixed-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERF.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           Specify SORTWK1&lt;br /&gt;
.                              through SORTWKn for&lt;br /&gt;
.                                     sort work data sets&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
   SORT FIELDS=(1,16,CH,A),WORK=n     n is number of&lt;br /&gt;
   RECORD TYPE=F,LENGTH=24        sort work data sets&lt;br /&gt;
   INPFIL BLKSIZE=1680&lt;br /&gt;
   OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the fixed-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the fixed-length deferred updates, use the following Z command. The Z command processes the sorted output from the sort of the fixed-length deferred update data set and adds the KEY and NUMERIC RANGE retrieval index information to Tables C and D. If any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. For more information about the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Z command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Z command has no arguments. It does the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Reads records from the data set pointed to by the SORT5 data set or file definition statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updates Tables C and D of the currently open &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Writes FRV deferred update records to the data set pointed to by the TAPE5 data set or file definition statement. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When Z command processing is complete, the following statistics are printed, which reflect the changes that occurred during processing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statistic&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Number of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name=value pairs added to the hashed index.   &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DISTINCT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New field name = value pairs added to hashed index fields; or, when processing the FRV deferred update data set, the number of FRV fields updated.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Field name = value pairs deleted from the hashed index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update records written out to the data set pointed to by the TAPE5 data set or file definition statement.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;OI ADDED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries added to the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;OI DELETED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Entries deleted from the Ordered Index.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SPCORE parameter===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SPCORE parameter must be set large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 as well as other associated structures.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Fixed-length data set examples==&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...  Include the basic JCL or cataloged&lt;br /&gt;
            procedure call provided by the&lt;br /&gt;
           Model 204 system manager to run BATCH204&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FIXED.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
// TAPE5 DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),&lt;br /&gt;
// UNIT=3380,SPACE=(TRK,(5,2)),&lt;br /&gt;
// DCB=BLKSIZE=15476&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the fixed-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFIX.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.CARS&#039;,0&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sorting the variable-length deferred update data set==&lt;br /&gt;
 &lt;br /&gt;
===Variable-length sort keys===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use a variable-length deferred update data set, it must be sorted by a job step after the deferred data set first phase. The variable-length records can vary in length from 16 to 270 and must be sorted into ascending order. Unlike fixed-length deferred update records, which contain a fixed-length sort key, variable-length deferred update records for ORDERED fields contain a variable-length sort key. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because no standard sort program supports variable-length sort keys, two sort exits are provided to transform the variable-length sort keys into fixed-length sort keys. Transforming variable-length sort keys is done in the E15 sort exit. The E15 sort exit expands variable-length ORDERED deferred update records into fixed-length records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This process produces longer sort records, which can increase the time and resources required to produce sorted output. Because sorting performance is quite sensitive to record length, be sure to set the expanded length as part of setting up sort control statements (see [[#SORT control statements|SORT control statements]]).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort utilities===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility that supports sorting variable-length records and the use of the E15 and E35 sort exits can be used to perform the sort. The basic JCL for the IBM SORT Utility is described in the following paragraphs. Refer to the appropriate sort utility manual for additional information.        &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VM SORT command cannot be used, because it cannot accommodate sort exits. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Required sort JCL and EXEC statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing JCL or z/VM EXECs for sorting, use the following statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORTIN is the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify the SORTOUT DCB parameters as shown in the first phase step on [[#DCB parameters for variable-length data sets|DCB parameters for variable-length data sets]]. In z/OS and z/VM, set DCB subparameters explicitly. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use the following DCB subparameters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=VB .&lt;br /&gt;
LRECL=270 BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, specify the physical record format for the SORTIN data set using the SORT program&#039;s RECORD statement.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAPRINT (SYSLST in z/VSE) in the step that sorts the variable-length deferred update data set. CCAPRINT is the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;, FILEDEF, or DLBL that points to the sort error message output data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify CCAIN in the step that sorts the variable-length deferred update data set. CCAIN must contain the sort control statements. SYSIN and CCAIN must point to copies of the same sort control statements.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the CCAIN DLBL is not needed when sorting the variable-length deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CCAEXITS, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; of the library containing the sort exits, is used only in the z/OS environment. For information on installing the sort exits, see the Rocket &amp;lt;var&amp;gt;Model&amp;amp;nbsp;204 installation guide&amp;lt;/var&amp;gt; for your operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statements===&lt;br /&gt;
&amp;lt;b&amp;gt;For z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The syntax of SORT control statements is sort-package and operating-system specific, the following example of a SYSIN control statement is applicable for z/OS and z/VM:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/OS and z/VM&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS E15=(OI15&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1800),E35=(OI35&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/span&amp;gt;,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/var&amp;gt; is the sort field length, the value of (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; - 5). It represents the length of the entire data portion of the expanded sort record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is a length parameter. See [[#Setting the variable-length sort parameter (vl)|Setting the variable-length sort parameter (vl)]]. The length of the variable deferred index update entries is 270.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is OS for z/OS or CMS for z/VM, depending on the operating system.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The exact syntax for the MODS statement is operating-system and sort-package dependent.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Syntax for z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SORT FIELDS=(5,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aa&amp;lt;/span&amp;gt;,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;,270,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;)&lt;br /&gt;
MODS PH1=(OI15,1800),PH3=(OI35,1300)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Setting the variable-length sort parameter (vl)==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because deferred update records of unequal length cannot be properly compared, the sort exit adjusts the variable-length deferred update records to a specified length. That length is the variable-length sort parameter, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting determines the number of records in the deferred update data set that are optimally ordered by the sort for loading ordered fields by the Z command. A record whose length is less than the specified setting for vl is sorted into an optimum loading order. Records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; are placed in the sorted deferred update data set but not in an optimum loading order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Finding the optimum loading order===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is usually best to place all deferred update records in optimum loading order. If ORDERED fields and either KEY or NUMERIC RANGE fields exist on the same deferred update data set, specify &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;A&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;B&amp;lt;/span&amp;gt;, whichever is greater.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Equals...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Length of the longest Ordered Index deferred update record + 1. Estimate this as the length of the longest ORDERED field + 16 bytes overhead.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;B &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;28 bytes for Hashed Index (KEY or NUMERIC RANGE fields) deferred update records.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Measuring the longest record====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determining the exact length of the longest deferred update record requires examining the contents of the variable-length deferred update data sets. This examination is done for you if the File Load utility is being used, as the FILELOAD and FLOD commands print statistics that list the lengths of the deferred update records in the form of a histogram. Record lengths can also be obtained through a user-written program or a utility such as SYNCSORT&#039;s HISTOGRAM to read the records in the deferred update data set and determine the longest record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting vl for extreme cases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specifying &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as described in the previous section results in a sorted deferred update data set that is completely ordered for the most efficient loading by the Z command. In some extreme cases, sorting to completely order all deferred update records places excessive demands on the sorting process because of the way the length is increased for the records to be sorted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Typically these cases involve very large files with unusual distributions of record lengths in the deferred update data set as shown in [[#Setting vl example|Setting vl example]]. In these cases, a smaller setting of the vl parameter than previously recommended might be desired, even though this results in a less than complete ordering of the data set. The consequent slowing of the Z command processing must be weighed against the benefit to the sort performance.&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; In all cases, if a KEY or NUMERIC RANGE field is deferred in the variable-length deferred update data set, vl must be greater than 28. Rocket Software suggests that you reorganize any file that was loaded with a vl of less than 28.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl to optimize performance===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort performance is sensitive to the effective length (approximately, the product of the number of records and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter) of the data set to be sorted, falling as the effective length increases. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; setting that optimizes sort performance minimizes the data set&#039;s effective length. Simply lowering &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to minimize effective length might not succeed, however.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; greater than or equal to the longest deferred update record length causes each update record to be lengthened to this setting. Sort performance is hampered, because the effective length of the sort data set is increased. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; less than the longest deferred update record length causes records whose length is greater than or equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; to be spanned: broken into multiple sort records of length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; by the E15 sort exit. These additional sort records are added to the &amp;quot;number of records&amp;quot; factor of the effective length of the sort data set, and might offset the reduction to the effective length from a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. Furthermore, after a record is spanned, it sorts to the end of the sorted data set, reducing the efficiency of the subsequent index loading by the Z command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Setting vl example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The goal in setting &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;, therefore, is to make &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; as small as possible while spanning as few records as possible. For example, suppose that the variable-length deferred update data set containing ORDERED field updates consists of the following distribution of record lengths and records by the histogram produced by the FLOD command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LONGEST DEFERRED UPDATE LRECL=190&lt;br /&gt;
RANGE OF LRECL NUMBER OF RECORDS&lt;br /&gt;
256-270 0&lt;br /&gt;
240-255 0&lt;br /&gt;
224-239 0&lt;br /&gt;
208-223 0&lt;br /&gt;
192-207 0&lt;br /&gt;
176-191 5&lt;br /&gt;
160-175 0&lt;br /&gt;
144-159 0&lt;br /&gt;
128-143 0&lt;br /&gt;
112-127 0&lt;br /&gt;
96-111 15&lt;br /&gt;
80- 95 80&lt;br /&gt;
64- 79 0&lt;br /&gt;
48- 63 2400000&lt;br /&gt;
32- 47 400000&lt;br /&gt;
1-  31 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the longest record is 190, but this is not a very satisfactory choice for the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter. The distribution is such that choosing a lower &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; produces a significant decrease in the data set&#039;s effective length without adding a significant number of spanned records. The most efficient choice for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; here is 64. A large gain in sort performance is purchased at the expense of the relatively few records in the data set that do not get ordered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sort work data sets==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The space needed for the sort work data sets depends on:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort program used&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of records in the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. &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 example, for IBM&#039;s DFSORT the recommended sum of the sizes of all the SORTWK&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xx&amp;lt;/var&amp;gt; data sets is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;number of records to be sorted&amp;lt;/i&amp;gt;) * &amp;lt;i&amp;gt;vl&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2 * (&amp;lt;i&amp;gt;effective length of sort data set&amp;lt;/i&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of records to be sorted is approximately the number of records in the variable-length deferred update data set plus the number of spanned records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example above, with 2,800,100 records in the variable-length deferred update data set, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is set to 64, the effective length of the data set to be sorted is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;(2800000 + (2.&amp;amp;#x2217;80) + (2&amp;amp;#x2217;15) + (3&amp;amp;#x2217;5)).&amp;amp;#x2217; 64 = 123,215,040&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is about 174 cylinders (rounding up) of a 3380 disk. If you use 3 sort work data sets for sorting the variable-length deferred update data set, space parameters of 116 cylinders apiece yield a total of 348 cylinders, two times the effective length of the sort data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Installing sort exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a detailed discussion of the installation and use of sort exits, consult the sort manuals for the sort program to be used, and also see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Variable-length data set examples==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples assume that the sort exit modules or z/VM TEXT files have been given the names OI15&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; and OI35&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxx&amp;lt;/var&amp;gt; is either OS for z/OS or CMS for z/VM, depending on the operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//CCAPRINT DD SYSOUT=A&lt;br /&gt;
//CCAEXITS DD DSN=M204.LINKLIB,DISP=SHR&lt;br /&gt;
//SORTIN DD DSN=M204.DEFER.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=VB,LRECL=270,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,3,,CONTIG),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
   SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
   RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
   MODS E15=(OI15OS,1800,CCAEXITS,N),E35=(OI35OS,1300,&lt;br /&gt;
             CCAEXITS,N)&lt;br /&gt;
END&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many installations provide cataloged procedures that contain most of the above JCL. Check the sort package documentation for the definitive forms of the sort control statements necessary at your installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the variable-length deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.DEFERV.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements                Specify SORTWK1 through&lt;br /&gt;
.                                    SORTWKn for sort work&lt;br /&gt;
.                                    data sets&lt;br /&gt;
.&lt;br /&gt;
// DLBL M204CL,&#039;M204.CORE.IMAGE.LIBRARY&#039;&lt;br /&gt;
// LIBDEF CL,SEARCH=M204CL&lt;br /&gt;
// EXEC SORT,SIZE=(AUTO,100K)&lt;br /&gt;
SORT FIELDS=(5,75,CH,A),WORK=n        n is number of sort&lt;br /&gt;
                                      work data sets&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS PH1=(OI15,L2000,E15),PH3=(OI35,L1000,E35)&lt;br /&gt;
INPFIL BLKSIZE=6000&lt;br /&gt;
OUTFIL BLKSIZE=6000&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Applying the variable-length deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the variable-length deferred updates, using the [[#Z command|Z command]].&lt;br /&gt;
 &lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the Ordered Index information to Table D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If any KEY and/or NUMERIC RANGE deferred update records are also in the variable-length deferred update data set, the Z command adds this KEY and/or NUMERIC RANGE retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If there are KEY field updates in the variable-length deferred update data set, and any of the KEY fields updated also have the FRV attribute, the Z command creates an additional deferred update data set, an FRV data set, that is processed in later job steps. &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 on the FRV deferred update data set, see [[#Applying the FRV deferred updates|Applying the FRV deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...       Include here the basic JCL&lt;br /&gt;
                  or cataloged procedure invocation&lt;br /&gt;
                  provided by the Model 204&lt;br /&gt;
                  system manager to run BATCH204.&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.VAR.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If both a fixed- and a variable-length data set are supplied for the deferred updates, then TAPE5 is not used when applying the variable-length updates and should point to a dummy data set when applying the variable-length updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set exists, the FRV deferred updates are generated when the fixed-length deferred updates are applied. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If only a variable-length data set is supplied for the deferred updates, and any FRV fields are updated during the first phase step, then an FRV deferred update data set must be provided with the TAPE5 &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; so that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can write out the FRV deferred updates to this data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The JCL to apply the variable-length deferred index updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTVAR.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM DDNAME=SYS015-&lt;br /&gt;
RECFM=VB LRECL=270 BLKSIZE=6000&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==FRV deferred update data set==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV (For Each Value) deferred update data set is very similar to a fixed-length deferred update data set. One 24-byte record is written to the FRV deferred update data set for every new value of an FRV field that is stored in Tables C and D during the Z command processing. Unless the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file being updated has many FRV fields or an FRV field is also MANY-VALUED, the FRV deferred update data set is fairly small. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Determining the FRV step===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number and type of deferred update data sets specified in the OPEN command or IFOPEN call in the first phase of deferred data set processing determines when the FRV defined data set is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a fixed-length deferred update data set was specified on the OPEN command or IFOPEN call in the first phase step, and an FRV field was updated, the FRV deferred update data set is generated when the fixed-length deferred updates are applied (in other words, during the execution of the Z command that applies the fixed-length deferred updates). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no fixed-length deferred update data set was specified in the OPEN command or IFOPEN call, but a variable-length deferred update data set was specified, and an FRV field was updated, the FRV deferred update data set is generated when the variable-length deferred updates are applied-in other words, during the execution of the Z command that applies the variable-length deferred updates. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Creating the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is always named TAPE5. It can be placed either on magnetic tape or on a direct access device.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;DCB parameters&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default parameters are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=6000&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE installations, TAPE5 must be allocated. Under z/OS, no additional action regarding TAPE5 need be taken.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the BLKSIZE subparameter explicitly. A full disk track is recommended. z/VSE users can specify TAPE5&#039;s block size using the DEFINE DATASET command. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sorting the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV deferred update data set is sorted after the step that created the FRV deferred update data set. The FRV deferred update records are 24 bytes long and must be sorted in ascending order by the first 16 bytes using the standard EBCDIC collating sequence.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Determine the number of records in the FRV deferred update data set by checking statistics of the Z command that created the FRV deferred update data set. The FRV statistic records the number of FRV deferred update records written to the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any sort utility can be used to perform the sort of the FRV deferred update data set. The basic JCL for the IBM SORT Utility follows. Refer to the appropriate IBM manual for additional information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORTIN and SORTOUT===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SORTIN is the FRV deferred update data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify SORTOUT in the same way as in the step in which it was created. In z/OS and z/VM, set DCB subparameters explicitly. The following DCB subparameters are recommended:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;RECFM=FB&lt;br /&gt;
LRECL=24&lt;br /&gt;
BLKSIZE=15476 (1/3 track on a 3380 disk)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In z/VSE, the physical record format for the SORTIN data set is specified using the SORT program&#039;s RECORD statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===SORT control statement examples===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following SYSIN control statement example sorts FRV deferred update records in z/OS: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=E&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the value of the FRV statistic taken from the output of the Z command that created the FRV deferred update data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For z/VSE, the SYSIPT control statement is as follows: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SORT FIELDS=(1,16,CH,A),SIZE=En&lt;br /&gt;
RECORD TYPE=F,LENGTH=24&lt;br /&gt;
INPFIL BLKSIZE=blocksize of SORTIN&lt;br /&gt;
OUTFIL BLKSIZE=blocksize of SORTOUT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sort work data sets for the FRV deferred update data set===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The amount of space needed for the sort work data sets for the FRV deferred update data set is calculated in the same way as for the sort work data sets for the fixed-length deferred update data set. See [[#Sort work data sets for the fixed-length deferred update data set|Sort work data sets for the fixed-length deferred update data set]].   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/OS JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//SORT EXEC PGM=SORT,TIME=60,&lt;br /&gt;
// REGION=200K,&lt;br /&gt;
// PARM&#039;MSG=AP,CORE=150000&#039;&lt;br /&gt;
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR&lt;br /&gt;
//SORTMSGS DD SYSOUT=A&lt;br /&gt;
//SYSOUT DD SYSOUT=A&lt;br /&gt;
//SORTIN DD DSN=M204.TAPE5.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//SORTOUT DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(NEW,CATLG,DELETE),UNIT=TAPE,&lt;br /&gt;
// DCB=(RECFM=FB,LRECL=24,BLKSIZE=15476)&lt;br /&gt;
//SORTWK01 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=3380&lt;br /&gt;
//SORTWK02 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,SEP=SORTWK01)&lt;br /&gt;
//SORTWK03 DD SPACE=(CYL,1),&lt;br /&gt;
// UNIT=(3380,(SEP=SORTWK01,SORTWK02))&lt;br /&gt;
//SYSIN DD *&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),SIZE=E100&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many sites provide cataloged procedures that contain most of the above JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following z/VSE JCL sorts the FRV deferred update data set:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// TLBL SORTIN1,&#039;M204.TAPE5.CARS&#039;&lt;br /&gt;
// ASSGN SYS002,TAPE&lt;br /&gt;
// TLBL SORTOUT,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS001,TAPE&lt;br /&gt;
sort work statements           &amp;lt;i&amp;gt;Specify SORTWK1 through&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;SORTWKn for sort work&amp;lt;/i&amp;gt;&lt;br /&gt;
.                              &amp;lt;i&amp;gt;data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
// EXEC SORT,SIZE=100K&lt;br /&gt;
 SORT FIELDS=(1,16,CH,A),WORK=n        &amp;lt;i&amp;gt;n is number of&amp;lt;/i&amp;gt;&lt;br /&gt;
                                       &amp;lt;i&amp;gt;sort work data sets&amp;lt;/i&amp;gt;&lt;br /&gt;
 RECORD TYPE=F,LENGTH=24&lt;br /&gt;
 INPFIL BLKSIZE=1680&lt;br /&gt;
 OUTFIL BLKSIZE=1680&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Applying the FRV deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To apply the FRV deferred updates, use the [[#Z command|Z command]].&lt;br /&gt;
The Z command:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Processes the sorted output from the sort of the FRV deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Adds the FRV retrieval index information to Tables C and D. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Applying the FRV deferred updates is much like applying the fixed-length deferred updates, except that:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SORT5 points to the sorted FRV deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TAPE5, under z/OS, points to a dummy data set that has DCB=BLKSIZE=24. Under z/VM, TAPE5 is a dummy file; under z/VSE, it must not be a dummy file.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;SPCORE&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Set the SPCORE parameter large enough to open the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file and to accommodate both the input buffer for SORT5 and the output buffer for TAPE5 along with other structures. See [[#Setting the SPCORE parameter|Setting the SPCORE parameter]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/OS JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/OS JCL to apply the FRV deferred updates for z/OS follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// EXEC ...                   &amp;lt;i&amp;gt;Include here the basic JCL or&amp;lt;/i&amp;gt;&lt;br /&gt;
                             &amp;lt;i&amp;gt;cataloged procedure invocation&amp;lt;/i&amp;gt;&lt;br /&gt;
                                  &amp;lt;i&amp;gt;provided by the Model 204&amp;lt;/i&amp;gt;&lt;br /&gt;
                               &amp;lt;i&amp;gt;system manager to run BATCH204.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CARS DD DSN=M204.FILE.CARS,DISP=SHR&lt;br /&gt;
//SORT5 DD DSN=M204.SORTOUT.FRV.CARS,&lt;br /&gt;
// DISP=(OLD,DELETE,KEEP)&lt;br /&gt;
//TAPE5 DD DUMMY,DCB=BLKSIZE=24&lt;br /&gt;
                               &amp;lt;i&amp;gt;TAPE5 points to a dummy data set&amp;lt;/i&amp;gt;&lt;br /&gt;
                                 &amp;lt;i&amp;gt;because no new FRV deferred&amp;lt;/i&amp;gt;&lt;br /&gt;
                                   &amp;lt;i&amp;gt;updates will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
//CCAIN DD *&lt;br /&gt;
user zero parameters&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VSE JCL&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The z/VSE JCL to apply the FRV deferred updates for z/VSE follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;// DLBL CARS,&#039;M204.FILE.CARS&#039;,,DA&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
// TLBL SYS015,&#039;M204.SORTFRV.CARS&#039;&lt;br /&gt;
// ASSGN SYS015,TAPE&lt;br /&gt;
// DLBL TAPE5,&#039;M204.TAPE5.DUMMY&#039;&lt;br /&gt;
// EXTENT SYSnnn,volser&lt;br /&gt;
                           &amp;lt;i&amp;gt;TAPE5 is not used because&amp;lt;/i&amp;gt;&lt;br /&gt;
                         &amp;lt;i&amp;gt;no new FRV deferred updates&amp;lt;/i&amp;gt;&lt;br /&gt;
                                    &amp;lt;i&amp;gt;will be created.&amp;lt;/i&amp;gt;&lt;br /&gt;
// EXEC BATCH204,SIZE=AUTO&lt;br /&gt;
PAGESZ=6184,MAXBUF=20&lt;br /&gt;
DEFINE DATASET TAPE5 WITH SCOPE=SYSTEM -&lt;br /&gt;
RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
DEFINE DATASET SORT5 WITH SCOPE=SYSTEM -&lt;br /&gt;
DDNAME=SYS015 RECFM=FB LRECL=24 BLKSIZE=1680&lt;br /&gt;
LOGIN userid&lt;br /&gt;
password&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
CLOSE ALL&lt;br /&gt;
EOJ&lt;br /&gt;
/*&lt;br /&gt;
/&amp;amp;amp;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==z/VM deferred update example==&lt;br /&gt;
 &lt;br /&gt;
===Using deferred updates with FASTLOAD to load files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The most common use of the deferred update feature is to load files. The z/VM FASTLOAD driver EXEC, distributed with the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; installation, incorporates the deferred update procedure into the file loading process. The FASTLOAD EXEC can initiate a multistep deferred update procedure that is as many job-steps (seven, five, three, or one) as required.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FASTLOAD EXEC accepts as parameters the name of another EXEC, such as DEFUPD in the following example, and the type (number of deferred update procedure job steps) of FASTLOAD to execute. DEFUPD EXEC is used by the driver to define the files to be used for each FASTLOAD step and to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; when necessary. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC format===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the FASTLOAD command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FASTLOAD [TEST] [NODCSS] &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/span&amp;gt; [NUM] [(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;[)]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no option is specified, 5STEP is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;TEST specifies a test version of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ONLINE module or shared segment-that is, T204. If TEST is not specified, the production version-that is, M204 is invoked.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NODCSS specifies that shared segments are not to be used, even though they exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;EXECname&amp;lt;/var&amp;gt; specifies the name of an EXEC procedure that provides the file definitions and other logic required to prepare a deferred update or File Load utility job. The EXEC procedure is invoked once before each step of the deferred update process, and during FASTLOAD command initialization.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NUM specifies the number, from 1 through 7, of the step to begin with in case of a restart.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/var&amp;gt; is one of the following:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Indicates...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;7STEP &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Seven-step job &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Five-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Three-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1STEP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One-step job&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting parameters in the FASTLOAD EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Parameters required to invoke &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are set in the EXEC procedure called by the FASTLOAD EXEC. These parameters must be placed in the stack using the &amp;amp;amp;STACK command as keyword-value pairs, separated by blanks, during Steps 1, 3, 5, and 7. The only operand provided to the EXEC called by the FASTLOAD EXEC is the step number.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FASTLOAD EXEC example===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, the FASTLOAD EXEC calls DEFUPD and passes it the parameter for the step number to be executed. The DEFUPD EXEC concatenates the passed parameter (&amp;amp;amp;1, for example) with the step name (FLOAD) in a &amp;amp;amp;GOTO statement. This numbering and consequent program flow simulate the job steps in the previous z/OS and z/VSE examples.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;z/VM EXEC&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Enter the following command to run the example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FASTLOAD DEFUPD (7STEP&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC appears below, followed by a step-by-step explanation of the EXEC and the files defined in each step.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;amp;amp;CONTROL OFF&lt;br /&gt;
&amp;amp;amp;ERROR &amp;amp;amp;EXIT &amp;amp;amp;RETCODE&lt;br /&gt;
 &lt;br /&gt;
&amp;amp;amp;IF &amp;amp;amp;1 EQ 0 &amp;amp;amp;GOTO -ACCESS&lt;br /&gt;
FILEDEF * CLEAR&lt;br /&gt;
&amp;amp;amp;GOTO -FLOAD&amp;amp;amp;1&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-ACCESS&lt;br /&gt;
RELEASE M&lt;br /&gt;
ACCESS 201 M&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD1&lt;br /&gt;
FILEDEF TAPECARF TAP1 SL ( BLOCK 2400 LRECL 24 RECFM FB&lt;br /&gt;
LABELDEF TAPECARF VOLID 123456&lt;br /&gt;
FILEDEF TAPECARV DISK CARS DEFV W (BLOCK 6000 LRECL 270 RECFM VB&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN1 *&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD2&lt;br /&gt;
LABELDEF SORTIN1 VOLID 123456&lt;br /&gt;
SSORT TAP1 CARS DEFSORT W DEFUPDF SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD3&lt;br /&gt;
FILEDEF SORT5 DISK CARS DEFSORT W&lt;br /&gt;
FILEDEF TAPE5 DISK CARS FRV W ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN3 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD4&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPDV SORTCTRL B&lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
SSORT CARS DEFV W CARS SORTVAR W DEFUPDV SORTCTRL B&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD5&lt;br /&gt;
FILEDEF SORT5 DISK CARS SORTVAR W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB)&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN5 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
 &lt;br /&gt;
 -FLOAD6&lt;br /&gt;
SSORT CARS FRV W CARS FRVSORT W FASTLOAD SORTCTRL C&lt;br /&gt;
&amp;amp;amp;EXIT &amp;amp;amp;RC&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-FLOAD7&lt;br /&gt;
FILEDEF SORT5 DISK CARS FRVSORT W&lt;br /&gt;
FILEDEF TAPE5 DUMMY ( BLOCK 24 LRECL 24 RECFM FB&lt;br /&gt;
FILEDEF CCAIN DISK DEFUPD CCAIN7 *&lt;br /&gt;
FILEDEF CARS M DSN M204DB CARS&lt;br /&gt;
&amp;amp;amp;GOTO -COMMON&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;-COMMON&lt;br /&gt;
 &lt;br /&gt;
FILEDEF CCAPRINT DISK DEFUPD&amp;amp;amp;1 CCAPRINT A&lt;br /&gt;
FILEDEF CCAAUDIT DISK DEFUPD&amp;amp;amp;1 CCAAUDIT A&lt;br /&gt;
FILEDEF CCATEMP N DSN WORK CCATEMP&lt;br /&gt;
FILEDEF CCASTAT N DSN WORK CCASTAT&lt;br /&gt;
FILEDEF CCASNAP PRINTER&lt;br /&gt;
&amp;amp;amp;STACK SYSOPT 128&lt;br /&gt;
&amp;amp;amp;EXIT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Description of steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The task performed and the files defined in each step are as follows.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Step 1&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Update database file CARS in deferred update mode. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
Fixed-length deferred update data set, defined to go to a standard label tape. A LABELDEF command defines the volume serial number.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses a tape, it executes the M204MOUN EXEC to tell an operator to mount the volume label specified in the LABELDEF. The M204UNLD EXEC is executed at the end of tape processing to issue the appropriate z/VM TAPE command function. The version of M204UNLD distributed has a TAPE RUN command. Change this to TAPE REW to run this example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPECARV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN1, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 2&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the fixed-length deferred update file that has been written in Step 1. This example uses SYNCSORT, which is able to read tape input. A LABELDEF is needed to define the volume serial number.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDF SORTCTRL. See the DEFUPD EXEC for the control statement format.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 3&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the first Z command to apply the fixed-length deferred updates. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted fixed-length deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FRV deferred update data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN3,containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the variable-length deferred update data set. This example uses SYNCSORT and the sort exits OI15CMS and OI35CMS. These sort exits are provided with the installation. Typically, the sort exits are either placed in a TXTLIB or reside on an accessed disk with a filetype of TEXT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is DEFUPDV SORTCTRL. See the DEFUPD EXEC for the control statement format.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort control statements (same as SYSIN).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort error message file for the variable-length deferred update data set sort. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 5&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Execute the second Z command to apply the variable-length deferred updates:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of variable-length deferred update entries.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file. If both a fixed-length deferred update data set and a variable-length deferred update data set are used, the FRV deferred update data set is generated during the processing of the fixed-length deferred update data set (Step 3).&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN5, containing the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 6&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Sort the FRV index file that has been written in Step 3. This example uses SYNCSORT.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SYSIN file to the sort is FASTLOAD SORTCTRL. This file is provided with the installation. See the DEFUPD EXEC for the control statement format.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step 7&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Apply the FRV deferred updates using the Z command: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SORT5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sorted data set of FRV deferred updates.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;TAPE5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Dummy file.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAIN&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;z/VM disk file, DEFUPD CCAIN7, that contains the commands to open and update the file CARS. A file listing follows the EXEC.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CARS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; database file being updated. The file is defined on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Step COMMON&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define files common to each step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
COMMON is executed with Steps 1, 3, 5, and 7. The files defined are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAAUDIT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCAPRINT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Step number is concatenated to the filename to have a separate file for each step.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASTAT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCATEMP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Previously defined file on a z/OS minidisk.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CCASNAP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to PRINTER to save disk space.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;amp;STACK&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Passes execution parameter SYSOPT 128 in the program stack to FASTLOAD. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFUPD EXEC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFUPD EXEC input files are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;DEFUPD CCAIN1&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=50000&lt;br /&gt;
OPEN CARS,TAPECARF,TAPECARV&lt;br /&gt;
I STORE&lt;br /&gt;
CLOSE CARS&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN3&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN5&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=30000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPD CCAIN7&amp;lt;/b&amp;gt;&lt;br /&gt;
SPCORE=27000&lt;br /&gt;
OPEN CARS&lt;br /&gt;
Z&lt;br /&gt;
EOJ&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDF SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A),SIZE=500&lt;br /&gt;
INPFIL BLKSIZE=2400&lt;br /&gt;
RECORD TYPE=F,LENGTH=(24,24)&lt;br /&gt;
OPTION PRINT=ALL&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;DEFUPDV SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(5,75,CH,A)&lt;br /&gt;
RECORD TYPE=V,LENGTH=(270,80,270,80)&lt;br /&gt;
MODS E15 = (OI15CMS,1500),E35=(OI35CMS,800)&lt;br /&gt;
END&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;FASTLOAD SORTCTRL&amp;lt;/b&amp;gt;&lt;br /&gt;
SORT FIELDS=(1,16,CH,A)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Job steps==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first phase of the deferred update process is performed in one job step. The second phase can involve many separate job steps: two job steps for each deferred update data set generated in the first phase and two job steps for the FRV deferred update data set, if one is generated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Two basic job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two job steps for processing each deferred update data set are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First job step executes a sort program, such as IBM SORT, to sort the deferred update data set for efficient processing in the next job step.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Second job step executes the BATCH204 load module to process the sorted deferred index information and to update Tables C and D.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Total number of job steps===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number of job steps in the entire deferred update process depends on the attributes of the fields being updated and the number of deferred index update data sets specified on the OPEN command or IFOPEN call. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The deferred update process can have three, five, or seven steps. Each type of deferred update process is explained in detail in the following sections. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[#Total number of job steps|Determining deferred update process steps]] is a quick reference chart for determining the number of job steps needed, including the first phase job step, for each file placed in deferred update mode.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Determining deferred update process steps&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File attributes for all deferred fields in file&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;deferred update &amp;lt;br&amp;gt;data sets in &amp;lt;br&amp;gt;OPEN command&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;sort files &amp;lt;br&amp;gt;required&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;No. of &amp;lt;br&amp;gt;steps&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and FRV&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, FRV, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;2&amp;lt;br /&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;5&amp;lt;br /&amp;gt;7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NUMERIC RANGE, and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NUMERIC RANGE and ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;br /&amp;gt;2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;br /&amp;gt;5&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;1&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;3&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Seven-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A seven-step deferred update process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Deferred update mode&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;File was put in deferred update mode by specifying two deferred update data sets on the OPEN command or IFOPEN call: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One variable-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Hashed index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields with the KEY and/or NUMERIC RANGE attribute are updated and the index updates are deferred to the fixed-length data set. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ordered Index fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ORDERED CHARACTER and/or ORDERED NUMERIC are updated and the index updates are deferred to the variable-length data set.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Key fields&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Seven-step job steps&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Follow these steps in the seven-step deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first phase step, generate two deferred update data sets: one fixed-length and one variable-length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. (It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Five-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Three combinations of field attributes and specified deferred update data sets require five job steps to complete the deferred update process: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width:80%&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This type...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Does...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length data set with FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed-length deferred update processing for KEY and/or NUMERIC RANGE and FRV fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;Fixed-length and Variable-length data set &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fixed- and variable-length deferred update processing for KEY and/or NUMERIC RANGE and ORDERED fields. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length data set and FRV field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Variable-length deferred update processing for KEY, NUMERIC RANGE, and ORDERED fields, and fixed-length deferred update processing for FRV fields.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/FRV type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields (KEY and/or NUMERIC RANGE) are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case, either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces updates to the Ordered Index (ORDERED fields) to be updated immediately, and no Ordered Index updates are deferred. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set, which generates an additional fixed-length deferred update data set for FRV fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Fixed/Variable===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed/Variable type of five-step process is needed when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length and one variable-length deferred update data sets on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed/Variable five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generates one fixed-length and one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set. It is not necessary to sort the variable-length data set before the fixed-length data set. Steps 4 and 5 can be switched with steps 2 and 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use Variable/FRV===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable/FRV type of five-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE) and/or Ordered Index fields (ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One or more of the KEY fields updated and deferred also has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable/FRV five-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set, which generates an additional fixed-length deferred update data set (for FRV fields).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the additional fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates for the additional sorted fixed-length deferred update data set.   &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Three-step deferred update process==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two types of three-step deferred update processes are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Variable type&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Fixed three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Fixed type of three-step process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one fixed-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-are updated and the index updates are deferred to the fixed-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Either no ORDERED fields are updated or the variable-length deferred update data set is intentionally omitted. This omission forces immediate updates to the Ordered Index (ORDERED fields) and no Ordered Index updates are deferred.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Fixed three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first-phase step, generate one fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the fixed-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted fixed-length deferred update data set. (This does not generate an additional fixed-length deferred update data set, because there are no FRV fields involved.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===When to use the Variable three-step process===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Variable type of three-step deferred update process is used when the following conditions occur:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File was put in deferred update mode by specifying one variable-length deferred update data set on the OPEN command or IFOPEN call.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Hashed index fields-KEY and/or NUMERIC RANGE-and/or Ordered Index fields-ORDERED CHARACTER and/or ORDERED NUMERIC-are updated and the index updates are deferred to the variable-length data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;None of the KEY fields updated and deferred has the FRV attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other words, no fixed-length deferred update data set is supplied, so all the deferred updates generated by the first phase are sent to the variable-length data set. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Variable three-step process&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this case the following steps are necessary in the deferred update process:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First-phase step, generate one variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Sort the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Apply the updates from the sorted variable-length deferred update data set.         &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Merging deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is possible to merge the fixed-length deferred update data sets of many first-phase steps into a single sorted data set. This can be useful when many jobs are used to update one file, and each job produces its own fixed-length deferred update data set. The following restrictions apply to merging deferred update data sets:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No KEY or NUMERIC RANGE deferred update records can be deferred to the variable-length deferred update data set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;No variable-length deferred update data sets can be merged. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The merged fixed-length deferred update sort output is used as input for a single index step. A single index step can handle a maximum of 2,147,483,648 (or 2&amp;lt;sup&amp;gt;31&amp;lt;/sup&amp;gt;) deferred update records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The variable-length deferred update data set cannot be merged. If the fixed-length deferred update data sets produced in the same first-phase steps as the variable-length data sets are merged, the variable-length deferred update data sets must still be processed separately and in chronological order.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although merging several deferred update data sets can produce a cost reduction in the next step, other considerations, such as error recovery, can make merging undesirable. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Overriding deferred updates==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following type of update situation: new records are to be added to an automobile file in which each record has a unique SERIAL NUMBER field, which is KEY. Before a record is added, the user issues a FIND statement to see if any other record already exists with the same value of SERIAL NUMBER. If one is found, the new record is not added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If updates to the index are deferred, the FIND fails to locate duplicate records that already have been added in the same main step. In order to avoid this situation, define the field SERIAL NUMBER with the NON-DEFERRABLE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferring updates in single-user runs===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In single-user runs, however, there is usually no reason not to defer updates. Consequently, in single-user runs, if a file is in deferred update mode, the NON-DEFERRABLE attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. If you must prevent updates to a field from being deferred in a single user environment, use the following technique to simulate a multiuser environment and thereby force the NON-DEFERRABLE fields to be updated immediately:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On User 0&#039;s parameter line in the main job step, set NUSERS = 2. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Follow User 0&#039;s parameter line with a second parameter line that contains IODEV=3, INPUT=T03U001I, and OUTPUT=T03U001O. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Include these three statements in the JCL for the main step:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;//T03U001I   DD   *&lt;br /&gt;
/*&lt;br /&gt;
//T03U001O   DD   SYSOUT=A&lt;br /&gt;
&amp;lt;/p&amp;gt;&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 z/VSE, specify the IODEV=3 input and output file names using z/VSE system logical names that are assigned to &amp;quot;IGN&amp;quot; in the JCL.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Handling a deferred update override===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you override the deferred update feature, you must manually turn off the [[File Load utility: FLOD and FILELOAD commands#Internal file load optimization feature|file load optimization feature]]. To turn this feature off, specify a read-and-load-a-field statement with the delete mode bit, and then include a branch before the statement so that it never executes.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DUMMY             &amp;lt;i&amp;gt;Define a dummy field before&amp;lt;/i&amp;gt;&lt;br /&gt;
  .                            &amp;lt;i&amp;gt;the FILELOAD statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=5     Branch to 5&lt;br /&gt;
DUMMY=1,0.X&#039;4000&#039;              &amp;lt;i&amp;gt;Turn on delete mode bit&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#5                             &amp;lt;i&amp;gt;Always skip DUMMY statement.&amp;lt;/i&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates for NON-DEFERRABLE fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are times in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; in which updates are deferred for NON-DEFERRABLE fields. Some NON-DEFERRABLE fields are deferred if the file is opened in deferred update mode and NUSERS=1 (that is, the file is opened in single user mode).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following table describes the conditions under which the updates are deferred for NON-DEFERRABLE fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Deferring NON-DEFERRABLE fields&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Condition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed-length data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Variable-length* data set only&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Fixed- and variable-length* data sets&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;N/A&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No updates deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE through FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NON-UNIQUE without FLOD&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY and NR deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR, and ORD deferred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;KEY, NR deferred to Fixed&amp;lt;br /&amp;gt;&lt;br /&gt;
ORD deferred to Variable&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=&amp;quot;4&amp;quot;&amp;gt;*A variable-length data set is required for ORDERED fields loaded through FLOD.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;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; If new fieldname=value pairs are created (for example COLOR=BLUE, where BLUE is a new property entry) you can generate and defer FRV index updates during the Z-step of a KEY index.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Deferred updates and Reuse Record Number files===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Do not use deferred update mode with Reuse Record Number (RRN) files except where you are performing simple record adds, such as reorganizing files. Using deferred update mode with RRN files might cause you to lose updates without any warning. For more information, see [[File design#RRN files and deferred update mode|RRN files and deferred update mode]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Field_design&amp;diff=78686</id>
		<title>Field design</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Field_design&amp;diff=78686"/>
		<updated>2015-07-30T23:22:31Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Fix the message to the way it really is in 7.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The field structures in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; are at the heart of providing applications which perform the functions that you require in the most efficient manner possible.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This page discusses exactly how the data structures should be defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Designing records, field groups, and fields==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When setting up a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file, you must first decide what fields the records will contain. A record in a personnel file, for instance, might contain a social security number field, a last name field, a spouse&#039;s name field, and so on. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Variable record formats===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The record in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is a very loose concept. Physically, it is simply a collection of fields (data items).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any field in the [[#Table A (File architecture) Internal File Dictionary|Table A dictionary]] can appear in any record in the file. It is quite possible that you create a file with many different logical record types with only a few (or even none) appearing in all of the records.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Thus, each record is not required to have a value for every field; so that record lengths are variable, and it can be argued that the entire concept of a record &amp;quot;format&amp;quot; does not apply to Model 204 files. If an employee&#039;s address is unknown or doesn&#039;t exist in a particular logical record, for example, the address field will be left out of the record altogether. The exception to this is [[#Preallocated fields (OCCURS attribute)|preallocated fields]]. If they are are defined for a file, space is reserved in each record for all such fields, even if they would never exist for that logical record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiply occurring fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most types of fields can be multiply occurring, that is, have more than one value per record. For example, the &amp;lt;code&amp;gt;CHILD&amp;lt;/code&amp;gt; field can appear no times, once, or several times in one record.  &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Field descriptions and attributes==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you describe a field in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file with the &amp;lt;var&amp;gt;[[DEFINE FIELD command|DEFINE FIELD]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[REDEFINE command|REDEFINE FIELD]]&amp;lt;/var&amp;gt; command, you specify a field description that consists of the field name followed by a list of field attributes. These attributes determine how a field can be accessed and how it is stored internally. This section describes the attributes supported for &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Within a record, there is usually no restriction on the number of different fields that can have the same attribute (the exception being the key fields for Sorted and Hash Key files). For example, several fields within the same record can have ORD CHAR indices built for them.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Attribute assignments&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The attribute assignments apply whether the field was defined separately or as part of a [[Field group (File architecture)|field group]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you do not assign a particular attribute to a field, the default attribute is assigned. For example, if you do not assign the &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; attribute to a field definition, the field is assigned &amp;lt;var&amp;gt;NON-KEY&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a required attribute is not assigned a value, the default value is used. For example, if you define a CONCATENATION-OF field, which requires the SEPARATOR attribute, and you do not enter the SEPARATOR attribute, the default value of X&#039;00&#039; is used as the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Multiply occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For most field attributes there is almost no restriction on the number of times a particular field can occur within a record. This makes file/record design very flexible. If you have a record which has child details as repeating fields or groups, for example, any number can be supported. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Singly occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are a few attributes which require a field to have no more than one occurrence per record:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;NUMERIC RANGE&lt;br /&gt;
&amp;lt;li&amp;gt;Sort key fields&lt;br /&gt;
&amp;lt;li&amp;gt;Hash key fields&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Others require a field to have no more than one occurrence per record or field group (depending on the context in which they are defined):&lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;AT-MOST-ONE&lt;br /&gt;
&amp;lt;li&amp;gt;EXACTLY-ONE&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Indexing fields==&lt;br /&gt;
Model 204 files can become quite large, and so it is almost always preferable to directly access the record or records which have particular characteristics. As part of your design process, you should have identified which field(s) are likely to be used for direct retrieval of sets of records. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, if you have a personnel file, you are likely to have a unique identifier for each employee, and it is also likely that you will often want to process only the record or records with that ID.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where retrievals are attempted against non indexed fields, a search of Table B must be done, and the danger of request cancellation because [[MBSCAN parameter|MBSCAN]] is exceeded exists.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Model 204 supports a few different ways to implement these direct searches, and the recommended default choice for indexing is the ORDERED attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===ORDERED and NON-ORDERED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Fields used in retrieval specifications should normally be defined as ORDERED (unless one of the other indexing methods, described below) is chosen. NON-ORDERED, the default, means that all retrieval requests need to scan the records directly in Table B to find the selected records.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For the architectural approach to the implementation of the ordered index, refer to [[Table D (File architecture)#Understanding the Ordered Index|understanding the Ordered Index]].&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Choosing an order type====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
An ORDERED field can have an index with either CHARACTER or NUMERIC ordering. This is called its order type. The field&#039;s order type and updating characteristics are declared with the DEFINE command. You can specify only one order type for a field. ORDERED NUMERIC fields contain numeric values stored as standardized floating-point numbers in one section of the index and non-numeric values in EBCDIC order in another section. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====ORDERED CHARACTER fields=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
ORDERED CHARACTER fields use the standard EBCDIC collating sequence. If a field is ORDERED CHARACTER, all values of the field are stored in the Ordered Index in EBCDIC collating sequence order.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====ORDERED NUMERIC fields=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
A string field value is considered NUMERIC if it consists of digits, with one optional decimal point, and an optional plus or minus sign at the beginning of the string. The value of the number cannot be greater than 10 to the power 75 or less than 10 to the power -75.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If an ORDERED NUMERIC field is also FLOAT, exponential format is allowed. Values for BINARY, FLOAT (8), and FLOAT (16) fields are rounded to 15 significant digits. Values for FLOAT (4) fields are rounded to 6 significant digits. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
An invalid value is stored as an unconverted string.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
In ORDERED NUMERIC fields, leading zeros are ignored. For example, 001 and 1 are considered equivalent and are maintained in the ORDERED NUMERIC portion of the B-Tree as the same value. For fields that require a meaningful leading zero (such as zip code), use ORDERED CHARACTER.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Values of an ORDERED NUMERIC field that do not satisfy the definition of NUMERIC are stored in a separate section of the Ordered Index and processed in EBCDIC order. During FOR EACH VALUE and FOR EACH RECORD IN ORDER BY FIELD processing of an ORDERED NUMERIC field, these values are processed after the valid NUMERIC values unless you restrict the range of values.   &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Default order types=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
If a field is defined as ORDERED without specifying which type of ordering to create, a default order type is used. The default depends on whether the field is STRING, BINARY, or FLOAT:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;For...&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;The default order type is...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STRING&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ORDERED CHARACTER&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;BINARY or FLOAT&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;ORDERED NUMERIC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====ORDERED field definition====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ORDERED attribute has options that allow you to determine the type of ordering the Ordered Index is to have, as well as some of the characteristics of the Ordered Index tree as it expands or is rebuilt. These options are described in the discussions of order type and Ordered Index tree structure that follow.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Defining ORDERED field attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The [[DEFINE command]] is used to specify a field&#039;s attributes. The format of the DEFINE command with the ORDERED attribute options is:&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Syntax=====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt; WITH &amp;lt;b&amp;gt;ORD&amp;lt;/b&amp;gt;ERED&lt;br /&gt;
   [&amp;lt;b&amp;gt;CHAR&amp;lt;/b&amp;gt;ACTER &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; &amp;lt;b&amp;gt;NUM&amp;lt;/b&amp;gt;ERIC][&amp;lt;b&amp;gt;SPL&amp;lt;/b&amp;gt;I&amp;lt;b&amp;gt;T&amp;lt;/b&amp;gt;PCT &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s&amp;lt;/span&amp;gt;] [IMMED &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;i&amp;lt;/span&amp;gt;]&lt;br /&gt;
   [&amp;lt;b&amp;gt;LRES&amp;lt;/b&amp;gt;ERVE &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;r&amp;lt;/var&amp;gt;] [&amp;lt;b&amp;gt;NRES&amp;lt;/b&amp;gt;ERVE &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;blockquote class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default designation for a field is NON-ORDERED. Ordered Index tree parameters do not apply for a NON-ORDERED field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;CHARACTER&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;NUMERIC&amp;lt;/var&amp;gt; order types are described above.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;SPLITPCT&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;IMMED&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LRESERVE&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;NRESERVE&amp;lt;/var&amp;gt; parameters are described in [[Table D (File architecture)#Ordered Index spacing parameters|Ordered Index spacing parameters]].       &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Redefining ORDERED fields=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To change the type of ordering of an ORDERED field, use the [[REDEFINE command]] followed by the new ordering type, thereby deleting the old type. To change the spacing characteristics, specify the current parameter (LRESERVE, NRESERVE, SPLITPCT, or IMMED) with a new value. This takes effect only for fields added after the change.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Choosing between ORDERED and NUMERIC RANGE====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ORDERED attribute has several advantages over the NUMERIC RANGE attribute, and as such should be the normal choice. Specifically:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index allows for multiple occurrences of the same numeric field in a record. The NUMERIC RANGE attribute issues an error message whenever an attempt is made to store more than one occurrence of the same NUMERIC RANGE field in the same record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Cost of updating an ORDERED field is lower than that of a NUMERIC RANGE field. The NUMERIC RANGE field requires multiple attributes to be maintained to describe the characteristic of a number. The cost of an update to the Ordered Index is always proportional to the depth of the tree.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;In most cases, especially with large numbers, the Ordered Index uses less space to maintain the index information.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Ordered Index allows for more accurate range requests, with numbers representable by IBM double-word floating-point numbers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Range retrievals=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although range retrievals are usually faster for ORDERED fields than for NUMERIC RANGE fields, the size of the range interval and the density of the distribution of values over that range are the principal determining factors.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the past, NUMERIC RANGE retrievals have been faster for very large ranges with densely distributed data values. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====CHUNK attribute===== &lt;br /&gt;
However, as of Model 204 version 7.5, you can improve the efficiency of data range retrieval on ORDERED NUMERIC fields by defining the fields with the &amp;lt;var&amp;gt;[[DEFINE FIELD command#CHUNK attribute|CHUNK]]&amp;lt;/var&amp;gt; attribute.&lt;br /&gt;
 &lt;br /&gt;
The CHUNK attribute defines a subrange (&amp;quot;OI chunk&amp;quot;) of the Ordered Index data range, so the desired data can be found with fewer scans of the Ordered Index entries.&lt;br /&gt;
 &lt;br /&gt;
CHUNK fields are AUTOMATIC fields and therefore require that FILEORG X&#039;100&#039; be set for the file.&lt;br /&gt;
 &lt;br /&gt;
The CHUNK attribute is followed by a number, defining the size of the OI chunk, and then FOR &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkTargetFieldName&amp;lt;/var&amp;gt;, where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkTargetFieldName&amp;lt;/var&amp;gt; is the existing ORDERED NUMERIC field from which you want to retrieve data in OI chunks.&lt;br /&gt;
 &lt;br /&gt;
So, to illustrate:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;DEFINE FIELD YYYYMMDD WITH ORDERED NUMERIC&lt;br /&gt;
DEFINE FIELD YYYYMM   WITH ORDERED NUMERIC INVISIBLE CHUNK 100 FOR YYYYMMDD&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
A CHUNK field is automatically maintained based on updates to the target (FOR) field (here, YYYYMMDD). The stored value is the value of the target field rounded down to the CHUNK size. So, for example, if you stored a value of 20121225 into YYYYMMDD, the underlying code would automatically store the value 20121200 into YYYYMM. Similarly, if you stored 20121203 into YYYYMMDD, a 20121200 value would also be stored into YYYYMM.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
When doing a range find, Model 204 decomposes the find into range finds based on the CHUNK field and the target field. &lt;br /&gt;
So, for example, a find for values between 20121211 and 20130205 would be decomposed into a find for:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;YYYYMMDD between 20121211 and 20121299 (ignoring for the moment issues with non-integer values and demonstrating that CHUNK doesn&#039;t really know or care if the field is a date)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;OR YYYYMM between 20130100 and 20130100 (or more precisely, exactly equal to 20130100)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;OR YYYYMMDD between 20130200 and 20130205&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
This reduces the number of scanned ordered index entries by a factor of 2.&lt;br /&gt;
Results would often be much better than that. For example, it probably would not be atypical for a date range to land on month boundaries, resulting in improvements closer to a factor of 30. And, as the range got bigger and bigger, more and more of the range processing would occur on the CHUNK field, with additional improvement in processing.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Multiple CHUNK fields=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
To get even better performance, you could define multiple CHUNK fields for a target field:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;DEFINE FIELD YYYYMMDD WITH ORDERED NUMERIC&lt;br /&gt;
DEFINE FIELD YYYYMMD  WITH INVISIBLE ORDERED NUMERIC CHUNK 10    FOR YYYYMMDD&lt;br /&gt;
DEFINE FIELD YYYYMM   WITH INVISIBLE ORDERED NUMERIC CHUNK 100   FOR YYYYMMDD&lt;br /&gt;
DEFINE FIELD YYYY     WITH INVISIBLE ORDERED NUMERIC CHUNK 10000 FOR YYYYMMDD&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
The OI chunk size for a CHUNK field must be a greater-than-1 integral multiple of all smaller OI chunk sizes for the same target field. For example, specifying &amp;quot;7&amp;quot; as the first CHUNK size in the above example would be invalid because 100 is not an integral multiple of 7.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Note that you could reference the CHUNK fields directly in non-updating statements, as shown in this example:&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;fd to %recset&lt;br /&gt;
   yyyy eq %year&lt;br /&gt;
end find&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In any case, the number and size of the CHUNK fields allows you to trade off the overhead of doing updates against the efficiency of doing range finds. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Choosing between ORDERED and FRV====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ORDERED attribute is usually a better alternative to the FRV attribute. Although FRV fields with small numbers of values might perform faster in value loop processing, they lose this advantage if the found values are required to be in order, and as the number of values increase. FRV ordered retrievals require additional sorting. For retrievals in ascending or descending order, ORDERED fields are more efficient. For (presumably rare) right-adjusted character strings in order, ORDERED fields require additional sorting.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Compatibility of ORDERED with other field attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the following guidelines when specifying the ORDERED attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field cannot be both ORDERED and FRV.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field cannot be both ORDERED NUMERIC and NUMERIC RANGE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field can be both KEY and ORDERED (but serves little or no purpose).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field can be both INVISIBLE and ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A field can be both DEFERRABLE and ORDERED. If the field is DEFERRABLE, the index updates can be written out to a (see [[#DEFERRABLE and NON-DEFERRABLE attributes|DEFERRABLE and NON-DEFERRABLE attributes]] for details). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE field must be ORDERED. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hash and sort key fields and record security fields can be ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fields which are defined as KEY can be converted to ORD with no code changes required (as direct retrievals will work with either type of ORD field).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
For an architectural view of the ordered index, see [[#Table D (File architecture) Ordered Index|the Ordered Index]].&lt;br /&gt;
&lt;br /&gt;
===KEY and NON-KEY attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The KEY and NON-KEY attributes govern whether to create a hash index for a field or not. If KEY is specified, an index is created for the field. Retrieval commands will access the index for that field. If NON-KEY is specified, every record in the table is examined. The NON-KEY attribute is a default field description. This section provides information about space and performance for each of these attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====KEY attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
When storing fields that have the KEY attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes special entries in the hash index. During retrieval, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; goes directly to the appropriate index entry to find which records satisfy the selection criteria, without searching through other records in the file. This makes retrieval based on KEY fields extremely fast. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, these index entries must be updated, when User Language statements or Host Language Interface functions add, change, or delete fields. Processing might take slightly longer for KEY fields than for NON-KEY fields. In addition, the space occupied by the index entries can be considerable, especially in large files and in fields that take on many values.           &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====NON-KEY attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
No index entries are maintained in Tables C and D for NON-KEY fields. When a retrieval is performed based on the value of NON-KEY fields, the data in Table B must be searched directly. The direct search can have a significantly adverse effect on performance, if a large number of records must be searched. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
However, the cost of the direct search can be greatly reduced in some cases where both KEY and NON-KEY fields are specified in the retrieval conditions. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; reduces the number of records to be searched directly by performing the indexed selection first. Records that are definitely eliminated, based on the KEY conditions, are not searched directly. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Choosing between KEY and NON-KEY=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Keep the following guidelines in mind when deciding to designate a field as KEY or NON-KEY:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If space is not an overriding consideration, designate fields that are used frequently for retrievals of equality as KEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If a field is updated frequently and only occasionally used for retrieval, define it as NON-KEY.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If a field is used frequently for retrievals and updated frequently, the choice is less obvious. If you reserve sufficient space in Tables C and D for adding inversion entries, the field initially can be defined as NON-KEY and changed later with the &amp;lt;var&amp;gt;REDEFINE&amp;lt;/var&amp;gt; command. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FOR EACH VALUE (FRV) and NON-FRV attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV attribute is useful when creating fields used in value loop processing. If the FRV attribute is not specified when a field is defined, the NON-FRV attribute is assumed. If this attribute is set, the field is usually assigned the KEY attribute as well.  &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Table space for FRV fields====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Every value of an FRV field is automatically encoded in Table A, whether or not the value is stored in Table B (that is, INVISIBLE). In addition to more Table A space, FRV fields require slightly more Table C and Table D space than ordinary key fields. Because of these additional space requirements, the FRV attribute is most frequently defined for fields in which the number of different values does not exceed approximately 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Using the FRV attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The FRV attribute behaves in a special way when combined with the BINARY attribute. This is discussed in [[#BINARY attribute|BINARY attribute]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Fields cannot be defined with the FRV attribute in [[Field attributes#File model feature|First-Normal Form (1NF)]] files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====FRV attribute, FRV User Language statement====&lt;br /&gt;
 &lt;br /&gt;
=====Value loops=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User Language provides a special construction called a value loop that executes a set of statements once for each different value of an indicated field. The loop is initiated by the FOR EACH VALUE statement; the field must have the FRV or ORDERED attribute. The FOR EACH VALUE statement has Host Language equivalents in IFFDV and IFGETV. A value loop is illustrated in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;EACH.STATE:&lt;br /&gt;
FOR EACH VALUE OF STATE&lt;br /&gt;
    GET.RECS:&lt;br /&gt;
    FIND ALL RECORDS FOR WHICH&lt;br /&gt;
        STATE = VALUE IN EACH.STATE&lt;br /&gt;
    END FIND&lt;br /&gt;
    TOT.RECS:&lt;br /&gt;
    COUNT RECORDS IN GET.RECS&lt;br /&gt;
    PRINT.CT:&lt;br /&gt;
    PRINT VALUE IN EACH.STATE -&lt;br /&gt;
          WITH COUNT IN TOT.RECS AT COLUMN 20&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
On the first pass through the loop, a value of STATE, such as DELAWARE, is selected. The last statement prints DELAWARE and the number of records with the field-name-equals-value pair: STATE = DELAWARE. On the next pass, another value is chosen, such as IOWA, and so on until all values of the STATE field have been processed exactly once.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Using the IN ORDER option=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The IN ORDER option of the FOR EACH VALUE statement specifies that the values of an FRV KEY field be presented in an ordered sequence-ascending, descending, numerical, right adjusted. This option improves performance by avoiding Online sorts of a large number of records, because only the values are sorted instead of a large found set of records. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Value loop processing for ORDERED fields=====&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
You can also use value loop processing on fields with the ORDERED attribute. When the FOR EACH VALUE statement with the IN ORDER option is used for NON-FRV, ORDERED fields, ORDERED retrievals can be significantly faster than FRV ordered retrievals. See [[#ORDERED and NON-ORDERED attributes|ORDERED and NON-ORDERED attributes]] for a description of the ORDERED attribute.     &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Value loop processing can be made more flexible and efficient by using [[Is_Like_pattern_matching#Pattern matching|pattern matching]].&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===NUMERIC RANGE and NON-RANGE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Prior to the introduction of ORDered NUMeric fields, Model 204 permitted range retrieval (a field value numerically equal to, less than, greater than, or between certain values) with the NUMERIC RANGE attribute. This attribute indexes the component parts of a numeric value and then joins them, to provide rapid numeric range retrievals without a direct search of the records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the NUMERIC RANGE attribute is not specified when a field is defined, the NON-RANGE attribute is assumed. &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
It is recommended that, for any new fields being defined,the ORDERED NUMERIC attribute is used in preference to  NUMERIC RANGE.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The NUMERIC RANGE attribute cannot be set where the product ([[ASTRPPG parameter|ASTRPPG]] * [[ATRPG parameter|ATRPG]]) is greater than 4000 (available in &amp;lt;var&amp;gt;[[FILEORG parameter|FILEORG]]&amp;lt;/var&amp;gt; X&#039;100&#039; files).&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====NUMERIC RANGE retrieval specifications====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following retrieval specifications, with their symbolic operator equivalents in parentheses, can be used:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;fieldname IS value&lt;br /&gt;
fieldname IS EQ (=) value&lt;br /&gt;
fieldname IS LESS THAN (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS GREATER THAN (GT or &amp;gt;) value&lt;br /&gt;
fieldname IS BETWEEN (GT or &amp;gt;) value AND (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS GREATER THAN (GT or &amp;gt;) value AND LESS THAN (LT or &amp;amp;lt;) value&lt;br /&gt;
fieldname IS LESS THAN (LT or &amp;amp;lt;) value AND GREATER THAN (GT or &amp;gt;) value&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following examples show numeric retrieval specifications:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH AMOUNT IS 53.00&lt;br /&gt;
     DATE IS BETWEEN 050500 AND 050532&lt;br /&gt;
END FIND&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
These specifications retrieve records for which AMOUNT has a value of 53.00 (or 53 or 053, and so on) and DATE has a value in May 2005.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====NUMERIC RANGE retrieval fields====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The values of NUMERIC RANGE retrieval fields can be either positive or negative numbers that have as many as ten digits on either side of the decimal point (20 digits maximum). When such fields are stored, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes many entries in Tables C and D as well as some special entries in the field name (attribute) section of [[Table A (File architecture)|Table A]]. These entries are quite complex, and NUMERIC RANGE retrieval fields require both more storage space and more time to store and update than do KEY fields.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In deciding whether to define a field as NUMERIC RANGE or NON-RANGE (and NON-ORDERED), use the same choice criteria described in [[#KEY and NON-KEY attributes|KEY and NON-KEY attributes]], keeping in mind the additional overhead caused by the extra index entries for RANGE fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Interpreting nonnumeric values====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a NUMERIC RANGE field is stored with a value that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot interpret as a number, the system stores a special index entry for the record. The field name of this special entry consists of the NUMERIC RANGE retrieval field name with ++ appended. The entry has a value of NON NUMERICAL. Thus, the following User Language retrieval retrieves all records with nonnumerical values of AGE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL:&lt;br /&gt;
FIND ALL RECORDS FOR WHICH&lt;br /&gt;
     AGE++ = NON NUMERICAL&lt;br /&gt;
END FIND&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This can be useful in locating bad input data.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify as many NUMERIC RANGE retrieval fields in each record as you need. However, a particular NUMERIC RANGE retrieval field cannot be multiply occurring within any one record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot specify the NUMERIC RANGE attribute in the following circumstances:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;With any field defined as FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For any field in a 1NF file&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 a table showing invalid attribute combinations, see the &amp;lt;var&amp;gt;[[DEFINE FIELD command|DEFINE FIELD]]&amp;lt;/var&amp;gt; command. If you are defining field attributes with FILEMGMT, you will not be allowed to specify conflicting attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Data typing ==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following attributes are described individually in the next sections. They represent the way the field is physically stored. Only one of these can be assigned to any field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STRING&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BINARY&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BLOB, CLOB, MINLOBE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FLOAT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DATETIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTF-8 or UTF-16&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;VISIBLE, INVISIBLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===STRING attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
STRING is the default attribute for all fields. If your data is character or alphanumeric, such as names and addresses, specify a data type of STRING. STRING fields are also useful if you plan to store mixed data types in an image. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of a STRING field is limited to 255 bytes, because the first byte of a STRING data field is a count byte-that is, a byte that contains the length of the rest of the string. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===BINARY attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Fields whose values are numeric integers can alternatively be compressed and stored as 4-byte binary numbers with the BINARY attribute. Specifying BINARY saves Table B space if the average value of the field is from 4-9 digits long.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Acceptable BINARY values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To be compressed successfully, the value must be1-9 digits long and can contain a minus sign. It cannot contain a plus sign, a decimal point, or leading zeros. If the value cannot be compressed, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; refers to the CODED/NON-CODED field attribute (which the BINARY attribute usually overrides) to decide how to store the value.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BINARY and FRV fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The BINARY attribute overrides the FRV attribute, except for values that cannot be compressed. If the field cannot be compressed, it will be stored in Table A in either the FEW-VALUED or MANY-VALUED pages depending on the field definition. For instance, AGE has been defined with the BINARY and FRV attributes and takes on the values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;23, 04, -34578, 935., 20,&lt;br /&gt;
+8754, and TWO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statement FOR EACH VALUE OF AGE retrieves only the values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;04, 935., +8754 and TWO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If BINARY is not specified when a field is defined, the STRING attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;BINARY fields and NUMERIC VALIDATION files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a BINARY field is defined in a NUMERIC VALIDATION file model file ([[FILEMODL parameter|FILEMODL]] = X&#039;01&#039;), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides numeric data type validation. If you try to store non-numeric or other non-conforming (that is, non-compressible) data in a BINARY field in a NUMERIC VALIDATION file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cancels the request with the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2123: VALUE SPECIFIED VIOLATES BINARY DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, &amp;lt;br&amp;gt;   FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;BLOB attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;CLOB attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;MINLOBE attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
===BLOB, CLOB, and MINLOBE attributes===&lt;br /&gt;
&amp;lt;!--Caution: &amp;lt;div&amp;gt;s above--&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 MINLOBE attribute is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The BLOB and CLOB attributes describe Large Object data that can be used to store long strings in the database, for example, long XML strings. This means that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; User Language threads can exchange Large Object data with a partner process by way of the Universal Buffer and/or the MQ/204 Interface. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;With the Universal Buffer, Large Object data can be sent and received using User Language READ IMAGE and WRITE IMAGE statements, or $SOCKET READ and WRITE calls.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;With the MQ/204 Interface, Large Object data can be sent and received by MQPUT and MQGET statements, stored and retrieved from the database with User Language STORE, ADD, and assignment statements using the BUFFER reserved area name.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&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; Files created in V6R1.0 and later are not compatible with earlier versions of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;, because of Large Object support and the concomitant changes to the FPL page.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Introducing Large Object field types====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Large Object field types includes the following Character Large Object (CLOB) and Binary Large Object (BLOB) attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CLOBs are character strings. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;BLOBs are binary strings. No translation is performed when the object is sent or received.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&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; Because Large Object fields require that Table E be present in a file, you cannot simply add a Large Object field to an existing file created in a pre-6.1 version of Model 204. You would need to rebuild the existing file by downloading the data and procedures; recreate the file to establish Table E; define the Large Object fields to incorporate; and load the data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Limitations of Large Object support====&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Currently there is a limit of 2,147,483,647 bytes (or two gigabytes) of data per Large Object.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For CLOBs the translation of ASCII to EBCDIC and back is handled by the design of your application.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For BLOBs no translation is performed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The User Language INSERT statement is not supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Handling Large Object data====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The BLOB and CLOB attributes are supported as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You can create, open, and recover a file with a BLOB or CLOB attribute. The Large Object field can be multiply occurring. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The DELETE fieldname statement supports the Large Object data. This statement frees the Table B and Table E data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You can store and add a Large Object data to the file you have created from the Universal Buffer, BUFFER. Using an assignment statement you can transfer Large Object data from a field into the Universal Buffer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You can set the number of Table E pages during file creation with PARAMETER ESIZE= n.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You can view the EHIGHPG parameter to determine the highest number of Table E pages in use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You can modify the size of Table E with an INCREASE or DECREASE command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The DELETE FIELD fieldname command supports the Large Object field type, so you can delete a Large Object field name. However, the space in Table B and Table E is not automatically available for reuse. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;[[$LOBLEN|$LOBLEN]](&amp;lt;i&amp;gt;lob-field-name&amp;lt;/i&amp;gt;) function is available for your use.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Dictionary/204 and the Cross-Reference facility support Large Object field types.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;NULL Large Object data is supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Transaction back out is supported for Large Object field types.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Field-level security is supported.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====BLOB and CLOB compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
See the table in &amp;lt;var&amp;gt;[[DEFINE_FIELD_command|DEFINE FIELD]]&amp;lt;/var&amp;gt; for a list of attributes that are not allowed with BLOB or CLOB. Use of conflicting attributes produces the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;M204.0411: CONFLICTING ATTRIBUTES: ([BLOB | CLOB]) &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;attribute2&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Using the MINLOBE attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
====Using the MINLOBE (MLBE) attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use the MINLOBE attribute only with a BINARY LARGE OBJECT (BLOB) or a CHARACTER LARGE OBJECT (CLOB) field in a file with FILEORG X&#039;100&#039;. The MINLOBE attribute cannot be paired with the OCCURS attribute. You can redefine the MINLOBE attribute value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;MINLOBE &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default and smallest value for MINLOBE is 0, which means that all values of the field are stored in Table E. The maximum value of MINLOBE is 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a field has the MINLOBE attribute greater than 0:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;And the value of the field is not longer than MINLOBE, then the value is stored in Table B or Table X, instead of Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The User Language CHANGE statement is not allowed and the following error is displayed:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2869 Change refused: MINLOBE &amp;gt; 0 for File &amp;lt;i&amp;gt;filename&amp;lt;/i&amp;gt; field &amp;lt;i&amp;gt;fieldname&amp;lt;/i&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Any CHARACTER LARGE OBJECT or BINARY LARGE OBJECT field which does not use the CHANGE statement benefits from setting MINLOBE 200.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The RESERVE clause is ignored on the User Language ADD statement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Storing and updating LOBs====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All large object data (LOBs) in a FILEORG X&#039;100&#039; file are chained. There are four bytes per Table E page overhead for chained LOBs. The pages used by a chained LOB are not contiguous.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Handling LOBs in FILEORG X&#039;100&#039; files also has the following effects:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESERVE clause is ignored in a LOB field ADD statement processing, as well as the STORE RECORD statement processing of fieldname=value pairs.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consequently, the CHANGE statement does not fail because of   insufficient reserved space. If the CHANGE statement requires that a LOB field be extended, it is.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The value of the [[EHIGHPG parameter|EHIGHPG]] parameter is always one less than the high water mark of the number of pages used to hold LOBs. (Unless none were ever added, in which case it is zero, not -1).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The value of the [[EPGSUSED parameter|EPGSUSED]] parameter is always the number of pages currently being used to hold LOBs.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The [[COMPACTE command|COMPACTE]] command does not process FILEORG X&#039;100&#039; files, just as it does not process a file created in V6R1 or earlier. Thus, issuing a COMPACTE command for a FILEORG X&#039;100&#039; file produces an error message.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The [[TABLEE command|TABLEE]] command effectively does a [[VIEW command|VIEW]] ESIZE EHIGHPG EPGSUSED for a FILEORG X&#039;100&#039; file. Consequently there are no TABLEE overhead pages in a FILEORG X&#039;100&#039; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FLOAT attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any field whose values are always, or almost always, numeric might be more efficiently stored in a floating-point representation than in character form. Using FLOAT can also reduce the time spent in data type conversions for fields used frequently in User Language or Host Language Interface computations.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Very large or very small numbers, or numbers with many significant digits, occupy considerably less space in floating-point form. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Floating-point fields are fully supported by User Language, the Host Language Interface, and the File Load utility. For more information about storing values in floating-point fields, see the SOUL [[Floating point conversion, rounding, and precision rules]].&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;&lt;br /&gt;
If FLOAT is not specified when a field is defined, the STRING attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Defining floating point fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Field values are stored in floating-point by specifying the FLOAT attribute in the DEFINE FIELD command and supplying a LENGTH of 4, 8, or 16. The length supplied determines the precision of the floating-point field being defined. For example, to define a long precision field, specify:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; WITH FLOAT LEN 8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can define three types of floating point fields through the FLOAT and LENGTH attributes.:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Type of floating-point field&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Occupies...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Holds a maximum of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Model&amp;amp;nbsp;204 maintains a maximum precision of...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Short precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;4 bytes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt; 6 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Long precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;8 bytes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Extended precision&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;16 bytes &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;31 significant digits&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;15 significant digits &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Acceptable values&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The floating-point data type uses IBM hardware&#039;s floating-point representation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A value of negative zero (X&#039;800...0&#039;) cannot be stored in a preallocated FLOAT field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;FLOAT with NUMERIC VALIDATION files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you define a FLOAT field in a NUMERIC VALIDATION file model file ([[FILEMODL parameter|FILEMODL]]=X&#039;01&#039;), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides numeric data type validation. Trying to store non-conforming data in a FLOAT field in a NUMERIC VALIDATION file causes &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to cancel the request with the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2124: VALUE SPECIFIED VIOLATES FLOAT DATA TYPE VALIDATION IN RECORD &amp;lt;i&amp;gt;recno&amp;lt;/i&amp;gt;, &amp;lt;br&amp;gt;   FIELD IGNORED: &amp;lt;i&amp;gt;fieldname&amp;lt;/i&amp;gt; = &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
STRING, BINARY, NUMERIC RANGE, and INVISIBLE cannot be specified for a FLOAT field. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Storing invalid numeric data: FLOAT or ORDERED NUMERIC===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The valid range of floating point numbers is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1E-74 through 7.2370E+75&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Model 204 enforces storage rules for floating point numbers outside the valid range:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If 7.2371E75 is stored in a FLOAT field, the value is treated as an invalid floating point number and is stored as a data string &#039;7.2371E75&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;1E-75 is treated as an invalid floating point number and stored as a data string &#039;1E-75&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If an invalid value is stored for a field with the ORDERED NUMERIC attributes, the value stored in the Ordered Index is the data string. That data string is stored on the Invalid Numeric Data portion of the Ordered Index. This changes the output order of these values when the ordering is done against the Ordered Index, for example, when using the User Language IN ORDER BY or FOR EACH VALUE clauses.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===DATETIME (DT) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DATETIME attributes specifies the format of the stored data in Table B, not its function. The other date/time attributes are automatically updated fields generated at the time of record or field group creation or update. A non-automatic field can have a DATETIME format, but all the automatic date/time fields are stored in DATETIME format. The DATETIME attribute requires at least eight significant digits. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once you define a DATETIME value for a field, you cannot redefine the DATETIME value.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===UTF-8 and UTF-16 attributes===&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;&lt;br /&gt;
The &amp;lt;var&amp;gt;UTF-8&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;UTF-16&amp;lt;/var&amp;gt; attributes are available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;UTF-8&amp;lt;/var&amp;gt; (or &amp;lt;var&amp;gt;UTF8&amp;lt;/var&amp;gt;) attribute indicates that data is stored in [http://en.wikipedia.org/wiki/UTF-8 UTF-8] format and is treated as [[Unicode|unicode]] data inside SOUL programs. You can define a &amp;lt;var&amp;gt;UTF-8&amp;lt;/var&amp;gt; field as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD UTFDATA WITH [UTF-8 &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; UTF8]&lt;br /&gt;
 &lt;br /&gt;
DEFINE FIELD UTFBLOB WITH BLOB [UTF-8 &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; UTF8]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;UTF-8&amp;lt;/var&amp;gt; attribute is a constraint that rejects UTF-8 encoding of Unicode characters outside the Basic Multilingual Plane (BMP).&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
&amp;lt;var&amp;gt;UTF-8&amp;lt;/var&amp;gt; is the only field constraint that is valid for &amp;lt;var&amp;gt;CLOB&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;BLOB&amp;lt;/var&amp;gt; fields.&lt;br /&gt;
&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;UTF-16&amp;lt;/var&amp;gt; (or &amp;lt;var&amp;gt;UTF16&amp;lt;/var&amp;gt;) attribute indicates that data is stored in [http://en.wikipedia.org/wiki/UTF-16 UTF-16] format and is treated as [[Unicode|unicode]] data inside SOUL programs. You can define a &amp;lt;var&amp;gt;UTF-16&amp;lt;/var&amp;gt; field as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD UTFDATA WITH [UTF-16 &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; UTF16]&lt;br /&gt;
 &lt;br /&gt;
DEFINE FIELD UTFBLOB WITH BLOB [UTF-16 &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; UTF16]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage notes====&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Since UTF-8 or UTF-16 fields behave like unicode variables in SOUL requests, printing fields with unicode characters that cannot be converted to displayable EBCDIC results in those characters being [http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_reference_overview character-entity encoded], just as they are encoded when printing unicode variables. This is also true when printing is done via a &amp;lt;var&amp;gt;[[Basic SOUL statements and commands#PRINT_ALL_INFORMATION_.28or_PAI.29_statement|PAI]]&amp;lt;/var&amp;gt; statement. For example, a UTF-8 field containing the unicode value of &amp;quot;I like apple &amp;amp;pi;&amp;quot; would be printed as &amp;quot;I like apple &amp;amp;amp;#x03C0;&amp;quot;. The ampersand symbol (&amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt;) is always encoded as &amp;amp;amp;amp; when printed.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;Just as with unicode variables, assigning an EBCDIC value to a unicode field results in the EBCDIC value being converted to unicode and then to UTF-8 or UTF-16 for storage. Simlarly, assigning a UTF-8 or UTF16 field to an EBCDIC variable results in the UTF-8 or UTF-16 value being converted to unicode and then translated to EBCDIC. In either EBCDIC to unicode or unicode to EBCDIC translation, errors result in request cancellation.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;Unless the preponderance of data stored in UTF-8 or UTF-16 fields has unicode values greater than U+07FF (most likely if most of the data contains Asian language characters), UTF-8 is a better choice for storing unicode data, since UTF-16 requires two bytes for every unicode character while UTF-8 only requires one byte for many common characters and only two bytes for unicode characters up to U+07FF.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;UTF-8 and UTF-16 fields can be LOB fields or they can be STRING fields (stored in table B).&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;If a UTF-8 or UTF-16 field is defined as an OCCURS field, the length indicates the length in bytes, not the length in characters. Since UTF-8 encoding can use anywhere from one to three bytes to represent a single unicode character in the [http://en.wikipedia.org/wiki/Unicode_plane#Basic_Multilingual_Plane BMP], the only unicode characters supported by SOUL, it can be tricky using UTF-8 fields as OCCURS fields since setting the defined length requires an educated guess about the types of unicode characters that will be store in the field or (probably) oversizing a UTF-8 field to three bytes per character. In the latter case, it would make much more sense to define such a field as UTF-16 as that requires exactly two bytes for each character.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage notes on mapping====&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Characters outside the BMP are extremely unlikely in business applications.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;An EBCDIC blank (X&#039;40&#039;) is a valid UTF-8 character.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All numerics (X&#039;F0&#039; through X&#039;F9&#039;) are UTF-8 characters for mapping characters outside the BMP. Lowercase characters generally fall into the continuation byte range and uppercase characters fall into the sequence start range. Because of this, a short, mixed case sequence, such as Tom or Bo, might slip by UFT-8 validation. However, most attempts to store EBCDIC tests into a UFT-8 field will fail, and therefore catch application errors.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Creating UTF-8 data====&lt;br /&gt;
You can create &amp;lt;var&amp;gt;UTF-8&amp;lt;/var&amp;gt; data using the SOUL function &amp;lt;var&amp;gt;[[$Ascii]]&amp;lt;/var&amp;gt;, because 7-bit ASCII is a subset of UTF-8. For example:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD UTFFIELD=$ascii(?Hello?)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===VISIBLE and INVISIBLE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In general, you want to be able to retrieve, and then display or print fields, or use the field values in a report. These are fields that you want defined as VISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If, however, you have a field that is used only to retrieve records, and space is a consideration, you might want to define the field as INVISIBLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p clsas=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note&amp;lt;/b&amp;gt;&lt;br /&gt;
If the INVISIBLE attribute is not specified when the field is defined, the VISIBLE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the VISIBLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once an application retrieves a record with a User Language FIND statement or a Host Language IFFIND call, it generally processes one or more fields in User Language PRINT, NOTE, or SORT statements, arithmetic expressions, or Host Language IFGET calls. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CHECK.SALARY:&lt;br /&gt;
IF SALARY GT 1000*AGE&lt;br /&gt;
   THEN PRINT NAME&lt;br /&gt;
END IF&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A field referred to by the PRINT statement must have the VISIBLE attribute in its field description. This means that the field-name-equals-value pair is actually stored in the logical record in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the INVISIBLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A field that has the INVISIBLE attribute, on the other hand, takes up no storage space in Table B and cannot be printed, noted, or sorted. These fields can be added, deleted, or changed in the logical record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;In a library catalog file, for example, each record can have an AUTHOR field that contains the author&#039;s full name. In addition, there can be a LAST NAME field that contains only the author&#039;s last name. This creates a convenient index to the catalog and relieves the user of the burden of knowing the entire name when making retrieval requests. Because the author&#039;s last name already is part of the (VISIBLE) AUTHOR field, some space can be saved in Table B by selecting the INVISIBLE attribute for LAST NAME.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Reorganizing INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because INVISIBLE fields are not stored in Table B, they require special care if the file is ever reorganized. When designing a file, be sure to take reorganization requirements for these fields into consideration. See the &amp;lt;i&amp;gt;File reorganization and table compaction&amp;lt;/i&amp;gt; page, [[File reorganization and table compaction#Reorganizing INVISIBLE fields|Reorganizing INVISIBLE fields]] section for more information.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Maintaining INVISIBLE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
INVISIBLE fields must also have the KEY, NUMERIC RANGE, or ORDERED attribute, and they are normally used only to retrieve records. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The User Language FILE RECORDS statement and the Host Language Interface IFFILE function can be used to rapidly add an INVISIBLE KEY field name = value pair to an entire set of records. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ALL.RECS: FIND ALL RECORDS FOR WHICH&lt;br /&gt;
            NAME = SMITH OR SMYTHE OR SMYTH&lt;br /&gt;
          END FIND&lt;br /&gt;
FILE: FILE RECORDS IN ALL.RECS UNDER HOMONYM = SMYTH&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; makes entries in Tables C and D to allow retrievals with the specification HOMONYM = SMYTH but does not change Table B. For further information about adding, changing, or deleting INVISIBLE fields, see the SOUL description of the &amp;lt;var&amp;gt;[[Field attributes#INVISIBLE attribute|INVISIBLE]]&amp;lt;/var&amp;gt; attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Table B considerations&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The values of VISIBLE fields can be stored in the logical record in Table B in one of four formats depending upon the selection of STRING/BINARY, CODED/NON-CODED, or FLOAT field attributes. The choice affects space requirements and, except for a slight increase in the time required for updates and some types of retrievals (see [[#CODED and NON-CODED attributes|CODED and NON-CODED attributes]]), is transparent to the user. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The values of fields that have the INVISIBLE attribute are not stored in Table B, and physical storage attributes cannot be specified in their descriptions. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using INVISIBLE fields in 1NF files&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The First-Normal form relational model cannot be enforced for INVISIBLE fields. However, INVISIBLE fields are useful within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; for list processing and to support SQL multicolumn keys (see the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SQL Server User&#039;s Guide for more information). Therefore, the INVISIBLE field attribute is allowed, but INVISIBLE fields are not mapped to SQL-accessible columns, and there are other limitations with SQL DML operations against INVISIBLE fields, as described in the SQL Server User&#039;s Guide. The following rules and restrictions apply to INVISIBLE fields in 1NF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because the INVISIBLE and AT-MOST-ONE attribute are incompatible, INVISIBLE fields must be defined as REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;You cannot REDEFINE a field as INVISIBLE within a 1NF file; the INVISIBLE and REPEATABLE attributes can be specified only with a DEFINE command. In the case of a record security key field, use the INITIALIZE command to specify the field as INVISIBLE and REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE fields in 1NF files must also be ORDERED or KEY (NUMERIC RANGE is not legal in a 1NF file and results in an error message). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The INVISIBLE attribute cannot be specified for a field defined with the FLOAT or AT-MOST-ONE attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data content==&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
In addition to the data type (above), there are additional attributes which further control how the data is stored and manipulated:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CODED, NON-CODED &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;OCCURS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;LENGTH&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;PAD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FEW-VALUED, MANY-VALUED &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE IN PLACE, UPDATE AT END&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DEFAULT-VALUE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STORE-DEFAULT, STORE-NULL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AT-MOST-ONE, REPEATABLE and EXACTLY-ONE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DEFERRABLE/NON-DEFERRABLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===CODED and NON-CODED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODED and NON-CODED attributes let you choose between saving disk space (with CODED) or speeding up update and retrieval time (with NON-CODED). This section discusses how these attributes work.&amp;lt;/p&amp;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;&lt;br /&gt;
If the CODED attribute is not specified when a field is defined, the NON-CODED attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;NON-CODED attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a field is designated NON-CODED without an OCCURS clause (see the following discussion), its value is stored in Table B as a simple character string that has an additional byte to indicate its length. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
NON-CODED is the best choice for any field whose values have an average length of 1-3 bytes whether or not they are compressible numbers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;CODED attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Choose the CODED option to save Table B space where the values of the field are not suitable for BINARY compression and where their average length is four or more characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a value that has the CODED attribute is defined, the character string is stored in Table A-the internal file dictionary-and a 4-byte value code pointing to that character string is stored in the logical record in Table B. Space is saved when there are several records that contain the same value. The string is stored only once in Table A, and only the 4-byte code is stored in each of the several records in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing CODED vs. NON-CODED&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The coding and decoding of these value codes takes time, which can slow down updates and retrievals. If speed is important and if disk space is relatively plentiful, do not choose the CODED attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If disk space is somewhat tight, choose the CODED attribute for fields where the values are long and where there are a small number of values relative to the number of records in the file. A STATE field is a prime example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A more precise rule governing the choice of the CODED attribute is difficult to arrive at since first it must be determined (based on the number and length of the field values, and on the number of records) if any disk space is actually saved by the CODED attribute. Then, any space saved must be weighed against the extra time taken by CODED retrievals. And the relative importance of disk space and time are likely to vary with the application as well as with the installation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The formulas in [[File size calculation in detail]] show more explicitly the effects of the CODED field attribute on Table A and B size.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Field value encoding is entirely transparent to the user. Data is returned exactly as it was entered. Codes are system-generated, internal codes that have no meaning to a user.  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Obviously, these were formerly &amp;lt;h3&amp;gt;s; the first has refs within this page; who knows about refs from other pages? --&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;Preallocated fields&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div id=&amp;quot;OCCURS attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Preallocated fields (OCCURS attribute)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any VISIBLE field can be a preallocated field. However, a VISIBLE field that appears a fixed number of times in most of the records in a file, with fairly uniform lengths for the values, is most suited for preallocation in Table B. Preallocated fields, if selected appropriately, require less Table B space than other fields and can be updated and retrieved slightly faster.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Preallocation means that space is reserved in each new record added to a file. As occurrences of preallocated fields are stored in a record, they are placed in the reserved space. Space is used even for occurrences that have not been stored, whereas non-preallocated fields use no space for missing occurrences. Preallocation also imposes restrictions on the number and length of values that can be stored in a record. A field is preallocated if its description includes an OCCURS clause. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
[[File size calculation in detail]] provides specific rules for the amount of space used by preallocated and non-preallocated fields. Use these rules to determine whether or not to preallocate a particular field.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using an OCCURS clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A field is preallocated if its description includes an OCCURS clause. The OCCURS clause indicates the number of occurrences of the field that are preallocated or reserved in each Table B record. From 1 to 255 occurrences can be specified. Any number of values, up to the specified limit, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;, can be stored in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Only as many occurrences as have been stored can be retrieved. Space allocated for unstored values is wasted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If OCCURS is not included in a field description, the field still can occur more than once in a record. Space for the occurrences is not preallocated. There is no limit to the number of values that can be stored for a non-preallocated field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Restrictions for preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The OCCURS option can be specified only for fields that can be preallocated with a fixed length in Table B. This includes only fields that are defined as CODED, BINARY, or LENGTH &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; (see [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]). If a field is defined as BINARY but does not contain an OCCURS clause, values that cannot be compressed to a binary representation still can be stored in the field. If a field is defined as both BINARY and OCCURS, only compressible values can be stored in it. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not allow incompressible values to be stored in such fields. To avoid such compression problems, include CODED with BINARY and OCCURS in the field description. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Displaying the set of preallocated fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;[[DISPLAY RECORD command|DISPLAY RECORD]]&amp;lt;/var&amp;gt; command will show all of the preallocated fields in a file. This information is stored on a page in [[Table D (File architecture)|Table D]] where it is used to create the preallocated field space at the beginning of a record when it is initially stored. &amp;lt;/p&amp;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;&lt;br /&gt;
Because &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot distinguish values padded with X&#039;00&#039; from zero-length values explicitly stored in the file, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not allow zero-length values to be explicitly stored in preallocated fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
OCCURS cannot be specified on a field group field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LENGTH and PAD clauses===&lt;br /&gt;
&amp;lt;b&amp;gt;Using the LENGTH clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the LENGTH clause to specify the length of FLOAT fields, as well as NON-CODED preallocated (OCCURS) string fields. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;LENGTH must be specified for NON-CODED preallocated string fields:&amp;lt;/b&amp;gt; the LENGTH must be included in the description of a NON-CODED preallocated string field to set the maximum length of the field. The length must be in the range 1 through 255. The specified length is preallocated for the number of occurrence specified by the OCCURS clause. &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;LENGTH with FLOAT fields:&amp;lt;/b&amp;gt; LENGTH is required with FLOAT to indicate the precision of the floating-point field being defined. The LENGTH options in this instance are 4, 8, or 16. (See [[#FLOAT attribute|FLOAT attribute]].)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Specifying the LENGTH clause:&amp;lt;/b&amp;gt; The LENGTH clause limits the length of values that can be stored in the field. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not store values that are longer than the specified length. The LENGTH clause does not impose any minimum length. Values that are shorter than the specified length are padded with the PAD character to the maximum length as they are stored in Table B and are returned to their original length as they are retrieved. See the description of padding in [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Field occurrences that have been preallocated but not stored contain zero-length values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Using the PAD clause&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can include a PAD clause in a field description to select the character that is used to pad field values that are shorter than the length specified in the LENGTH clause (see [[#LENGTH and PAD clauses|LENGTH and PAD clauses]]) for the field. If no PAD character is specified in a field description, the default character, X&#039;00&#039;, is used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Padding characters are invisible to the user and are not included in a retrieved value. Make sure that the padding character does not appear as part of a field value. If it does, incorrect results can occur.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===FEW-VALUED and MANY-VALUED attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a field that has the CODED or FRV attribute is expected to take on fewer than about 50 different values, choose the FEW-VALUED attribute. Otherwise, define the field as MANY-VALUED. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This option determines whether the value string is stored in the FEW-VALUED or MANY-VALUED section of Table A, and is invalid for fields that are neither CODED nor FRV. Keep the number of values stored in the FEW-VALUED section small to ensure that this section is kept in core during retrieval and update operations. This practice reduces the number of disk accesses and increases retrieval speed. &amp;lt;/p&amp;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;&lt;br /&gt;
If the FEW-VALUED attribute is not specified when a field is defined, the MANY-VALUED attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===UPDATE IN PLACE (UP) and UPDATE AT END (UE) attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides the following field attributes that control the way that the value of a field occurrence is changed in Table B:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
If this attribute is specified...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Then a change in the value of a field&lt;br /&gt;
occurrence...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE IN PLACE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Does not change its position relative to other occurrences of the same field in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This attribute is the default.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE AT END&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Is accomplished by deleting the existing occurrence and adding a new one following the others.     &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Choosing an update option&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Specify either of these options as part of a field description. The UPDATE AT END approach can be useful in certain data aging applications: for example, in applications in which the first occurrence of a field represents the oldest update to the file, and the last occurrence is the most recent update. UPDATE IN PLACE generally is more efficient.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The choice of update option determines the position of a field occurrence within a record only in relation to other occurrences of the same field. The ordering of different fields within a record is determined by a variety of factors, of which the update method is only one. The order of fields within a record normally is not under the control of the file manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
SOUL update statements other than &amp;lt;var&amp;gt;CHANGE&amp;lt;/var&amp;gt; are not affected by the choice of an update option. The &amp;lt;var&amp;gt;ADD&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;STORE&amp;lt;/var&amp;gt; statements always cause values to be added as the last occurrences in a record. The &amp;lt;var&amp;gt;DELETE&amp;lt;/var&amp;gt; statement always removes the deleted value while maintaining the relative ordering of the remaining occurrences. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The values of fields that have the &amp;lt;var&amp;gt;INVISIBLE&amp;lt;/var&amp;gt; attribute are not stored in Table B, and &amp;lt;var&amp;gt;UPDATE IN PLACE&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;UPDATE AT END&amp;lt;/var&amp;gt; cannot be specified in their descriptions. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFAULT-VALUE (DV) attribute===&lt;br /&gt;
&amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; specifies the value of the field if the value was not explicitly added in the &amp;lt;var&amp;gt;STORE RECORD&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;ADD FIELDGROUP&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;INSERT FIELDGROUP&amp;lt;/var&amp;gt; initial data block. &lt;br /&gt;
&lt;br /&gt;
A field defined with a &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; (&amp;lt;var&amp;gt;DV&amp;lt;/var&amp;gt;) attribute value: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Must also be defined with the &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; or the &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt; attribute. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must be contained in a file that has the &amp;lt;var&amp;gt;[[FILEORG parameter|FILEORG]]&amp;lt;/var&amp;gt; parameter X&#039;100&#039; bit set. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; attribute is available as of Model&amp;amp;nbsp;204 version 7.5. For more information about &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; fields that are members of a field group, see [[Processing multiply occurring fields and field groups#Handling references to missing occurrences|Handling references to missing occurrences]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value of the &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; attribute determines whether the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; is physically stored on the record or if it is just used as the default value when the field is missing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;thJustBold&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;STORE-DEFAULT value&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect on record storage&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;ALL&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Always store the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; on the record.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;NONE&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Never store the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; on the record.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;LITERAL&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Store the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; if it was literally entered on the store statement (not entered as a variable).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;STORE-NULL&amp;lt;/var&amp;gt; has the same options as &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt;, but they are applied to storing nulls:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table class=&amp;quot;thJustBold&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;STORE-NULL value&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Effect on null storage&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;ALL&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Always store a null value on the record.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;NONE&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Never store a null value on the record.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;LITERAL&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Store the null value if it was literally entered on the Store statement (not entered as a variable).&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&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; Neither &amp;lt;var&amp;gt;STORE-NULL NONE&amp;lt;/var&amp;gt; nor &amp;lt;var&amp;gt;STORE-NULL LIT&amp;lt;/var&amp;gt; is allowed with &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;P&amp;gt;The &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; attribute allows values as long as 31 bytes. An attempt to use more results in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2851: DEFAULT-VALUE VALUE&lt;br /&gt;
&#039;1234567890123456789012345678901234567890&#039; TOO BIG, MUST BE &amp;amp;lt;32 BYTES&lt;br /&gt;
&amp;lt;/p&amp;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 minimum length of a &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; value is 1 byte. A null string value is not allowed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value of &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; is not constrained by attributes such as &amp;lt;var&amp;gt;LEQ&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LLE&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;LGE&amp;lt;/var&amp;gt;. &lt;br /&gt;
For example, the entire default value is returned for a field that has been added, even if it exceeds the &amp;lt;var&amp;gt;LEQ&amp;lt;/var&amp;gt; setting.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STORE-DEFAULT (SD) and STORE-NULL (SN) attributes===&lt;br /&gt;
The &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;STORE-NULL&amp;lt;/var&amp;gt; attributes specify whether to physically store the default value and the null value, respectively, for the field in each record. These attributes are available as of Model 204 version 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can redefine the &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; and/or &amp;lt;var&amp;gt;STORE-NULL&amp;lt;/var&amp;gt; attribute values.&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; A field with the &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; attribute must also have the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;STORE-NULL&amp;lt;/var&amp;gt; attributes offer these options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;LITERAL&amp;lt;/var&amp;gt; (the default)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;NONE&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;ALL&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====STORE-DEFAULT example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example shows the effect of &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; on fields defined with the different &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; types (&amp;lt;var&amp;gt;ALL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;NONE&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;LITERAL&amp;lt;/var&amp;gt;). &lt;br /&gt;
Field &amp;lt;code&amp;gt;NAME_SD_NONE&amp;lt;/code&amp;gt; is defined with the &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; option &amp;lt;var&amp;gt;NONE&amp;lt;/var&amp;gt;, field &amp;lt;code&amp;gt;NAME_SD_LIT&amp;lt;/code&amp;gt; with the option &amp;lt;var&amp;gt;LITERAL&amp;lt;/var&amp;gt;, and field &amp;lt;code&amp;gt;NAME_SD_ALL&amp;lt;/code&amp;gt; with the option &amp;lt;var&amp;gt;ALL&amp;lt;/var&amp;gt;. The &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; for all of the fields is &amp;lt;code&amp;gt;NONAME&amp;lt;/code&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this example, the fields belong to a field group, but the &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; (and &amp;lt;var&amp;gt;STORE-NULL&amp;lt;/var&amp;gt;) attribute can also be assigned to a field that is not part of a field group. The only requirement is that the field cannot be defined as &amp;lt;var&amp;gt;REPEATABLE&amp;lt;/var&amp;gt;; that is, it must be &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP X&lt;br /&gt;
  DEFINE FIELD NAME_SD_NONE   WITH FIELDGROUP X AND ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT NONE DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
 &lt;br /&gt;
  DEFINE FIELD NAME_SD_LIT    WITH FIELDGROUP X AND ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT LITERAL DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
 &lt;br /&gt;
  DEFINE FIELD NAME_SD_ALL    WITH FIELDGROUP X AND ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-DEFAULT ALL     DEFAULT-VALUE &#039;NONAME&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are basically two ways to store a field in a record: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using a literal:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STORE RECORD&lt;br /&gt;
   FIELD.A = &#039;ABC&#039;&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Using a variable:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = &#039;ABC&#039;&lt;br /&gt;
STORE RECORD&lt;br /&gt;
   FIELD.A = %X&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Additionally, a field might simply be missing (in the following example, the record has a &amp;lt;code&amp;gt;FIELD.B&amp;lt;/code&amp;gt;, but &amp;lt;code&amp;gt;FIELD.A&amp;lt;/code&amp;gt; is missing):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;STORE RECORD&lt;br /&gt;
   FIELD.B = &#039;XXX&#039;&lt;br /&gt;
END STORE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt; options determine how the field will be physically stored if the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; is stored in the field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This example shows what is physically stored in the record when the &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; is stored for each of the fields defined above for &amp;lt;code&amp;gt;FIELDGROUP X&amp;lt;/code&amp;gt;. The &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; defined for each is &amp;lt;code&amp;gt;NONAME&amp;lt;/code&amp;gt;. First, the actual &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; of &amp;lt;code&amp;gt;NONAME&amp;lt;/code&amp;gt; is added by using a variable, then by using the literal &amp;lt;code&amp;gt;&#039;NONAME&#039;&amp;lt;/code&amp;gt;. Then a field group occurrence is added where the field is missing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD.X: SUBROUTINE&lt;br /&gt;
   IN FILEX  FOR RECORD NUMBER %CURREC&lt;br /&gt;
      * add first field group occurrence using the variable %NAME:&lt;br /&gt;
      %NAME=&#039;NONAME&#039;&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SD_NONE = %NAME&lt;br /&gt;
          NAME_SD_LIT  = %NAME&lt;br /&gt;
          NAME_SD_ALL  = %NAME&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add second field group occurrence using the literal &#039;NONAME&#039;:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          NAME_SD_NONE = &#039;NONAME&#039;&lt;br /&gt;
          NAME_SD_LIT  = &#039;NONAME&#039;&lt;br /&gt;
          NAME_SD_ALL  = &#039;NONAME&#039;&lt;br /&gt;
      END ADD&lt;br /&gt;
      * add third occurrence of the field group with all values missing:&lt;br /&gt;
      ADD FIELDGROUP X&lt;br /&gt;
          * none of these fields added to this occurrence&lt;br /&gt;
      END ADD&lt;br /&gt;
   END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A subsequent &amp;lt;var&amp;gt;PAI&amp;lt;/var&amp;gt; of the field group shows what is physically stored on the record: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;The field defined with... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;is...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT NONE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Never stored on the record. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STORE-DEFAULT ALL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Always stored on the record. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;STORE-DEFAULT LITERAL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Not stored in the first occurrence, because a %variable was used. It was stored in the second occurrence, because the field was added using a literal string.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;PAI&amp;lt;/var&amp;gt; output: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;\X = 1&lt;br /&gt;
 NAME_SD_ALL = NONAME&lt;br /&gt;
/X = 1&lt;br /&gt;
\X = 2&lt;br /&gt;
 NAME_SD_LIT = NONAME&lt;br /&gt;
 NAME_SD_ALL = NONAME&lt;br /&gt;
/X = 2&lt;br /&gt;
\X = 3&lt;br /&gt;
/X = 3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;blockquote class=&amp;quot;note&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; &lt;br /&gt;
When the record above is printed (using the following):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FR&lt;br /&gt;
   PRINT &#039;# NAME_SD_NONE:  NAME_SD_LIT:  NAME_SD_ALL:&#039;&lt;br /&gt;
FEO:&lt;br /&gt;
   FEO FIELDGROUP X&lt;br /&gt;
      PRINT OCCURRENCE IN FEO AND NAME_SD_NONE AND -&lt;br /&gt;
        NAME_SD_LIT AT 16 AND NAME_SD_ALL AT 30&lt;br /&gt;
   END FOR&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; is printed whether the field is physically stored on the record or not. &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;# NAME_SD_NONE:  NAME_SD_LIT:  NAME_SD_ALL:&lt;br /&gt;
1 NONAME         NONAME        NONAME&lt;br /&gt;
2 NONAME         NONAME        NONAME&lt;br /&gt;
3 NONAME         NONAME        NONAME&lt;br /&gt;
&amp;lt;/p&amp;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 same behavior occurs whether the field is &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt;, as in this example, or &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt;. However, within fieldgroup context, a &amp;lt;var&amp;gt;PAI&amp;lt;/var&amp;gt; of an &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; field always shows a value. The actual physical storage on the record is the same for both attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====STORE-NULL example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The options on the &amp;lt;var&amp;gt;STORE-NULL&amp;lt;/var&amp;gt; attribute react similarly to those of &amp;lt;var&amp;gt;STORE-DEFAULT&amp;lt;/var&amp;gt;. When the fields are defined as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP X&lt;br /&gt;
  DEFINE FIELD NAME_SN_NONE   WITH FIELDGROUP X AND ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL NONE&lt;br /&gt;
  DEFINE FIELD NAME_SN_LIT    WITH FIELDGROUP X AND ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL LITERAL&lt;br /&gt;
  DEFINE FIELD NAME_SN_ALL    WITH FIELDGROUP X AND ORD AT-MOST-ONE       -&lt;br /&gt;
      STORE-NULL ALL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
And the code used to store the field groups is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILEX  [[Record loops#FOR RECORD NUMBER processing|FRN]] %CURREC&lt;br /&gt;
   * add first occurrence using the variable %NAME:&lt;br /&gt;
   %NAME=&#039;&#039;&lt;br /&gt;
   ADD FIELDGROUP X&lt;br /&gt;
       NAME_SN_NONE = %NAME&lt;br /&gt;
       NAME_SN_LIT  = %NAME&lt;br /&gt;
       NAME_SN_ALL  = %NAME&lt;br /&gt;
   END ADD&lt;br /&gt;
   * add second occurrence using the literal &amp;amp;apos;&#039;:&lt;br /&gt;
   ADD FIELDGROUP X&lt;br /&gt;
       NAME_SN_NONE = &amp;amp;apos;&#039;&lt;br /&gt;
       NAME_SN_LIT  = &amp;amp;apos;&#039;&lt;br /&gt;
       NAME_SN_ALL  = &amp;amp;apos;&#039;&lt;br /&gt;
   END ADD&lt;br /&gt;
   * add third occurrence with missing values:&lt;br /&gt;
   ADD FIELDGROUP X&lt;br /&gt;
   END ADD&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The resulting &amp;lt;var&amp;gt;PAI&amp;lt;/var&amp;gt; is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;\X = 1&lt;br /&gt;
 NAME_SN_ALL =&lt;br /&gt;
/X = 1&lt;br /&gt;
\X = 2&lt;br /&gt;
 NAME_SN_LIT =&lt;br /&gt;
 NAME_SN_ALL =&lt;br /&gt;
/X = 2&lt;br /&gt;
\X = 3&lt;br /&gt;
/X = 3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
And this request: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
FR&lt;br /&gt;
   PRINT &#039;# NAME_SN_NONE:  NAME_SN_LIT:  NAME_SN_ALL:&#039;&lt;br /&gt;
FEO:&lt;br /&gt;
      FEO FIELDGROUP X&lt;br /&gt;
         PRINT OCCURRENCE IN FEO AND              -&lt;br /&gt;
               NAME_SN_NONE AND NAME_SN_LIT AT 18 -&lt;br /&gt;
               AND NAME_SN_ALL AT 32&lt;br /&gt;
      END FOR&lt;br /&gt;
   END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Results in nulls displayed for each field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;# NAME_SN_NONE:  NAME_SN_LIT:  NAME_SN_ALL:&lt;br /&gt;
1&lt;br /&gt;
2&lt;br /&gt;
3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AT-MOST-ONE, REPEATABLE, and EXACTLY-ONE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use the AT-MOST-ONE, REPEATABLE, and EXACTLY-ONE attributes, which are mutually exclusive, to define an individual field or a field that is part of a field group definition. &amp;lt;/p&amp;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 EXACTLY-ONE attribute is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Using the AT-MOST-ONE attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The AT-MOST-ONE attribute allows you to ensure that there is only one occurrence of a field in any record, without preallocating space for the field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In addition, the AT-MOST-ONE attribute is required for fields in First-Normal Form (1NF) files. AT-MOST-ONE and REPEATABLE fields in 1NF files are discussed in this section.&amp;lt;/p&amp;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;&lt;br /&gt;
In non-1NF files, if the AT-MOST-ONE attribute is not specified when a field is defined, the REPEATABLE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a field is defined with the AT-MOST-ONE attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; prevents multiple occurrences of that field in any given record. The AT-MOST-ONE attribute is useful if, for example, you know that there will be one variable-length field per record, or if you have a field that is often left blank but does not have more than one value per record (such as SPOUSE NAME). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Unlike fields with the OCCURS attribute, AT-MOST-ONE fields are not specifically preallocated. The AT-MOST-ONE attribute lets you store these kinds of records without wasting the space required by OCCURS.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Using the REPEATABLE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a field is not defined as AT-MOST-ONE, then it is REPEATABLE. Fields with the REPEATABLE attribute can accept multiple occurrences of the field in the record. Unlike the OCCURS attribute, REPEATABLE does not preallocate fields, nor does REPEATABLE let you specify the number of occurrences of the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Using the EXACTLY-ONE (EXONE) attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As the name suggests an EXACTLY-ONE attribute in a field definition means that the field always has exactly one occurrence in its record or field group context after the initial data block for the record or field group (STORE RECORD, ADD FIELDGROUP, or INSERT FIELDGROUP). If no explicit value is stored for the field, its value has either the DEFAULT-VALUE for the field or the null string (&amp;amp;apos;&amp;amp;apos;), if no DEFAULT-VALUE was specified for the field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot add, insert, or delete an EXACTLY-ONE field, although you can change an EXACTLY-ONE field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The EXACTLY-ONE attribute that also has the DEFAULT-VALUE attribute will conflict with the STORE-NULL NONE attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The EXACTLY-ONE attribute is also not allowed with the STORE-NULL LITERAL attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====EXACTLY-ONE fields with a field group====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; attribute for a field within a field group means that the field can occur only once inside a single field group occurrence. However, since field groups can occur multiple times in a field group record, an &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; field inside a field group can occur multiple times inside a field group record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For more information about &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; fields in a field group, see [[Processing multiply occurring fields and field groups#Updating fields in a field group|Updating fields in a field group]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Defaults for AT-MOST-ONE, REPEATABLE and EXACTLY- ONE fields====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
REPEATABLE is the default except for 1NF files, where AT-MOST-ONE is required on all fields, except INVISIBLE. See [[#VISIBLE and INVISIBLE attributes|VISIBLE and INVISIBLE attributes]] for information. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The AT-MOST-ONE attribute is required on all fields in a 1NF file because multiply occurring fields violate relational First-Normal Form. The one exception to this rule is for INVISIBLE/REPEATABLE fields in 1NF files. See [[#AT-MOST-ONE in First Normal Form .281NF.29 files|AT-MOST-ONE in First Normal Form files]] for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The EXACTLY-ONE attribute is the default frequency of occurrence for a field defined within a field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Enforcing AT-MOST-ONE constraints====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that AT-MOST-ONE field constraints are not violated for the following User Language requests and the Host Language and FLOD counterparts: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ADD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INSERT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;STORE RECORD&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Before the indexes are updated and a new field is added or inserted into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record, all existing fields in the record are checked to ensure that the new field does not create a second occurrence: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a new field violates the AT-MOST-ONE rules, and there is no ON FCC unit, the request is canceled with the following error message:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; validates a field if you REDEFINE it to be AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If a violation occurs and there is an ON FCC unit, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; processes the ON unit. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the Host Language Interface, the 202 return code is passed back to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;; in FLOD, the file is marked logically inconsistent. However, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; does not cancel the request in either case. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====AT-MOST-ONE and transaction back out files====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Transaction back out must be active for files when defining AT-MOST-ONE fields. If you try to define an AT-MOST-ONE field in a non-TBO file, the DEFINE fails and you receive an error message. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once the field is defined, you can turn Transaction back out off in non-1NF files. However, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support strongly recommends that you keep Transaction back out set in files containing fields that can cause constraint conflicts (currently AT-MOST-ONE and UNIQUE). If you turn Transaction back out off in a file with an AT-MOST-ONE or UNIQUE field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sends you a warning message and a &amp;quot;Do You Really Want To?&amp;quot; prompt.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Using FLOD or FILELOAD with AT-MOST-ONE fields====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use FLOD or FILELOAD to load or modify records that have AT-MOST-ONE fields, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that the new or modified records do not violate AT-MOST-ONE constraints. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; detects and reports all violations of AT-MOST-ONE in one pass of the input data. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; finds any fields that violate the constraints, the following occurs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The error is reported and the new or duplicate field is rejected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;FLOD continues processing the input data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;At the end of the run, the file is marked &amp;quot;logically inconsistent;&amp;quot; that is, the FISTAT parameter is set to X&#039;40&#039;. See [[File integrity and recovery#Logically inconsistent files|Logically inconsistent files]] for more information.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The following error message is issued for each violation:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====AT-MOST-ONE in First Normal Form (1NF) files====&lt;br /&gt;
&amp;lt;p class=&amp;quot;note&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Using OCCURS 1 in 1NF files:&amp;lt;/b&amp;gt; For 1NF files, where AT-MOST-ONE is required, use OCCURS 1 to save processing time if you are storing a large number of records in which the field is always exactly the same length (such as a Social Security Number). &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;INVISIBLE fields in 1NF files:&amp;lt;/b&amp;gt; The First-Normal form relational model cannot be enforced for INVISIBLE fields. However, they are useful within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; for list processing and to support SQL multicolumn keys. (See the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SQL Server User&#039;s Guide for more information.) Therefore, the INVISIBLE field attribute is allowed, but INVISIBLE fields are not mapped to SQL-accessible columns. The following rules and restrictions apply to INVISIBLE fields in 1NF files:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Because the INVISIBLE and AT-MOST-ONE attributes are incompatible, INVISIBLE fields must be defined as REPEATABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot REDEFINE a field as INVISIBLE within a 1NF file; you can specify the INVISIBLE and REPEATABLE attributes only with a DEFINE command. In the case of a record security key field, specify the field as INVISIBLE and REPEATABLE using the INITIALIZE command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE fields in 1NF files must also be ORDERED or KEY. NUMERIC RANGE is not legal in a 1NF file and results in an error message)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Defining AT-MOST-ONE and REPEATABLE fields in non-1NF files====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can DEFINE or REDEFINE a field to be AT-MOST-ONE in any non-1NF &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file created after Release 9.0. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When redefining a field to AT-MOST-ONE that does not currently have the OCCCURS 1 attribute, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; scans Table B to verify that no multiple occurrences of the field exist in any record. If any field violates the AT-MOST-ONE constraints, the REDEFINE fails and the following error message is displayed for each violation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2122: AT-MOST-ONE CONSTRAINT VIOLATION FOR FIELD &amp;lt;i&amp;gt;fieldname&amp;lt;/i&amp;gt; IN RECORD &amp;lt;i&amp;gt;recordnumber&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Using the AT-MOST-ONE or the OCCURS 1 attribute====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Although both the AT-MOST-ONE and OCCURS 1 attributes prevent more than one occurrence of a field in a record, they achieve their goal in different ways. For non-1NF files, use either the AT-MOST-ONE or the OCCURS 1 attribute. Using both causes redundant processing. Understanding the advantages of each should help you decide which attribute you want to use. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
AT-MOST-ONE attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Does not preallocate the field. Therefore, if the field values between records are of very different lengths or if you do not know the length of the longest record, use AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Allows you to correct violations before the record is stored with the ON FCC unit. If you do not use an ON FCC unit, then a constraint violation cancels the request. Therefore, if it is important to allow users to correct violations, or it is important that the request not be canceled, use AT-MOST-ONE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
OCCURS 1 attribute:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Preallocates space for the field in every record. If you are storing a large number of records and the length of the value is generally the same, pre-allocating the field with OCCURS 1 can save you processing time. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Cancels the request when a violation occurs. With OCCURS 1, you cannot use an ON FCC unit to correct violations. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Compatibility with other field attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
AT-MOST-ONE is not compatible with the following field attributes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;INVISIBLE&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;OCCURS greater than 1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;REPEATABLE&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
REPEATABLE is compatible with all field attributes except AT-MOST-ONE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Coordinating AT-MOST-ONE and UNIQUE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Both AT-MOST-ONE and UNIQUE are examples of field-level constraints. Although the function of the UNIQUE and AT-MOST-ONE attributes appear similar, their actual operations differ:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Affects...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Value of the field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number of fields per record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, if a Social Security field within an EMPLOYEE file is both UNIQUE and AT-MOST-ONE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This attribute&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Ensures that...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UNIQUE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Social security number for every employee is different.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Each employee has only one social security number. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Coordinating the use of the AT-MOST-ONE and the UNIQUE attributes increases the integrity and accuracy of your records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===DEFERRABLE and NON-DEFERRABLE attributes===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFERRABLE and NON-DEFERRABLE attributes let you specify whether the updates to the index (Tables C and D) for a KEY ORDERED field can be deferred; that is, stored or updated at a later time.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFERRABLE attribute is recommended and is the default.&amp;lt;/p&amp;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;&lt;br /&gt;
If the NON-DEFERRABLE attribute is not specified when a field is defined, the DEFERRABLE attribute is assumed.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Choosing between DEFERRABLE and NON-DEFERRABLE====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Under normal circumstances, the storing and updating of records in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is done all at once. That is, Tables B, C, D, E, and X are changed simultaneously. When there is a high volume of updates (for example, a Batch2 process adding large numbers of records), efficiency and space reductions can be gained by deferring the updates to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Under some circumstances, it might be necessary to override this deferral of updates to the index for particular fields. For instance, consider a situation in which new records are added Online to a personnel file. You might be willing to wait a day for the ability to retrieve the new records. The updates to Tables C and D are deferred until a batch processing window (and the application of deferred updates does require exclusive access to the file), when they are done in a batch run. However, when adding new records, you want to ensure that a record containing a duplicate Social Security number (for example) is not added to the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can define the Social Security number field as NON-DEFFERABLE and write a procedure to retrieve any records already in the file that have the new Social Security number and display an error message if one is found. If updates to the index on this field have been deferred, you would not find a duplicate added earlier in the same day. By selecting the NON-DEFERRABLE attribute for the Social Security number field, you can ensure that Tables C and D are updated immediately. &amp;lt;/p&amp;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;&lt;br /&gt;
To provide immediate updating in BATCH204 runs, special action must be taken. See &amp;quot;Overriding deferred updates&amp;quot; for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can also detect duplicate Social Security numbers by defining the field with the UNIQUE and ORDERED attributes. See [[#UNIQUE and NON-UNIQUE attributes|UNIQUE and NON-UNIQUE attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Compatibility with other attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DEFERRABLE/NON-DEFERRABLE attribute is invalid for a field that has these attributes: BLOB, CLOB, NON-KEY, NON-ORDERED, and NON-RANGE. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a table showing invalid attribute combinations, see the [[DEFINE FIELD command]]. If you are defining field attributes with FILEMGMT, you will not be allowed to specify conflicting attributes. &amp;lt;/p&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
&amp;lt;div id=&amp;quot;Field Constraints&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Field and content constraints== &lt;br /&gt;
You can set up constraints to prevent &amp;quot;invalid&amp;quot; updates to the file. The updates might be invalid because to permit them would violate rules about the field (a second occurrence to an AT-MOST-ONE field, for example). Or you can set up &amp;quot;content&amp;quot; constraints to prevent values outside of those permitted to be stored.&lt;br /&gt;
&lt;br /&gt;
In addition, you can use the [[#LEVEL attribute|LEVEL attribute]] to prevent use of a field by unauthorized users.&lt;br /&gt;
 &lt;br /&gt;
===Field constraints===&lt;br /&gt;
 &lt;br /&gt;
====ON FIELD CONSTRAINT CONFLICT (ON FCC) unit==== &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To help control processing with UNIQUE and AT-MOST-ONE fields, use the User Language ON FCC unit. ON FCC is invoked whenever a field-level constraint conflict, such as an attempt to add a second occurrence of an AT-MOST-ONE field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An ON FCC unit is used with a number of $functions that can help you determine exactly where the field constraint conflict has occurred. The $UPDSTAT function is discussed below. Refer to the SOUL wiki pages for information on [[Subroutines#ON_units_2|other $functions for ON FCC.]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;$UPDSTAT function&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The $UPDSTAT function is used in conjunction with the ON FIELD CONSTRAINT CONFLICT unit and field attributes which have field-level constraints of UNIQUE and AT-MOST-ONE. You &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;must&amp;lt;/var&amp;gt; use $UPDSTAT in the ON FCC unit when writing procedures for files that have (or might have in the future) more than one type of field-level constraint defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If $UPDSTAT is invoked from an ON FCC unit following the detection of a field-level constraint conflict, it returns a numeric value denoting the type of conflict that has occurred:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meaning      &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;0 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No violation occurred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;1 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Uniqueness violation occurred&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;2 &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AT-MOST-ONE violation occurred &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The $UPDSTAT function takes no arguments.      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
See information about the [[#AT-MOST-ONE and REPEATABLE attributes|AT-MOST-ONE and REPEATABLE attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;UNIQUE and ORDERED fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; uses the Ordered Index to process UNIQUE values, fields defined as UNIQUE must also be defined as ORDERED. For more information about the Ordered Index see [[#ORDERED and NON-ORDERED attributes|ORDERED and NON-ORDERED attributes]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====UNIQUE and NON-UNIQUE attributes====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Defining a field with the UNIQUE attribute allows &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to ensure that a given field name = value pair occurs only once in a file. A Social Security number field is one example that might benefit from having the UNIQUE attribute. The UNIQUE attribute specifies that there can be only one occurrence of a field in the file. Multiple occurrences are not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When storing a field specified as UNIQUE, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; first queries the Ordered Index, looking for an identical field-name-equals-value pair. If it finds an identical value, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; issues an error message and does not perform the update. This is true both within a record for multiply occurring fields and between records.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If there is not a uniqueness conflict, that is, if the field-name-equals-value pair being stored is unique, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; completes the update.&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;&lt;br /&gt;
If the UNIQUE attribute is not specified when a field is defined, the NON-UNIQUE attribute is assumed. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;Unique values in multiply occurring fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In a multiply-occurring field, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that each occurrence of the field is unique. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Deleting UNIQUE fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because UNIQUE values use the Ordered Index, do not use the DELETE ALL RECORDS statement for deleting records. Use DELETE RECORD instead.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Compatibility with other attributes&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A field can only be specified as UNIQUE with the following restrictions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields must be specified as ORDERED.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields cannot be specified as DEFERRABLE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UNIQUE fields cannot be defined in non-TBO (Transaction back out) files. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you attempt to define a UNIQUE key under any of these circumstances, you receive an error message and the field is not defined.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Content constraints===&lt;br /&gt;
 &lt;br /&gt;
====Setting a pattern for a field value: the LIKE attribute====&lt;br /&gt;
The LIKE attribute is available as of Model 204 release 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting a field pattern lets you specify a pattern that a field value must conform to, otherwise it cannot be stored. The patterns you can specify are the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;[[Is_Like_pattern_matching#Pattern_matching|LIKE]]&amp;lt;/var&amp;gt; patterns.&amp;lt;/p&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD G WITH LIKE &#039;@@@####&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This example specifies that field G must start with three alphabetic characters followed by four numeric characters. An attempt to store a field value that does not conform to the field&#039;s pattern results in request cancellation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can limit a field value to a list of values. For, example, if a field must have a value of &#039;M&#039; or &#039;F&#039; you could code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD SEX WITH LIKE &#039;M,F&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
And if you want a BALL field to have a value &#039;SPLITTER&#039;, &#039;CURVE&#039;,  &#039;KNUCKLE&#039;, or &#039;CHANGE UP&#039; you could code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE PITCHERS DEFINE FIELD BALL WITH LIKE -&lt;br /&gt;
 &#039;SPLITTER,CURVE,KNUCKLE,CHANGE UP&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The maximum pattern length is 47 characters. The maximum default value length is 31 characters.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As with the IS LIKE operator in SOUL, the patterns are always applied to numbers after conversion to a string.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot use the &amp;lt;var&amp;gt;LIKE&amp;lt;/var&amp;gt; attribute to define an automatic field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Range constraints====&lt;br /&gt;
Range constraints are available as of Model 204 version 7.5.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can set range constraints on fields using the range attributes. Each set of range attributes is comprised of three or four attributes that you can use to establish a range for field length values, integer values, float values, or date/time stamp values. The types of range attributes are mutually exclusive. For example, you cannot define a field with the LENGTH-GE and INTEGER-LE attributes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The range constraints are self-editing. If you define a field with LENGTH LE 6 and LENGTH GE 8, the definition is rejected and an error message is issued.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When a range constraint is redefined, it replaces the existing field constraint.&amp;lt;/p&amp;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 range constraints do not have to match the data type of the stored field. That is, you can have a date/time constraint for a STRING field or an integer constraint for a FLOAT field, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Defining fields with length constraints=====&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Length constraint attributes &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&lt;br /&gt;
Range&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-EQ &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the required length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the minimum length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;LENGTH-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Number from 0 to 255 that indicates the maximum length of a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following field definitions illustrate using the length constraint attributes, LENGTH-EQ, LENGTH-GE, and LENGTH-LE, with each other and/or with other attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD A WITH LENGTH-EQ 8 BINARY OCCURS 1&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD B WITH LENGTH-GE 4 FLOAT LEN 8&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD C WITH LENGTH-LE 10&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD D WITH LENGTH-LE 10 LENGTH-GE 3&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD E WITH LENGTH-LE 6 LENGTH-GE 6 BINARY&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD F WITH LENGTH-LE 255 LENGTH-GE 0&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD COLOR WITH EXACTLY-ONE&lt;br /&gt;
&amp;lt;/p&amp;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 length constraints apply to the string representation of non-string types as they would be stored in the database. This means that the length of a FLOAT field with value 34.000 would be 2 because after being stored in the database it will return 34 on a retrieval.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====LENGTH-EQ (LEQ) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LENGTH-EQ attribute is followed by a number from 0 to 255 that indicates the required length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LENGTH-EQ attribute is not allowed for automatic fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====LENGTH-GE (LGE) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LENGTH-GE attribute is followed by a number from 0 to 255 that indicates the minimum length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LENGTH-GE attribute is not allowed for automatic fields. You can pair the LGE attribute with the LLE attribute, creating a length range. However, if the range is not valid or overlaps, an error message is invoked.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====LENGTH-LE (LLE) attribute=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LENGTH-LE attribute is followed by a number from 0 to 255 that indicates the maximum length of a field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LENGTH-LE attribute is not allowed for automatic fields. You can pair the LLE attribute with the LGE attribute, creating a length range. However, if the range is not valid or overlaps, an error message is invoked.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Setting an integer value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For Integer values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Integer attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies that the integer value must be...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;INTEGER-LT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value stored for a field must be an integer with a value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD NCHILDREN WITH INTEGER-LE 100&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The NCHILDREN field can have an integer value of less than or equal to 100.&amp;lt;/p&amp;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; An integer constraint will not accept a value that would be stored with a decimal place. If you have an integer constraint INTEGER-GE 10 and try to store value 10.0, it will fail because 10.0 is not an integer.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====INTEGER-GE (INTGE), INTEGER-GT (INTGT), INTEGER-LE (INTLE) and INTEGER-LT (INTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The integer range attributes (INTGE, INTGT, INTLE, and INTLT) establish a range of acceptable integer values for a field. These attributes can be defined singly or as a pair on the field. The integer range attributes  If a record is added with an integer value that is not within the range, the record is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you specify another type of range attribute on the same field, such as DATETIME-LE or FLOAT-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Setting a float value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For float values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Float attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies that the float value must be...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;FLOAT-LT&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value stored for a field must be a floating point value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WEIGHT WITH FLOAT-GT 10.5&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The WEIGHT field must have a float value greater than 10.5. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====FLOAT-GE (FLTGE), FLOAT-GT (FLTGT), FLOAT-LE (FLTLE) and FLOAT-LT (FLTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The float range attributes (FLTGE, FLTGT, FLTLE, and FLTLT) establish a range of acceptable float values for a field. These attributes can be defined singly or as a pair on the field. If a record is added with a float value that is not within the range, the record is rejected.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you specify another type of range attribute on the same field, such as DATETIME-LE or INTEGER-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====Setting a date/time value constraint=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For date/time values you can define a field with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Date/time attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Specifies that the date/time value must be...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-GE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Later than or the same as the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-GT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Later than the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-LE &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Earlier or equal to the date/time value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DATETIME-LT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Earlier than the value that follows&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value stored for field must be a date/time value that satisfies the constraint. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD BIRTHDATE WITH DATETIME-GE 18900101 DATETIME-LT 20100101                          &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The BIRTHDATE field is required to have a date/time value greater than or equal to January 1, 1890 and less than January 1, 2010. As with any other date/time values, the values can be extended with HH, HHMM, HHMMSS, HHMMSSX, HHMMSSXX, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====DATETIME-GE (DTGE), DATETIME-GT (DTGT), DATETIME-LE (DTLE), and DATETIME-LT (DTLT) attributes=====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The date/time range attributes-DTGE, DTGT, DTLE, DTLT-establish a range of acceptable dates for the value of the field. If a record is added with a date that is not within the range, the record is rejected. You can specify a single date/time range attribute or a pair of them on a field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you specify another type of range attribute on the same field, such as FLOAT-LE or INTEGER-GE, an error message is invoked. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value stored for a field must be a date/time with a value that has the proper relationship to the following value. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD BIRTHDATE WITH DATETIME-GE 18900101 DATETIME-LT 20100101&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The BIRTHDATE field is required to have a date/time value greater than or equal to January 1, 1890 and less than January 1, 2010. As with any other date/time values, the values can be extended with HH, HHMM, HHMMSS, HHMMSSX, HHMMSSXX, and so on.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Concatenated fields==&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 concatenated fields feature is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Fields listed after &amp;lt;var&amp;gt;CONCATENATION OF&amp;lt;/var&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Must be either AT-MOST-ONE, EXACTLY-ONE, or OCCURS 1 (any mixture of these field types is allowed)&lt;br /&gt;
&amp;lt;li&amp;gt;Must all be in the same field group, or must all not be in any field group&lt;br /&gt;
&amp;lt;li&amp;gt;Cannot have the &amp;lt;var&amp;gt;FIELDGROUP *&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;BLOB&amp;lt;/var&amp;gt;, nor &amp;lt;var&amp;gt;CLOB&amp;lt;/var&amp;gt; attribute&lt;br /&gt;
&amp;lt;li&amp;gt;Cannot have any of the [[#Range constraints|range attributes]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following syntax is used to define a concatenated field with a separator and an escape character:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Syntax&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;DEFINE FIELD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt; WITH CONCATENATION-OF -&lt;br /&gt;
 &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;field1&amp;lt;/span&amp;gt; WITH &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;field2&amp;lt;/span&amp;gt; [WITH &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;field3&amp;lt;/span&amp;gt; [WITH &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;field4&amp;lt;/span&amp;gt; -&lt;br /&gt;
 [AND . . .]]] -&lt;br /&gt;
 [SEPARATOR (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;char&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; X&#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;hex&amp;lt;/span&amp;gt;&#039; | NONE)] -&lt;br /&gt;
 [ESCAPE (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;char&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; X&#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;hex&amp;lt;/span&amp;gt;&#039; &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; CANCEL)]&lt;br /&gt;
 [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;OtherAttributes&amp;lt;/span&amp;gt; . . .]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SEPARATOR character appears between the field values that comprise the concatenated field. Up to eight fields can be defined for a concatenated field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Concatenated fields could be longer than 255 bytes after adding separator and escape characters; in this case, the request is cancelled.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Concatenated fields have the following field attribute support.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Concatenated field attributes &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Purpose&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CONCATENATION-OF (CAT) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;List the fields that make up that concatenated field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ESCAPE (ESC) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies a character that is used to escape separator characters that occur in a field that requires a terminating separator character&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SEPARATOR (SEP) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Specifies the character that terminates fields that do not have a fixed length and are not the last field in the concatenation&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a required attribute is not assigned a value, the default value is used. For example, if you define a CONCATENATION-OF field, which requires the SEPARATOR attribute, and you do not enter the SEPARATOR attribute, the default value of X&#039;00&#039; is used as the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
See the &amp;quot;Record retrievals&amp;quot; topic for more information on record retrieval of concatenated fields, including the use of [[Record_retrievals#EQ_WITH_retrieval_condition_for_concatenated_fields|EQ WITH]].&lt;br /&gt;
 &lt;br /&gt;
===CONCATENATION-OF (CAT) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CONCATENATION-OF (CAT) attribute is followed by a list of fields that make up that concatenated field. At least two are required and up to eight are allowed. The field names must be separated by the word WITH and subsequent field attributes must be separated from the list by the word &amp;lt;var&amp;gt;AND&amp;lt;/var&amp;gt; or by a comma. Each field specified in the list of concatenated fields must have the &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;OCCURS 1&amp;lt;/var&amp;gt; attribute specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
If a field to be concatenated is an &amp;lt;var&amp;gt;OCCURS 1&amp;lt;/var&amp;gt; field, define its LENGTH attribute as the total of the longest possible concatenation (including separators) to avoid a &amp;quot;too long&amp;quot; result.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If LENGTH is less than 255, a &amp;quot;too long&amp;quot; result produces message M204.0738.&amp;lt;/p&amp;gt;&lt;br /&gt;
If LENGTH is 255, a &amp;quot;too long&amp;quot; result produces M204.2872, which cancels the request.&lt;br /&gt;
 &lt;br /&gt;
===ESCAPE (ESC) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ESC attribute is followed by one of the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single character in C&#039;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;char&amp;lt;/var&amp;gt;&#039; or X&#039;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hex&amp;lt;/var&amp;gt;&#039; format that specifies the character used to escape separator characters that occur in a field requiring a terminating separator character. In addition to escaping the separator character, the escape character can also escape itself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CANCEL, which means that an attempt to store a separator character in a field that requires a terminating separator results in request cancellation.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default ESCAPE character is X&#039;01&#039;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once you define an ESCAPE value for a field, you cannot redefine the ESCAPE value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ESCAPE character cannot match the SEPARATOR character. The ESCAPE character is always displayed on DISPLAY FIELD output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ESCAPE attribute is not allowed on a field definition, if the SEPARATOR NONE attribute is specified.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Using the ESCAPE attribute&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The ESC character is inserted into a concatenated field when the real data being added to the database contains the SEPARATOR or the ESCAPE character itself. When reading in stored values, programs use the ESC character to differentiate between those special characters and normal data that happens to include those special characters. When the processing encounters the ESCAPE character in a concatenated field, it knows that the next character is real data.&amp;lt;/p&amp;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 ESCAPE character applies to all fields except the last field in the concatenation. The programmer is expected to know how many components comprise the concatenation and therefore, special characters occurring in the last component must be real data.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following field definitions:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD A_CONCAT_TEST1 WITH AT-MOST-ONE&lt;br /&gt;
DEFINE FIELD A_CONCAT_TEST2 WITH AT-MOST-ONE&lt;br /&gt;
DEFINE FIELD A_CONCAT_TEST3 WITH CONCATENATION-OF -&lt;br /&gt;
             A_CONCAT_TEST1 WITH -&lt;br /&gt;
             A_CONCAT_TEST2 AND  -&lt;br /&gt;
             SEPARATOR  C&#039;+&#039;     -&lt;br /&gt;
             ESCAPE     C&#039;/&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If we then do:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
IN POLICIES STORE RECORD&lt;br /&gt;
                  A_CONCAT_TEST1 = 1ST+VALUE+&lt;br /&gt;
                  A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
            END STORE&lt;br /&gt;
FRN $CURREC&lt;br /&gt;
    NP&lt;br /&gt;
    PAI&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
We get:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST+VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
A_CONCAT_TEST3 = 1ST/+VALUE/++2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The plus signs in the stored records are intentionally part of the data. For the concatenated field &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stores the escape character preceding the plus signs in the data for all but the last field in the concatenation. This assumes that the programmer knows how many fields there are in the concatenation and therefore knows that any separator characters in the last field are data fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In storing the escape character immediately before any plus signs that are part of the data proper, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; tells the programmer that they are to be read as data. If there were any escape characters in the data proper, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; puts an escape character before the data proper version as in the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
IN POLICIES STORE RECORD&lt;br /&gt;
                  A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
                  A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
            END STORE&lt;br /&gt;
FRN $CURREC&lt;br /&gt;
    NP&lt;br /&gt;
    PAI&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This is the output:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
A_CONCAT_TEST3 = 1ST//VALUE/++2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you do not want either the separator or the escape character in the concatenated field, you can enforce this by assigning the value &amp;lt;code&amp;gt;CANCEL&amp;lt;/code&amp;gt; as the escape character as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD A_CONCAT_TEST1 WITH CONCATENATION-OF -&lt;br /&gt;
             A_CONCAT_TEST1 WITH                  -&lt;br /&gt;
             A_CONCAT_TEST2 AND                   -&lt;br /&gt;
             SEPARATOR C&#039;+&#039;                       -&lt;br /&gt;
             ESCAPE CANCEL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In which case, the concatenation will be ignored and our STORE record results in the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;A_CONCAT_TEST1 = 1ST/VALUE+&lt;br /&gt;
A_CONCAT_TEST2 = 2ND+VALUE+&lt;br /&gt;
&amp;lt;/p&amp;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; There are no error messages associated with this condition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you specify the ESCAPE CANCEL attribute for a field and the SEPARATOR character for that field is in one of the field values for the concatenated string, the update is cancelled. For an example, see [[Record_retrievals#Limitations_when_using_ESCAPE_CANCEL|Limitations when using ESCAPE CANCEL]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SEPARATOR (SEP) attribute===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SEP attribute is followed by one of the following options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single character in C&#039;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;char&amp;lt;/var&amp;gt;&#039; or an X&#039;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hex&amp;lt;/var&amp;gt;&#039; format that specifies the character that terminates fields that do not have a fixed length and are not the last field in the concatenation. The separator character is always used between field values, regardless of any length constraints on the component fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The NONE option that means the fields in the concatenation are concatenated end to end with no separator character and regardless of their length.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you define a field with the SEP attribute, you must supply a value. Otherwise, the following error is issued:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE MAKE_MODEL WITH CONCATENATION-OF MAKE WITH MODEL - AND ORD SEP ESC CANCEL&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** 1 M204.0405: INVALID DEFINE OPTION: SEP ESC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you define a field without the SEP attribute, it defaults to X:00:, as shown in the following code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE MAKE_MODEL WITH CONCATENATION-OF MAKE WITH MODEL -&lt;br /&gt;
 AND ORD ESC CANCEL&lt;br /&gt;
 &lt;br /&gt;
D FIELD (ABBREV) MAKE_MODEL&lt;br /&gt;
MAKE_MODEL&lt;br /&gt;
 (DEF NFRV NKEY NCOD STR NNR VIS UP ORD CHAR LRES 15 -&lt;br /&gt;
 NRES 15 SPLT 50 IMM 1 NUNIQ ONE CAT MAKE WITH MODEL AND -&lt;br /&gt;
 SEP X&#039;00&#039; EXC CANCEL)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once you define a SEPARATOR value for a field, you cannot redefine the SEPARATOR value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The SEPARATOR character cannot match the ESCAPE character. The SEPARATOR character is always displayed on DISPLAY FIELD output.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the SEPARATOR NONE attribute is specified on a field definition, the ESCAPE attribute is not allowed.&amp;lt;/p&amp;gt;See the Record retrievals topic for notes on [[Record_retrievals#Limitations_when_using_SEPARATOR_NONE|limitations when using SEPARATOR NONE]].&lt;br /&gt;
 &lt;br /&gt;
===Defining concatenated fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Using the fields defined in [[|]] and the following fields, you can define concatenated fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD COLMOD WITH CONCATENATION-OF COLOR -&lt;br /&gt;
WITH MODEL AND SEP C&#039;-&#039; ESC C&#039;+&#039;&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MODCOL WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR AND SEP C&#039;$&#039; ESC C&#039;*&#039;&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MODCOLI WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD MCY WITH CONCATENATION-OF MODEL -&lt;br /&gt;
WITH COLOR WITH YEAR AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD COLCNT WITH CONCATENATION-OF COLOR -&lt;br /&gt;
WITH COUNTRY AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD CNTYR WITH CONCATENATION-OF YEAR -&lt;br /&gt;
WITH COUNTRY AND SEP X&#039;40&#039; ESC C&#039;*&#039; INVISIBLE ORDERED&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Defining concatenated fields in a field group context===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE REDSOX DEFINE FIELD BATTERS&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELDGROUP STARTERS&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD NTRIP WITH CTO STARTERS AND EXACTLY-ONE&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD A WITH AT-MOST-ONE FIELDGROUP STARTERS AND-&lt;br /&gt;
ORDERED CHARACTER&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD B WITH AT-MOST-ONE FIELDGROUP STARTERS AND -&lt;br /&gt;
KEY&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD C WITH AT-MOST-ONE FIELDGROUP STARTERS AND&lt;br /&gt;
ORDERED NUMERIC&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD AB WITH FIELDGROUP STARTERS AND -&lt;br /&gt;
CONCATENATION-OF A WITH B AND SEP C&#039;/&#039;&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD ABO WITH FIELDGROUP STARTERS AND -&lt;br /&gt;
CONCATENATION-OF B WITH A AND SEP C&#039;+&#039; ORDERED&lt;br /&gt;
 &lt;br /&gt;
IN FILE REDSOX DEFINE FIELD ABI WITH CONCATENATION-OF B WITH A AND -&lt;br /&gt;
SEP C&#039;+&#039; ORDERED INVISIBLE&lt;br /&gt;
&amp;lt;/p&amp;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; A field in a concatenated field value does not have a terminating separator set only if it is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Last field in the concatenation, or&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Fixed length (LENGTH-EQ set) and the default value has the same length as LENGTH-EQ.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;div id=&amp;quot;Automatic Fields&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Automatic fields==&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; Automatic fields are available as of Model 204 version 7.5 and require the &amp;lt;var&amp;gt;[[FILEORG_parameter|FILEORG]]&amp;lt;/var&amp;gt; X&#039;100&#039; setting.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; lets you define a field whose value is automatically maintained. For example, a field might count occurrences of another field so that every store or delete of the field occurrence changes the count in the automatic field. An automatic field is defined with one of the following attributes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CHUNK&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;COUNT-OCCURRENCES-OF&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value of an automatic field is updated at the start of a transaction by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and you cannot set it explicitly by a program. Any valid update causes the appropriate time and user stamps to be updated. For example, DELETE FOO(8). when there are no occurrences of FOO in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once you define an automatic value for a field, you cannot redefine the automatic value.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User Language ADD, INSERT, DELETE, and STORE RECORD statements will be rejected with a compile error if they reference an automatic field:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;M204.2862: ATTEMPT TO UPDATE AUTOMATIC FIELD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
If a field name variable (FNV) used on an update UL statement resolves to an automatic field,&lt;br /&gt;
the request will be cancelled with the following error:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;M204.2863: ATTEMPT TO DO &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;updateOperation&amp;lt;/span&amp;gt; FOR AUTOMATIC FIELD: &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
On an update statement in group context, the M204.2863 error will also be issued if the field being updated is discovered to be an automatic field in one of the group&#039;s files at evaluation time.&lt;br /&gt;
 &lt;br /&gt;
===Automatic field context===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Automatic fields can operate in a record or field group context. For example, with the following set of fields:&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;...&lt;br /&gt;
DEFINE FIELDGROUP ADDRESS&lt;br /&gt;
...&lt;br /&gt;
DEFINE FIELD RECORD.UPDT.TIME (DATETIME UPDT-TIME)&lt;br /&gt;
DEFINE FIELD ADDRESS.LINE.1 (SN NONE FG ADDRESS)&lt;br /&gt;
...&lt;br /&gt;
DEFINE FIELD ADDRESS.UPDT.TIME (DATETIME FG ADDRESS AND UPDT-TIME)&lt;br /&gt;
...&amp;lt;/P&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Any update to any field in a record will automatically update RECORD.UPDT.TIME.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Any update to any field in an occurrence of the ADDRESS field group will cause the ADDRESS.UPDT.TIME for that occurrence to be updated. (And, of course, the record level RECORD.UPDT.TIME as well.) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Rules for the definition of automatic fields===&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;CHUNK attribute&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Fields defined with the CHUNK field attribute cannot be redefined or deleted.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;COUNT-OCCURRENCES-OF (CTO) attribute&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The COUNT-OCCURRENCES-OF (CTO) attribute is not allowed for fields defined as REPEATABLE.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Because one of the major advantages of CTO fields is to avoid unnecessary record scans, it is highly recommended that the field be preallocated. Otherwise the field is stored and updated in Table B in the normal way.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
See [[#cto|CTO fields]] for details on its use.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;CREATE* and UPDATE* attributes&#039;&#039;&#039; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CREATE-TIME, CREATE-TIMEUTC, CREATE-USER, UPDATE-TIME, UPDATE-TIMEUTC, and UPDATE-USER automatic fields capture the add/update user/time as of the start of the transaction. Any of these attributes can be added to empty or non-empty fields (using a &amp;lt;var&amp;gt;REDEFINE&amp;lt;/var&amp;gt; command). The value is maintained by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; processing, so you cannot change the value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
These automatic attributes cannot be defined as REPEATABLE (the default is AT-MOST-ONE).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
See [[#Tracking updates using automatic fields|Tracking updates using automatic fields]] for details on their use.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Displaying automatic fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the AT-MOST-ONE or EXACTLY-ONE attribute for an automatic field. These attributes affect the order in which the fields are displayed on a PAI statement. EXACTLY-ONE fields are displayed in the order they were defined, whereas AT-MOST-ONE fields are displayed in the order they are stored in Table B. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Currently Table B stores the following automatic fields in the order shown:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;cto&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Counting occurrences of a field&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
===CTO fields: counting occurrences of a field===&lt;br /&gt;
&amp;lt;!--Caution: &amp;lt;div&amp;gt;s above--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To create an automatic count field you use the COUNT-OCCURRENCES-OF (CTO) keyword on a field definition, followed by the name of the field or field group for which the count is automatically maintained. For example, if you have field group DRUG you could define an automatic count field as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELDGROUP DRUG&lt;br /&gt;
DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot define a CTO field in a file that has had records already added to it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You could also make the automatic count field a binary field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH CTO DRUG AND BINARY OCCURS 1&lt;br /&gt;
DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG AND -&lt;br /&gt;
BINARY&lt;br /&gt;
&amp;lt;/p&amp;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; AND is a separator between a field or field group name and other field attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An automatic count field can also be an OCCURS 1 field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH COUNT-OCCURRENCES-OF DRUG AND BINARY OCCURS 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An automatic count field could even be ORDERED, KEY or NUMERIC RANGE:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DRUGCT WITH CTO DRUG AND BINARY OCCURS 1 ORDERED NUMERIC&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can find all records with N occurrences of field group DRUG. Or, you can find those that have more or less than some number of occurrences.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Limitations on COUNT-OCCURRENCES-OF (CTO) fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Fields defined with the CTO attribute cannot also have the UPDATE AT END attribute. You cannot define a CTO field that counts occurrences of UPDATE AT END fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot use a CTO field to count occurrences of OCCURS fields, even though the OCCURS count is greater than 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Also, you cannot define a CTO field in a file that has had records already added to it.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There is a maximum of one CTO field per field or field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Retrieving the value of a CTO field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can retrieve values of CTO fields via the field name (as with any VISIBLE field), as in:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;PRINT DRUGCT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
or&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%DRUGCT = DRUGCT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Automatic optimization with COUNT OCCURRENCES OF fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The use of CTO fields automatically optimizes many of the record scan processes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Processing multiply occurring fields and field groups#FOR EACH OCCURRENCE OF loops|FOR EACH OCCURRENCE OF]] loops.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a CTO field exists for the field or field group that is being looped over via an FEO or FAO statement, the value of that field limits the number of times the loop is processed, which reduces the need to scan to the end of record for every FEO or FAO statement. Note that when a record is updated or might be updated mid-loop, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; normal concerns about subscript handling in these statements need to be considered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;FOR FIELDGROUP clause&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Before processing a FOR FIELDGROUP loop, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks whether the requested occurrence is in the record based on the CTO field. If the User Language request is for occurrence 3, but the CTO field indicates only two occurrences in the record, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; stops processing the FOR loop.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Field extraction&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Before extracting a field &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks whether the requested occurrence is in the record based on the CTO field. If the User Language request is occurrence 3, but the CTO field indicates only two occurrences in the record, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; sets the result to null (or NOT PRESENT). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Note that in the case of the subscripted field optimization:&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FOR %I FROM 1 TO %N&lt;br /&gt;
   %FOO = FOOFIELD(%N)&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; checks only the number of occurrences on the first iteration of the loop.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In all cases, the greatest benefit from the CTO field optimization is when a record contains no occurrences of the requested field or field group. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; immediately determines that no occurrence is on the record and stops scanning the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Defining an efficient CTO field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The counter fields are always physically present in the record. Using a DEFAULT-VALUE of zero for such a field defeats its purpose as you need to scan the entire record to determine whether to use the default value. When you issue a STORE RECORD statement, all CTO fields are stored as 0 in the record. For non-OCCURS, fields are always the first variable length fields in the record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; customer support recommends that you define a CTO field as BINARY OCCURS 1, as these require only four bytes per record, whereas the minimum length of a variable length field is four bytes (for a compressed 0) and will be at least five for any non-zero value. A CTO field inside a field group cannot be an OCCURS field. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The absolute maximum value for CTO fields is currently X&#039;3FFFFFFF&#039; or 1,073,741,823 since BINARY fields use the high order two bits to distinguish values from coded values. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot update CTO fields; attempts are caught at compile-time for explicit file-context references and at run-time for group-context and field-name variables. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
CTO fields can even be in field groups and zeros are stored for CTO fields when the ADD FIELDGROUP or INSERT FIELDGROUP statement is processed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Displaying CTO fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
By default, the PRINT ALL INFORMATION (PAI), AUDIT ALL INFORMATION (AAI), PRINT ALL FIELD GROUP INFORMATION (PAFGI), and AUDIT ALL FIELDGROUP INFORMATION (AAFGI) statements do not display CTO (counter fields). When you are using PAI [INTO] to reorganize your files or to copy records, the automatic fields are likely to cause problems.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Under other circumstances you can use the argument to indicate that you do want automatic fields to be printed by these statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tracking updates using automatic fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Versions 7.5 and higher of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can track the date/time when a record was created or updated, and what user ID created or updated it.&lt;br /&gt;
This tracking can be accomplished by using one of the following field tracking attributes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracking attribute &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Abbreviation&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Tracks the...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-TIME &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CRTM&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was created using machine time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-TIMEUTC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CRTMU&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was created using Coordinated Universal Time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CREATE-USER &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CRUS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User ID that created the record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-TIME &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPTM&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was updated using machine time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-TIMEUTC &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPTMU&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Moment the record was updated using Coordinated Universal Time&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPDATE-USER &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;UPUS&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;User ID that updated the record&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All of the automatic fields that contain date/time information also have the DATETIME attribute. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You cannot update tracking fields with User Language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A record or field group can contain only a single field of each update tracing type (CREATE-USER, UPDATE-USER, CREATE-TIME, UPDATE-TIME). An attempt to create a second invokes an error message.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can define update tracking fields (CREATE-TIME, UPDATE-TIME, CREATE-USER, UPDATE-USER) in an already populated file, even an update tracking field for the main records or a field group that already has occurrences. You can also define a DEFAULT-VALUE field, which defaults to a null string. This lets you define such fields with or without a reorganization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Tracking fields for records&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file itself can have a single field defined for each of the tracking fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An attempt to define a second field of the same type on the file results in an error message, for example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD RECORD.CREATE.TIME WITH CREATE-TIME&lt;br /&gt;
DEFINE FIELD RECORD.CREATE-TIME2 WITH CREATE-TIME&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.2866: FILE ALREADY HAS A CREATE-TIME FIELD&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;UPDATE&amp;lt;/var&amp;gt; tracking fields for the records are updated when any field in the record changes and the create tracking fields are added to the record when it is initially stored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Tracking fields for field groups&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Automatic tracking fields can also provide a date/time and user stamp of the creator and last update of each occurrence of a field group.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If an &amp;lt;var&amp;gt;UPDATE-TIME&amp;lt;/var&amp;gt; tracking field is defined as a part of field group &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; as shown below, then each occurrence of that field group will contain the tracking field:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD MY_UPDATE_TIME WITH FIELDGROUP X AND ORD NUM UPDATE-TIME&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Setting a date/time field&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; field attribute indicates the format of the data stored in Table B.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Once you define a field as &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt;, you assign a string to it in &amp;lt;code&amp;gt;YYYYMMDDHHMMSSXXXXXX&amp;lt;/code&amp;gt; format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;IN FILE FOO DEFINE FIELD WHEN WITH DATETIME&lt;br /&gt;
 ...&lt;br /&gt;
BEGIN&lt;br /&gt;
  IN FILE FOO STORE RECORD&lt;br /&gt;
    WHEN = &#039;2010070413470643516378&#039;&lt;br /&gt;
  END STORE&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you attempt to store the field with invalid data such as, &amp;lt;code&amp;gt;WHEN = &#039;72&#039;&amp;lt;/code&amp;gt;, the request is cancelled and you receive an error:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;***  1  CANCELLING REQUEST: M204.2865: ATTEMPT TO ADD INVALID DATETIME VALUE: WHEN = 72&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As most timestamps do not require microseconds, you can specify 10ths, 100ths, 1,000ths, 10,000ths and 100,000ths of a second. The value is simply padded on the right with zeros. For date/time field &amp;lt;code&amp;gt;WHEN&amp;lt;/code&amp;gt;, the following are all equivalent:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704134706000000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070413470600000&#039;&lt;br /&gt;
ADD WHEN = &#039;200907041347060000&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704134706000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070413470600&#039;&lt;br /&gt;
ADD WHEN = &#039;200907041347060&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704134706&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In addition, you can leave off seconds, minutes or hours so the following are all equivalent:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704000000&#039;&lt;br /&gt;
ADD WHEN = &#039;200907040000&#039;&lt;br /&gt;
ADD WHEN = &#039;2009070400&#039;&lt;br /&gt;
ADD WHEN = &#039;20090704&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
which are also, of course, equivalent to&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ADD WHEN = &#039;20090704000000000000&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Storing dates or date/times efficiently&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; fields use seven bytes to store their value (plus four bytes overhead, if the field is not preallocated). A binary representation is used to store the 20-character full date format so that it can be held in seven bytes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The shortest valid format for a field with the &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; attribute is &amp;lt;code&amp;gt;YYYYMMDD&amp;lt;/code&amp;gt;. If the values you are storing are simple dates, they can be stored in four bytes as binary values, three fewer bytes per value than a date/time field. However, for anything with a time in it (even just hours), a &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; field takes less space than the alternative field types (&amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;STRING&amp;lt;/var&amp;gt;).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Automatic validation of date/times&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In addition to the compact storage of date/time stamps, &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; fields also provide automatic validation of the values you attempt to stored in them &amp;amp;mdash; you cannot store numbers into them that are not valid dates. For example, you cannot store &amp;lt;code&amp;gt;&#039;9999111&#039;&amp;lt;/code&amp;gt; into a &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; field, nor can you store &amp;lt;code&amp;gt;&#039;20070931&#039;&amp;lt;/code&amp;gt; (because September does not have 31 days), nor can you store &amp;lt;code&amp;gt;&#039;20070229&#039;&amp;lt;/code&amp;gt; (because 2007 is not a leap year, so February only has 28 days).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Additional &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt;-formatted fields also provide for [[Field design#Setting a date/time value constraint|field content validation]] for date/time fields. &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; It is possible to set a &amp;lt;var&amp;gt;DEFAULT-VALUE&amp;lt;/var&amp;gt; for a &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; field to an invalid date/time value, such as a hyphen &amp;lt;code&amp;gt;_&amp;lt;/code&amp;gt;. That value will not be stored in the database, but it would be the value returned for a reference to a missing &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; field value.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The value returned for &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; fields is always in this format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;YYYYMMDDHHMMSSXXXXXX&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are interested in only part of the time stamp, you can use either of these: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;$Substr&amp;lt;/var&amp;gt; function to get the part you want. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;A %variable specified to be the length of the part of the time stamp you are interested in. &amp;lt;p&amp;gt;&lt;br /&gt;
So, to use &amp;lt;code&amp;gt;%when&amp;lt;/code&amp;gt; to hold a date/time in &amp;lt;code&amp;gt;YYYYMMDDHHMISS&amp;lt;/code&amp;gt; format: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%when is string len 14 &lt;br /&gt;
 ... &lt;br /&gt;
%when= WHEN&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; values can be indexed either as &amp;lt;var&amp;gt;ORDERED CHARACTER&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;ORDERED NUMERIC&amp;lt;/var&amp;gt;. If indexed as &amp;lt;var&amp;gt;ORDERED NUMERIC&amp;lt;/var&amp;gt;, only the first 15 digits (&amp;lt;code&amp;gt;YYYYMMDDHHMISSX&amp;lt;/code&amp;gt;) are indexed. If &amp;lt;var&amp;gt;ORDERED CHARACTER&amp;lt;/var&amp;gt;, it is indexed as the string representation of the date/time value in the full &amp;lt;code&amp;gt;YYYYMMDDHHMISSXXXXXX&amp;lt;/code&amp;gt; format.&amp;lt;/p&amp;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; Making &amp;lt;var&amp;gt;DATETIME&amp;lt;/var&amp;gt; fields &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; fields is not allowed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Update processing&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Date/time values are the date/time of the start of the update processing, so all records, fields and field groups updated by a single update get the same time stamp. Furthermore, the code that starts an update unit ensures that the date/time stamp of each update unit is unique.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The M204.0173 and M204.0172 messages were expanded to include the date/time stamp.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0173: START OF UPDATE 12 AT 10:11:00.51 (20090705101100511734)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
and&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0172: END OF UPDATE 12 AT 10:11:00.56 (20090705101100511734)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Defining various UPDATE-USER fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To indicate whether an update tracking field applies to a record or field group, specify or do not specify the containing field group on the field definition. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHO WITH UPDATE-USER&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The WHO field contains the user ID of the last user that updated anything in the record. The following example illustrates defining an UPDATE-USER field in a field group:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD DR.WHO WITH UPDATE-USER FIELDGROUP DR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The DR.WHO field contains the user ID of the last user that updated an occurrence of field group DR.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Defining various UPDATE-TIME fields&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify an update tracking field as FIELDGROUP *, which means that all field groups and the primary record all use the same update tracking field. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH UPDATE-TIME FIELDGROUP *&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The WHEN field is placed in the primary record and each field group to track the last update time. If a file has a FIELDGROUP * update tracking field and a field group or record has a different comparable updating tracking field, the field group or the record specific tracking field applies to the field. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEFINE FIELD WHEN WITH UPDATE-TIME FIELDGROUP *&lt;br /&gt;
 &lt;br /&gt;
DEFINE FIELD MAIN.WHEN WITH UPDATE-TIME OCCURS 1&lt;br /&gt;
 &lt;br /&gt;
DEFINE FIELD FOO.WHEN WITH UPDATE-TIME FIELDGROUP FOO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The field WHEN would be updated for changes to any field group occurrences in field groups that do not have their own UPDATE-TIME field defined.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The Field MAIN.WHEN would be set for any update to any field in the record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The field FOO.WHEN would be set in field group FOO for any update to a field group occurrence.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The UPDATE-TIME field in a field group that has a nested field group will be updated when the nested field group is updated, even though no fields in the containing field group were updated.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===An alternate approach to adding a date-time stamp field to your files=== &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There is a more general way you can include a date-time stamp field in your files. The date-time stamp feature lets you put a date-time stamp (DTS) on each record that was updated in a transaction. You can then use the data in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date-time stamp&amp;lt;/var&amp;gt; field in an end-user written application to find and process all the rows of data that were changed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An application that processes these records can track the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;date-time stamp&amp;lt;/var&amp;gt; field values that have been processed to date, or it might take another action, including updating the date-time stamp field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To install and use this functionality, see [[Setting up the date-time stamp field]]. Once installed, the date-time stamp feature works only in files created in V6R1.0 or later. See [[Adding a date-time stamp field]]&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; There is no support in PQO/204 for the date-time stamp feature.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Difference between the system wide date-time stamp field and an UPDATE-TIME field====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Besides the obvious difference that the date-time stamp field will (and must) have the same name in every file in which it is used, the following are the notable differences between the two approaches:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;The UPDATE-TIME attribute can be set to track updates to physical field groups, as well as at the record level.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The UPDATE-TIME captures the time at the start of an update unit, the date-time stamp field captures the time at the commit point.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The date-time stamp field updates can be [[Adding a date-time stamp field#Suspending date-time stamp updates|temporarily suspended]].&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Assigning fields to field groups ==&lt;br /&gt;
 &lt;br /&gt;
===FIELDGROUP attribute=== &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
No default, can be abbreviated as &amp;lt;var&amp;gt;FG&amp;lt;/var&amp;gt;. &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt; is available as of Model 204 version 7.5.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt; attribute specifies the name of the field group that the&lt;br /&gt;
defined field is associated with (contained in). Once you define a &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt;&lt;br /&gt;
value for a field, you cannot redefine the &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt; value.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt; attribute cannot refer to a field group name that has not yet been defined to the file. The &amp;lt;var&amp;gt;[[DEFINE FIELDGROUP command|DEFINE FIELDGROUP]]&amp;lt;/var&amp;gt; command must occur before the &amp;lt;var&amp;gt;[[DEFINE FIELD command|DEFINE FIELD]]&amp;lt;/var&amp;gt; command.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Syntax===&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FIELDGROUP [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldgroupname&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; *]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt; attribute does not allow: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Record security&lt;br /&gt;
&amp;lt;li&amp;gt;Use for &amp;lt;var&amp;gt;SORT&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;HASH&amp;lt;/var&amp;gt; file&lt;br /&gt;
&amp;lt;li&amp;gt;1NF file model&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;FIELDGROUP&amp;lt;/var&amp;gt; attribute can be used with the &amp;lt;var&amp;gt;STORE-NULL LITERAL&amp;lt;/var&amp;gt;&lt;br /&gt;
attribute.&lt;br /&gt;
 &lt;br /&gt;
===Using FIELDGROUP * ===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FIELDGROUP *&amp;lt;/var&amp;gt; attribute means that the field will be included into all&lt;br /&gt;
field groups. The &amp;lt;var&amp;gt;EXACTLY-ONE&amp;lt;/var&amp;gt; attribute conflicts with the &amp;lt;var&amp;gt;FIELDGROUP *&amp;lt;/var&amp;gt; attribute.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;Defining a LEVEL clause&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;LEVEL attribute&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
==LEVEL attribute - prevent unauthorized field usage==&lt;br /&gt;
To secure a field against unauthorized access, include a LEVEL clause in the field&#039;s description. [[Security#Field-level security|Field-level security]] discusses field-level security and describes the types of field access: SELECT, READ, UPDATE, and ADD.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Field-level security has a negligible impact on both performance and storage usage.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Field naming==&lt;br /&gt;
The rules for field and field group naming are contained in [[Field names]].&lt;br /&gt;
 &lt;br /&gt;
[[Category:Model 204 files]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=New_and_updated_messages_in_Model_204_version_7.5&amp;diff=78684</id>
		<title>New and updated messages in Model 204 version 7.5</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=New_and_updated_messages_in_Model_204_version_7.5&amp;diff=78684"/>
		<updated>2015-07-30T23:18:40Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Was missing the &amp;quot;File&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Release_notes_for_Model_204_version_7.5|Back to 7.5 Release Notes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noautonum&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==M204 messages==&lt;br /&gt;
===Mixed case messages by default===&lt;br /&gt;
As of version 7.5, all Model 204 messages are issued with mixed case text by default unless [[UPCASMSG parameter|UPCASMSG]] is set.&lt;br /&gt;
===M204.0141: Bug .. duplicate file name in cp record===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A duplicate file name was encountered while attempting to add a deferred update dataset to the file directory during recovery. This indicates a potential problem in the Model 204 software.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Contact Technical Support with the following documentation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Audit trail from the previous run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Journal from the previous run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 4 AD OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0204: Parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parmName&amp;lt;/var&amp;gt; obsolete and not reset===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Writing records to the SMF data set no longer requires the installation of an SVC. The&lt;br /&gt;
SMFSVC parameter is therefore obsolete and cannot be reset.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; No response required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0316: Recursive ON units exceed MAXOND: Evaluation stopped===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; During evaluation, one or more ON units was entered recursively. When the number of recursions exceeded MAXOND, the evaluation was terminated.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; This message might indicate a logic error in the program. Inform the program author.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0332 and M204.0336===&lt;br /&gt;
These messages indicate problems with the CRAM interface. &lt;br /&gt;
The visibility of these messages has been improved by:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;writing the message to the operator and the JESLOG&lt;br /&gt;
&amp;lt;li&amp;gt;writing the message as an ER line in CCAAUDIT&lt;br /&gt;
&amp;lt;li&amp;gt;setting the return code to 80&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====M204.0332: RC &#039;&#039;nn&#039;&#039; from CRFS OPEN====&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The run has failed to initialize due to problems with the CRAM interface.&lt;br /&gt;
The possible formats of this message are:&lt;br /&gt;
&lt;br /&gt;
Format 1: RC nn from CRFS OPEN/PUT/GET&lt;br /&gt;
&lt;br /&gt;
Format 2: ECB postcode from CRFS PUT/GET&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 1 indicates that Model 204 module CRFS attempted to open channel, send a message down the channel, or receive a message from a channel. CRAM was unable to satisfy the request. The message states the return code and the&lt;br /&gt;
operation attempted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 2 indicates that Model 204 module CRFS received an unexpected post code from CRAM while attempting an I/O operation on a channel. The message states the post code and the operation attempted.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Possible return codes include the following values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;INVALID FUNCTION&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;CB FORMAT ERROR&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN MAST) CHANNEL ALREADY OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN USER) NO USER LINES FREE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN) SUBTASKS NOT PROPERLY OPENED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) ICB NOT OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) OTHER TASK HAS DIED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) UNEXPECTED COMMAND&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;28&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;NOT ENOUGH STORAGE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;99&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;There is no SVC defined in the IGCLM244 module and the XMEMOPT ’80’ bit must be set for an SVC-less installation&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;110&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(VMCF WRITE) MESSAGE LIMIT EXCEEDED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Contact Technical Support and have the audit trail available.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 80 80 AUDITER NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
====M204.0336: RC &#039;&#039;nn&#039;&#039; from CRIO OPEN====&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The run has failed to initialize due to problems with the CRAM interface.&lt;br /&gt;
The possible formats of this message are:&lt;br /&gt;
&lt;br /&gt;
Format 1: RC nn from CRIO OPEN/PUT/GET&lt;br /&gt;
&lt;br /&gt;
Format 2: ECB postcode from CRFS PUT/GET&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 1 indicates that Model 204 module CRIO attempted to open a channel,&lt;br /&gt;
send a message down a channel, or receive a message from a channel. CRAM&lt;br /&gt;
was unable to satisfy the request. The message states the return code and the&lt;br /&gt;
operation attempted. For example, the return code 16 indicates that the CRAM&lt;br /&gt;
channel is already open.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 2 indicates that a Model 204 CRAM interface module, such as CRFS or CRIO, received an unexpected post&lt;br /&gt;
code from CRAM while attempting an I/O operation on a channel. The message&lt;br /&gt;
shows the post code and the operation attempted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Possible return codes include the following values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;INVALID FUNCTION&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;CB FORMAT ERROR&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN MAST) CHANNEL ALREADY OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN USER) NO USER LINES FREE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN) SUBTASKS NOT PROPERLY OPENED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) ICB NOT OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) OTHER TASK HAS DIED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) UNEXPECTED COMMAND&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;28&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;NOT ENOUGH STORAGE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;99&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;There is no SVC defined in the IGCLM244 module and the XMEMOPT ’80’ bit must be set for an SVC-less installation&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;110&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(VMCF WRITE) MESSAGE LIMIT EXCEEDED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Contact Technical Support and have the audit trail available.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 80 80 AUDITER NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0349: Login failed &amp;lt;br /&amp;gt; (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;alternative text&amp;lt;/var&amp;gt;) Enter logoff===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Either you entered an invalid userid, or the password for the userid is incorrect. If an external authorizer is active, you may not be authorized to use Model 204, or you may have entered an invalid account code if account validation is active. &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Available with zap 75Z279:&amp;lt;/b&amp;gt; The &amp;quot;Enter logoff&amp;quot; text is displayed for this message if the &amp;lt;var&amp;gt;[[CUSTOM parameter|CUSTOM]]&amp;lt;/var&amp;gt; parameter is set to 19.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Retry the login with a valid user ID and the correct password. If you are still unable to log in, contact your system manager to verify your userid and password. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; Issue the LOGLST command to determine if the user has a user ID and, if so, find out his or her password from your hardcopy file record and give the correct password to the user. If you do not have any record of the password or if the user ID does not exist, change the entry or add a new entry to the password table for the user with the LOGCTL command. &lt;br /&gt;
&lt;br /&gt;
If an external authorizer is active (ACF2, Security Server (formerly RACF), Top Secret), use the appropriate commands for that system to verify that the user is a valid system user. &lt;br /&gt;
If Model 204 is validating the authority of the user to enter the system, verify that the user has the appropriate authorization. In addition, if the default user ID has been set to blanks, or, if the default user ID cannot log in, no CCASTAT defined users may log in. &lt;br /&gt;
&lt;br /&gt;
Finally, if account validation is active, ensure that the userid has the authority to use the account code that was entered. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0434: NJBUFF set to %C===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The NJBUFF parameter was set to an invalid value. NJBUFF must be equal to:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One (1), or &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of the NSERVS parameter, plus NSUBTKS parameter, plus 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;NJBUFF specifies the number of journal buffers allocated by Model 204 during initialization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify the system manager. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; Reset the NJBUFF parameter to a valid value and rerun Model 204.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; I 0 0 AUDITAD&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0761: ATRPG*ASTRPPG exceeds &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxentries&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; You attempted to initialize a file that was created with invalid parameters. The number of dictionary entries is determined by the product of the parameters ATRPG and ASTRPPG. The maximum allowed product is 4000 (attribute dictionary entries), or 32000 for a FILEORG=x&#039;100&#039; file. The INITIALIZE command is rejected.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; The file must be recreated. Retry the CREATE command specifying ATRPG and ASTRPPG parameter values such that the product of the two is less than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxentries&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0790: File too big===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The total number of records possible in Table B exceeds 342 segments for files that do not have the FILEORG X&#039;200&#039; bit set and 1024 segments for files that have the FILEORG X&#039;200&#039; bit set.                           &lt;br /&gt;
The number of potential record numbers per segment is 49,152.             &lt;br /&gt;
The number of possible segments in Table B is calculated by the following formula:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((BSIZE * BRECPPG) / 49,152)) + (1 if remainder not 0)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
If the result exceeds 342 or 1024 respectively too many segments result and MODEL 204 rejects the CREATE command. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Make the file smaller (by specifying a smaller BSIZE or smaller BRECPPG), or divide the file into smaller pieces and use the file group feature to process them as a single logical file.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0797: BSIZE*BRECPPG exceeds maximum value===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The product of BSIZE and BRECPPG must not exceed 16,777,216 for regular Model 204 files (which do not have the FILEORG X&#039;200&#039; bit set) and 50,331,648 for files that have the FILEORG X&#039;200&#039; bit set. These numbers specify the maximum number of records allowed in a single Model 204 file. &lt;br /&gt;
&lt;br /&gt;
The CREATE or INCREASE command is rejected.        &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Retry the command, specifying values for BSIZE and BRECPPG so that BSIZE*BRECPPG does not exceed the limit. See [[Managing file and table sizes]] for more information.                                                                      &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1050: CCATEMP full: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;operation&amp;lt;/var&amp;gt; or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pooltype&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The operation being performed required an extra page from CCATEMP, but there were no free pages available. CCATEMP is defined by the system manager and provides a set of work pages that are assigned on request to various users. If a request gets this message, it might be because some other user is holding a large number of CCATEMP pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The message specifies either the operation being performed, or the section (&amp;quot;pool&amp;quot;) of CCATEMP that was full.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;operation&amp;lt;/var&amp;gt; can be one of:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;$BLDPROC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;quot;USE PROCEDURE&amp;quot; COMMAND&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE INITIALIZING SORT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FOR FRV KEYS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE GENERATING RECORDS TO BE SORTED&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE GENERATING ORDERED INDEX SORTED RECORDS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE PERFORMING SORT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pooltype&amp;lt;/var&amp;gt; can be one of:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SMALL MODEL PAGE POOL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SMALL MODEL PAGE POOL AND EXPANSION PAGE POOL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
The current request is cancelled.&lt;br /&gt;
&lt;br /&gt;
If the operation was $BLDPROC or USE PROCEDURE COMMAND, then the temporary procedure that was being written is deleted, except for its very last CCATEMP page, which is retained for information purposes.&lt;br /&gt;
&lt;br /&gt;
In some cases the user is restarted and, if the user was in the process of updating any files, MODEL 204 marks them physically inconsistent.&lt;br /&gt;
&lt;br /&gt;
CCATEMP pages below 64K are allocated from the small model pool.&lt;br /&gt;
CCATEMP pages above 64K are allocated from the expansion area pool.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pooltype&amp;lt;/var&amp;gt; specified in the message indicates whether you exceeded the capacity of the small model pool or both the small model and expansion area pools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify your system manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager response:&amp;lt;/b&amp;gt; Recover the physically inconsistent files using one of the following procedures:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Roll back/roll forward&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File reorganization procedure described in [[File reorganization and table compaction]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESTORE command for restoring previously dumped copies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
This message is informational, but it indicates a need to increase the space allocation for CCATEMP. As the size of CCATEMP is fixed at initialization, it is necessary to bring down MODEL 204 to increase it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; E 60 60 AUDITAD CANCEL NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1052: LOUTPB %C TO %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039;&lt;br /&gt;
LOUTPB has been increased or decreased, to the value given in the message.&lt;br /&gt;
With a full-screen terminal the value is 1.5 times the minimum for that model number, rounded&lt;br /&gt;
up to a multiple of 8.&lt;br /&gt;
A model 2 terminal results in a LOUTPB of 3200.&lt;br /&gt;
A model 5 terminal results in a LOUTPB of 5664.&lt;br /&gt;
&amp;lt;p&amp;gt;If NBKPG is greater than 0, the largest allowable value for LOUTPB is PAGESZ&lt;br /&gt;
minus 40, so the value can be decreased for this reason.&amp;lt;/p&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Response:&#039;&#039;&#039; No response is needed. This message is for information only.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITAD&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1060: %C not allowed with non swappable servers===&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The service requested is not compatible with non-swappable servers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Remove any non-swappable server settings and restart Model 204 to repeat the service.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1131: Can&#039;t &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;action&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The procedure action cannot be taken for one of the following reasons:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The procedure is in use by another user.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The procedure is not in the file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user does not have the correct privileges to change the procedure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a RENAME or ASSIGN has been attempted, the alias might already exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; Make sure that the procedure name is spelled correctly.&lt;br /&gt;
If the named procedure is in use, retry the command when the procedure is no longer in use.  Otherwise, arrange to place the&lt;br /&gt;
procedure in the file or to obtain the privileges to change the procedure.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 SUFFIX AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The return codes for message M204.1149 have changed.&lt;br /&gt;
&lt;br /&gt;
===M204.1149: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parameter_name&amp;lt;/var&amp;gt; has been set to its minimum|maximum value: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; You have attempted to reset a parameter either below the minimum or above the maximum allowed for it. Model 204 has reset the parameter to the correct minimum or maximum. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; Retry the command with a value within the correct range, or leave the value as is, since Model 204 has already reset the parameter to the correct minimum or maximum. &lt;br /&gt;
&amp;lt;p&amp;gt;For PARAMETER=ESIZE, if you specify:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A zero value, which is the equivalent of Not Applicable, no pages are allocated for Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A non-zero value, then the minimum of 20 pages allocated for Table E is enforced.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1167: ITBL full -- argument string ignored===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; Model 204 stores the arguments passed by the &amp;lt;var&amp;gt;INCLUDE&amp;lt;/var&amp;gt; command ($READ and dummy string (??) responses) in the ITBL server table. If the storage allocated to ITBL is too small to accommodate the number and size of the arguments being passed, the argument string is ignored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example: &lt;br /&gt;
In your include command &amp;lt;code&amp;gt;INCLUDE HOTEL,GRAND,BUDAPEST&amp;lt;/code&amp;gt;, the procedure named HOTEL is being passed the arguments GRAND and BUDAPEST. However, the M204.1167 message indicates that the storage allocated to ITBL is too small to accommodate those arguments. Consequently, the argument string &amp;lt;code&amp;gt;GRAND,BUDAPEST&amp;lt;/code&amp;gt; is ignored. You will be prompted to provide those arguments, one at a time, as required for the number of $READ statements and dummy string substitutions encountered in the procedure.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Use the &amp;lt;var&amp;gt;[[VIEW command|VIEW]] LITBL&amp;lt;/var&amp;gt; command to determine the current size of ITBL; then use the &amp;lt;var&amp;gt;[[UTABLE command|UTABLE]] LITBL&amp;lt;/var&amp;gt; command to increase its size.  A 10-20% increase should be sufficient in most cases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1260: {Field|Fieldgroup} was previously defined with different attributes, new {field|fieldgroup} options ignored===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A &amp;lt;b&amp;gt;DEFINE FIELD&amp;lt;/b&amp;gt; or a &amp;lt;b&amp;gt;DEFINE FIELDGROUP&amp;lt;/b&amp;gt; command has attempted to define an existing field or field group with different attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; To redefine the attributes of the field or field group, you must issue the &amp;lt;b&amp;gt;REDEFINE FIELD&amp;lt;/b&amp;gt; or the &amp;lt;b&amp;gt;REDEFINE FIELDGROUP&amp;lt;/b&amp;gt; command. Notify your file manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1307: %C logon rejected - &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason text&amp;lt;/var&amp;gt; (reason code: %X)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The MODEL 204 3270 terminal handler has rejected a logon request from a 3270 terminal for the reason stated. The following reason codes are defined:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There are no control blocks available for new logons. Increase the number of IODEV 7 terminal definitions. The reason text is: NOT ENOUGH 3270 TERMINALS.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal has been defined with a non-3270 transmission services profile. The LU type must be 2.  The reason text is: LU TYPE NOT = 2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal has been defined to require definite responses to messages it sends inbound to the host. The transmission services profile must be 3. &amp;lt;br&amp;gt;&lt;br /&gt;
The reason text is: TS PROFILE NOT = 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There has been an error on this terminal. This is a retryable error. The reason text is: LOSTERM SET FOR THIS TERMINAL.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal definition is in use. This error should not occur. The reason text is: TERMINAL ALREADY IN USE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Contact your VTAM systems programmer to correct the VTAM definition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 4 AD SAVE NOTERM OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.1346: Server area greater than cylinder capacity for this device. Cylinder size = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; BYTES.===                                               &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt;                                                                    &lt;br /&gt;
The number of bytes specified for the largest server area (SERVSIZE)      &lt;br /&gt;
is greater than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;, the number of bytes contained in a cylinder for    &lt;br /&gt;
the type of disk device on which your CCASERVR (CCASRVR for DOS) data set resides.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Do one of the following:                                                  &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ensure that the largest SERVSIZE value does not exceed &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;           &lt;br /&gt;
&amp;lt;li&amp;gt;place your server data sets on a type of disk device that has a         &lt;br /&gt;
larger cylinder capacity&amp;lt;/li&amp;gt;                                                  &lt;br /&gt;
&amp;lt;li&amp;gt;place CCASERVR in storage. (See the &amp;quot;CCASERVR in Storage feature&amp;quot; section in the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 System Manager&#039;s Guide&amp;lt;/var&amp;gt;.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 96 96 AUDITER      &lt;br /&gt;
----&lt;br /&gt;
===M204.1381: (new informational message for REGENERATE)===&lt;br /&gt;
M204.1381 is a new informational  message issued during REGENERATE to help verify that the journal data provided in CCAGEN is from the correct CCAJRNL.  &lt;br /&gt;
&lt;br /&gt;
The 58 bytes printed are the journal header of each journal block. (Journal headers are described in the [[Using system statistics#Header entries (Type 0)|Header entry formats]] table.)  &lt;br /&gt;
&lt;br /&gt;
The message has four variations, which always appear:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;M204.1381: CCAGEN: FIRST 5 CCAJRNL BLOCKS + LAST BLOCK IN HEX&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The first 58 bytes, in hex, of the first five CCAJRNL blocks and the last CCAJRNL block read from CCAGEN follow in CCAAUDIT.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;M204.1381: PASS1:&amp;lt;/b&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hex representation of data&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;M204.1381: LASTB:&amp;lt;/b&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hex representation of data&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;M204.1381: CCAGEN BLOCK COUNT: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnnn&amp;lt;/var&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The count of CCAJRNL blocks read from CCAGEN.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;  &lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows the first 5 CCAJRNL blocks and the last block read from CCAGEN during pass 1 of REGENERATE.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.1381: CCAGEN: FIRST 5 CCAJRNL BLOCKS + LAST BLOCK IN HEX&lt;br /&gt;
M204.1381: PASS1: 006000020113214F155421910000000000CB...            &lt;br /&gt;
M204.1381: PASS1: 0AD000020113214F155421910000000100CB...            &lt;br /&gt;
M204.1381: PASS1: 07BF008A0113214F155421920000000200CB...            &lt;br /&gt;
M204.1381: PASS1: 0B5E00020113214F155422000000000300CB...            &lt;br /&gt;
M204.1381: PASS1: 0AAF00120113214F155422030000000400CB...            &lt;br /&gt;
M204.1381: LASTB: 00C900020113214F155930280000337100CB...   &lt;br /&gt;
M204.1381: CCAGEN BLOCK COUNT: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;....&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;                                                  &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; This message is informational only; no response is required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; I 0 0 AUDITAD&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1382: Chunk size &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt; used: flags=X&amp;quot;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt;&amp;quot;, low=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt;, high=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;This is a debugging error message. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Response: &amp;lt;/b&amp;gt;No response is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; I 0 0 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1387: Allocate failed; DDNAME=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;,DSNAME=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname&amp;lt;/var&amp;gt; could not be located===    &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; An attempt to allocate an existing data set, data set name=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname&amp;lt;/var&amp;gt;, failed because the specified dsname was not found in the catalog or the catalog could not be accessed.&amp;lt;/p&amp;gt;  &lt;br /&gt;
M204.1387 replaces &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.1070: ALLOCATE FAILED - &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt; with additional information regarding the failure of the ALLOCATE command. However, M204.1070 remains in use by Janus/TCPIP for a different purpose. &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Correct the data set name or ensure that the data set exists and is cataloged.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1388: CHUNK size exceeds maximum of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;On a DEFINE field command, the chunk size specified is too large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;User response: &amp;lt;/b&amp;gt;Specify a chunk size less than or equal to the maximum.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return codes: &amp;lt;/b&amp;gt;C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1393: CHUNK clause not of format &amp;quot;CHUNK &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkSize&amp;lt;/var&amp;gt; FOR &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkTarget&amp;lt;/var&amp;gt;&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the syntax of the CHUNK clause was not in the format shown in this message.                                                   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the incorrect CHUNK clause syntax.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1394: CHUNK &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkSize&amp;lt;/var&amp;gt; value invalid: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the value specified for the size of a CHUNK is invalid;  &lt;br /&gt;
&amp;quot;reason&amp;quot; indicates why. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK size.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1395: CHUNK target field invalid type: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the field specified as a CHUNK target is not a field type that can be used as a chunk target, for the reason specified. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command containing the invalid CHUNK target type.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1396: CHUNK fields must be INVISIBLE ORDERED NUMERIC===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, an attempt was made to create a CHUNK field that was not INVISIBLE ORDERED NUMERIC, which is a requirement of chunk fields. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK target type.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1397: A CHUNK field was defined, %F may no longer be opened with M204 releases prior to V7R5===&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; This is an informational message. No action is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1399: Same server area defined for server above the bar and non swappable server===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;The same server table has been defined in SERVNSA and SERVGA.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Correct the SERVNSA and/or SERVGA settings. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1400: Server areas ATB require server swapping in memory===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;Parameters indicated that server areas ATB were used in the run where CCASERVR data set was defined.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039;  Either remove the server areas ATB parameters or use server swapping in memory.    &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1402: Invalid value for chunk target: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fname&amp;lt;/var&amp;gt;=&#039;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;val&amp;lt;/var&amp;gt;&#039;; values must be -999999999999999 -&amp;gt; 999999999999999===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;If a chunk target is any field type besides DATETIME, any value stored in it must be within the range shown in the error message.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Response: &amp;lt;/b&amp;gt;Correct the value being stored.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Correct the value being stored.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1403: Increase SERVGSZ to at least %C for required ATB server areas===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;The total size of ATB server areas is larger than the ATB server size defined in SERVGSZ.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User Response:&#039;&#039;&#039; If the message is issued by the UTABLE command, decrease the size of the ATB server areas.       &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; If the message is issued at initialization, either increase SERVGSZ or decrease the ATB server area size.    &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 80 80 AUDITAD OPR &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1412: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;service&amp;lt;/var&amp;gt; not allowed with ATB servers===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;The requested service is not compatible with ATB (above the bar) servers.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Remove the ATB server parameters and restart Model 204.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1433: CCAGEN: IS EMPTY ¦ CCAGEN: PERMANENT I/O ERROR===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; There were no valid records found in the journal(s) pointed to by CCAGEN, or a permanent I/O error was encountered.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Verify that you have the correct journal(s) for the run. If I/O errors were detected while reading in CCAGEN, the appropriate error messages will have been issued before this message. Correct the error and rerun media recovery. If the problem remains unclear, contact Technical Support and have the following documentation available:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Audit trail&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Snap dump&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTILJ output for CCAGEN dataset&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1489: Not enough file space to continue procedure definition - %F===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; There is no room in the file to store the procedure being entered with the PROCEDURE command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;If…&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Then Model 204…&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Error occurs after the first line of procedure text has been stored&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Keeps the partial procedure&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;You are entering the text at your terminal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Ends procedure definition immediately&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Procedure text is supplied by another procedure&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Flushes the remainder of the input&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Procedure text is supplied in a batch input stream (CCAIN)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Flushes the remainder of the procedure text and resumes processing after the END PROCEDURE command&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Create space in the file by deleting unwanted procedures or increasing Table D with the INCREASE command. Replace the partial procedure using the PROCEDURE command, or use the EDIT command to supply the missing text.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===M204.1508: %&amp;lt;C userid&amp;gt; is not authorized to use Model 204=== &lt;br /&gt;
Message M204.1508 has been updated to include the actual user ID of the unauthorized user.&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; This user ID does not have the authority to use Model 204.  Login authorization to Model 204 is defined by your installation security officer or system manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Ask your installation security officer or system manager to authorize you for logging into Model 204.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; Contact the installation security officer or issue the appropriate external security system commands to give the user’s logon ID the authority to use Model 204. Refer to the [[Security_interfaces_overview|Security interfaces pages]] for instructions.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1587: FSCB full, IMAGE too large: LFSCB required = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;num&amp;lt;/var&amp;gt;, bytes available in FSCB = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;num&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The value specified in an &amp;lt;var&amp;gt;Identify&amp;lt;/var&amp;gt; statement with&lt;br /&gt;
the &amp;lt;var&amp;gt;Len&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;Occurs&amp;lt;/var&amp;gt; option causes the size of the associated &amp;lt;var&amp;gt;Image&amp;lt;/var&amp;gt; to&lt;br /&gt;
overflow the full screen buffer (FSCB). The FSCB is a server work area&lt;br /&gt;
that is used to hold a compiled Image definition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Use the &amp;lt;var&amp;gt;VIEW LFSCB&amp;lt;/var&amp;gt; command to determine the current&lt;br /&gt;
size of the FSCB. Use the &amp;lt;var&amp;gt;UTABLE&amp;lt;/var&amp;gt; command to increase the value of the&lt;br /&gt;
&amp;lt;var&amp;gt;LFSCB&amp;lt;/var&amp;gt; parameter. Check the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; request for programming errors&lt;br /&gt;
that might cause the value specified in the &amp;lt;var&amp;gt;Identify&amp;lt;/var&amp;gt; statement to be&lt;br /&gt;
too large. Retry the request.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Return Codes: &#039;&#039;&#039;C 0 4 CANCEL AUDITER &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1589: Maximum IMAGE length is 32767: LFSCB required = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;num&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; An attempt has been made to define an image greater than 32K.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Redefine the image so that it is not greater than the maximum length of 32767.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
===M204.2126: User&#039;s pushdown list overflowed===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The user&#039;s pushdown list is an internal stack for maintaining state information for user threads across internal Model 204 subroutines. The user pushdown list lives in each user&#039;s server.  Its size requirement depends on the complexity of the command or User Language request.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This message is issued whenever Model 204 detects that pushdown list data has spilled into adjacent control structures.  Because of potential corruption the user is restarted.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Increase the size of the user pushdown list by using the LPDLST parameter of the UTABLE command.  Notify your system manager.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; If this becomes a frequent occurrence, consider more permanent changes to LPDLST and SERVSIZE, since the pushdown list is a server component.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
===M204.2329: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;subsystem_name&amp;lt;/var&amp;gt; at &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;location_name&amp;lt;/var&amp;gt; unavailable===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The indicated subsystem at the specified node is not available for use due to one or more errors occurring at the specified node during start or login processing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify the system manager or try again later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; If the subsystem is started, stop the subsystem and resolve communications errors or other errors which occurred at the specified node. After resolving error, use the START SUBSYSTEM command to make the subsystem available for general use. Check to make sure that the LOCATION parameter was set properly in the CCAIN input stream for the Online.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2551: {FPL|FCT PG1} is invalid for file: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; If the message says FPL, then the FPL (file parameter list) for the associated file is invalid. This could be the result of an incorrect DD, FILEDEF or DLBL statement.                                              &lt;br /&gt;
&lt;br /&gt;
If the message says FCT PG1, then the existence page array page is invalid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File manager response:&#039;&#039;&#039; If the DD, FILEDEF or DLBL statement is correct and points to the correct data set, then the file must be restored from a backup.         &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2651: Not all threads processed for IODEV %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The run is terminated because either:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of threads specified by NUSERS has been initialized, but there are fewer users of the specified IODEV type than expected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DUPTERM number specified by the IODEV card could not be initialized because it exceeded the number of NUSERS.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Check that NUSERS matches the total of the listed IODEVs, plus one extra for USER 0. Check also the NOTERM/DUPTERM parameter for the specified IODEV card.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 80 80 ER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2719: Open %C failed. Update statements already compiled, read only privileges insufficient===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The OPEN or OPENC User Language statement was issued from a request to reopen a file with read-only privileges. However, that request had already been compiled with update statements against the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; In a User Language request, you cannot use the User Language OPEN or OPENC statement to reopen a file with read-only privileges, if that request contains updates statements against the same file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2739: Parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; cannot be reset on user 0’s parameter line: value ignored===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; You reset parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; on the User 0 parameter line, but the parameter cannot be set there. The value is ignored, the default value for this parameter remains in effect.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Remove &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; from the User 0 parameters, since it will not change the value of the parameter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; E 0 4 AD&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2746: XSIZE*XRECPPG may not be 1 nor exceed 536870911===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The product of XSIZE and XRECPPG must not exceed 16777216 times 32 minus one, or 536870911. This specifies the maximum number of extension records allowed in a single Model 204 file when using Table X. Also, setting both XRECPPG and XSIZE to 1 is invalid.&amp;lt;/p&amp;gt;&lt;br /&gt;
The CREATE command is rejected.&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Retry the command specifying values for XSIZE and XRECPPG whose product does not exceed the 526870911 limit. Refer to the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 File Manager’s Guide &amp;lt;/var&amp;gt;for more information on file sizes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2774: Another &amp;lt;i&amp;gt;command&amp;lt;/i&amp;gt; command is in progress===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; An INCREASE or DECREASE command or auto increase is taking place while another INCREASE, DECREASE, or auto increase has not finished yet.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;File manager response:&amp;lt;/b&amp;gt; Repeat the command after the completion of the auto increase or previous INCREASE or DECREASE command. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2826: %F %C compaction not allowed===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; An attempt was made to compact a file created prior to Model 204 version 6.3.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Reorganize the file using Model 204 version 6.3.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2831: Updates to DTS files not supported in this environment===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; DTS files cannot be updated in IFAM, SQL, or PQO environments.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Do not attempt to update DTS file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
===M204.2833: Fields cannot be defined in a file with ATRPG*ASTRPPG&amp;amp;gt;4000===&lt;br /&gt;
&amp;lt;p&amp;gt;Return Codes: C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2836: Value of parameter %C invalid—reset to %C===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This is an informational message only.&lt;br /&gt;
&lt;br /&gt;
A parameter was specified with an incorrect value. It has been reset to an internally calculated value that will accommodate other parameter settings. See the description of the parameter named to see what that calculation involves.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; The parameter has been reset. No response is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2838: %C only valid in FILEORG X’100’ files===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2839: %C is a %C, not a %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
===M204.2841: Remote fieldgroups not supported=== &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
===M204.2842: Invalid context for fieldgroup===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----									&lt;br /&gt;
===M204.2843: Maximum fieldgroup id exceeded in record %R in %F===&lt;br /&gt;
&amp;lt;p&amp;gt;Return Codes: C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----								&lt;br /&gt;
===M204.2844: Mix of fields and fieldgroups, name &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2845: Invalid fieldgroup context for %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The $function was used outside of field group context.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt;C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2846: Invalid fieldgroup context for %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2847: Fieldgroup context lost in record %R in %F===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2848: Invalid fieldgroup id: %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2849: Required keyword %C missing===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;X 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2850: %C value missing===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2851: %C value &amp;amp;quot;%C&amp;amp;quot; too big, must be &amp;amp;lt;%C bytes===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2852: Update to missing fieldgroup occurrence in record %R in %F===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2853: %C not allowed for EXACTLY-ONE field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2854: Attempt to do %C for EXACTLY-ONE field: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2855: Field depth+length unrepresentable in record %R in %F===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2856: Fieldname variable %C: expected %C, got %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2857: %C field not allowed for %C field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2858: Fieldgroup context mismatch between COUNT-OCCURRENCES-OF field and counted field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2859: New automatic field not allowed for non-empty file===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2860: Field %C already has a COUNT-OCCURRENCES-OF field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2861: Occurrence counter %C overflowed===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2862: Attempt to update automatic field %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 SUFFIX ECHO&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2863: Attempt to do %C for automatic field: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2865: Attempt to %C invalid datetime value: %C = %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
											&lt;br /&gt;
===M204.2866: File already has %C field===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2867: Fieldgroup %C already has %C field===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; If you try to define a second update tracker field of the same type for the same field group, you will invoke message 2867, where %C represents:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C O 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2868: MINLOBE must be between 0 and %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2869: Change refused: MINLOBE &amp;gt; 0 for File &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; field &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2870: Change refused: MINLOBE &amp;gt; 0 for File &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; field &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2871: Fieldgroup context mismatch between CONCATENATION-OF field and COMPONENT field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2872: Concatenation value too long for field %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2873: Concatenation field %C component field %C contains separator character===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2874: Attempt to %C a value that&amp;amp;#39;s %C: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2875: Concatenation list invalid: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2876: Invalid %C value: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2877: WITH clause invalid: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: C 0 4 ECHO&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2878: WITH clause invalid: field %C in %F %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2879: Remote id %C mode %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: I 0 0 SAVE NOTERM OPR&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2880: Memory datasets cannot be part of multi-dataset file===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: C 0 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2881: Data conversion error===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2882: Recovery journal (CCARF) version %C is not supported===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;A CCARF data set was provided as input to a recovery step, but that CCARF data set was produced by a different version of Model 204 than the version that is running recovery.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Correct the data set name referenced in CCARF and ensure that it was produced by the version of Model 204 that you are using to run recovery.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return codes: &amp;lt;/b&amp;gt;E 52 52 OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2883: Mix of journal versions in recovery CCARF===&lt;br /&gt;
&amp;lt;b&amp;gt;Return codes: &amp;lt;/b&amp;gt;E 52 52 SNAP OPR    &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2884: {Field|Fieldgroup} was previously defined as a {fieldgroup|field}, new definition ignored===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2885: Invalid fieldgroup id: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldgroup&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2886: Fieldgroup id %C already exists in record %R in %F===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2903: FILEORG=X&amp;amp;#39;100&amp;amp;#39; is not supported during FLOD/FILELOAD===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 8&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2916: %C requires at least one area to be set in %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; When the size of a non-swappable server area is indicated (SERVNSSZ), at least one non-swappable server area must be indicated in SERVNSA.              &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Operator response:&#039;&#039;&#039; Correct the SERVNSA parameter setting.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2921: Server areas above the bar are not supported in VSE===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Non-swappable server areas ATB are not supported in VSE.                 &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Operator response:&#039;&#039;&#039; Remove the parameters for non-swappable server areas.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2922: %C bit setting is not valid===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The bit setting in [[SERVNSA parameter|SERVNSA]] is not valid. &lt;br /&gt;
&amp;lt;br&amp;gt;For release 7.4, valid bits are: X&#039;02000000&#039;  &lt;br /&gt;
&amp;lt;br&amp;gt;For release 7.5, valid bits are: X&#039;02000000&#039;, X&#039;00800000&#039;, X&#039;00004000&#039;, and X&#039;00002000&#039;                    &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Operator response:&#039;&#039;&#039; Correct the SERVNSA setting.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2933: Module version mismatch, KOMM=%C, %C=% C===&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 SNAP&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===M204.2934: FILEORG X&amp;lt;nowiki&amp;gt;&#039;200&#039;&amp;lt;/nowiki&amp;gt; not supported for hashed or sorted file organizations===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Hashed or sorted files must be 16M files. The CREATE FILE command   &lt;br /&gt;
is rejected. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Remove the conflicting FILEORG parameter and reissue CREATE FILE.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2935: {CHUNK|CHUNK target} fields may not be RENAMED or DELETED===&lt;br /&gt;
&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Do not attempt to RENAME or DELETE chunks or chunk targets.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2936: A CHUNK field of size &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; already exists for this field===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; For a given CHUNK target field, duplicate chunk sizes are not permitted. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD that caused the message.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2937: CHUNK SIZE: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; is not an integral multiple/divisor of the existing CHUNK size: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; A CHUNK field&#039;s chunk size must be an integral multiple/divisor of all other chunk&#039;s sizes for a given chunk target.  &lt;br /&gt;
&amp;lt;br&amp;gt;This message identifies the existing chunk size that conflicts with the new one.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD that caused the message.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2938: You may not define more than %C chunks for a field===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; A given chunk target can have at most 20 chunks defined. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Do not try to define more than 20 CHUNK fields for any given CHUNK target field.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2939: %C has been set to its %C value: %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; &amp;lt;i&amp;gt;TBD&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2940: Use of filename after INITIALIZE keyword discouraged because it gave different results prior to version 7.5===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt;&lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if it was anything other than KEEPDEF[S], it  was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you have entered the name of the file being initialized AFTER the INITIALIZE command keyword, you can either correct the command (that is, remove the filename after the INITIALIZE command keyword) or use the MSGCTL M204.2940 command as described below so that the command can continue to work.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; The most direct response is to correct the command to conform to the proper syntax, that is, remove extraneous strings after the INITIALIZE command keyword.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager has chosen to keep the filename after the INITIALIZE command keyword, and the filename is the same as the name of the file being initialized, you can have the following command executed at any time before the INITIALIZE command is executed:&lt;br /&gt;
    &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2940 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Issuing the above MSGCTL command with version 7.5 of Model 204 will not present any risk of an incorrect operation of INITIALIZE. &lt;br /&gt;
A word of caution, however: In prior versions of Model 204, a filename after the INITIALIZE command keyword is NOT checked against the name of the file being initialized. Therefore the use of the filename after the INITIALIZE command keyword could be a risky practice if such a command might be used in a prior version of Model 204. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2941: File being initialized does not match name given after INITIALIZE command: %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; &lt;br /&gt;
This message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt;     &lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if it was anything other than KEEPDEF[S], it was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases, users have entered the name of the file being initialized AFTER the INITIALIZE command keyword, but this message indicates that whatever string you entered after the INITIALIZE command keyword is not the name of the file being initialized. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response: &#039;&#039;&#039;&lt;br /&gt;
Correct the command. The most direct response is to correct the command to conform to the proper syntax: that is, remove extraneous strings after the INITIALIZE command keyword. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
However, if the system manager has performed a MSGCTL M204.2940 NOCOUNT command, and you want to enter the correct filename on the INITIALIZE command, that will allow the INITIALIZE operation to  proceed. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System manager response: &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;If the file manager is unable to correct the INITIALIZE command, you can have the following commands executed at any time before the INITIALIZE command is executed:                                                                         &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2940 NOCOUNT&lt;br /&gt;
MSGCTL M204.2941 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
These actions represent a very special case for the NOCOUNT option of MSGCTL. &lt;br /&gt;
&amp;lt;br&amp;gt;Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but it does not directly affect the operation which issued the error message.   &lt;br /&gt;
&amp;lt;br&amp;gt;For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;Issuing MSGCTL M204.2941 NOCOUNT is not recommended, because this results in what might appear to be checking of the filename when in fact it is not checked.                                             &lt;br /&gt;
&amp;lt;br&amp;gt;Issuing MSGCTL M204.2940 NOCOUNT does not present any risk with version 7.5 of Model 204, but, as discussed in the System Manager response section of message 2940, this practice should be done with caution. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2942: Extraneous string after field attribute list: %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the INITIALIZE command as entered for a hashed, sorted, or record security file does not conform to the syntax of: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE&lt;br /&gt;
[SORT fldName (attributes)]&lt;br /&gt;
[HASH fldName (attributes)]&lt;br /&gt;
[RECSCTY fldName (attributes)]&amp;lt;/p&amp;gt;&lt;br /&gt;
In particular, it indicates that some string followed the right parenthesis (&#039;)&#039;) of the attribute list.&lt;br /&gt;
Prior to version 7.5, nothing after the closing parenthesis was checked.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the command. There should be no string after the right parenthesis.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager is unable to correct the INITIALIZE command, you can have the following command executed at any time before the INITIALIZE command is executed:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2942 NOCOUNT &amp;lt;/p&amp;gt;                                           &lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL. Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message. &lt;br /&gt;
&amp;lt;br&amp;gt;For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;Issuing MSGCTL M204.2942 NOCOUNT is not recommended, because if you issue this command the string after the right parenthesis will not be analyzed.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2943: Error using filename phrase for file %C: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;restriction&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:&lt;br /&gt;
    &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt; &lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if it was anything other than KEEPDEF[S], it was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases, users have entered the name of the file being initialized AFTER the INITIALIZE command keyword, but this message indicates that the syntax requires some modification for the particular file being initialized. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; The command should be corrected; the most direct response is to correct the command to conform to the proper syntax, that is remove extraneous strings after the INITIALIZE command keyword. &lt;br /&gt;
However, if the system manager has performed a MSGCTL M204.2940 NOCOUNT command, you can modify the command as indicated by the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;restriction&amp;lt;/var&amp;gt; shown in the M204.2943 text.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager is unable to correct the INITIALIZE command, you can have the following commands executed at any time before the INITIALIZE command is executed:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2940 NOCOUNT&lt;br /&gt;
MSGCTL M204.2943 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL. Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Issuing MSGCTL M204.2943 NOCOUNT is not recommended, because this bypasses the checking that is intended by the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;restriction&amp;lt;/var&amp;gt; shown in the M204.2943 text.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Issuing MSGCTL M204.2940 NOCOUNT does not present any risk with version 7.5 of Model 204, but, as discussed in the system manager response for M204.2940, this practice should be done with caution. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2944: Should have end of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command but instead found: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the command indicated by cmd as entered does not conform to command syntax. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User response:&#039;&#039;&#039; Correct the command, either by simply removing string and any following strings or else by correcting the command to conform to the proper syntax.       &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; If the cmd in the M204.2944 text is INITIALIZE, this message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt;&lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if the text was anything other than KEEPDEF[S], it was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
The command should be corrected as described in the user response above.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager is unable to correct the INITIALIZE command, you can have the following command executed at any time before the INITIALIZE command is executed:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2944 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL. Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message.   &lt;br /&gt;
                                                                   &lt;br /&gt;
For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.  &lt;br /&gt;
&lt;br /&gt;
Issuing MSGCTL M204.2944 NOCOUNT is not recommended, because whatever string was indicated on the INITIALIZE command is not checked.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
 &lt;br /&gt;
===M204.2945: Error encountered, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command not performed===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This counting error message indicates that the processing of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command was not performed. This message should be preceded by one or more messages. (If the preceding messages were not counting error messages, they might not have been displayed on the user&#039;s terminal, depending on the MSGCTL parameter setting.) &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User response:&#039;&#039;&#039;  Correct any conditions indicated by the preceding messages.   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
 &lt;br /&gt;
===M204.2946: Error encountered, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command not performed ===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This informational message indicates that the processing of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command was not performed. This message should be preceded by one or more messages. (If the preceding messages were not counting error messages, they might not have been displayed on the user&#039;s terminal, depending on the MSGCTL parameter setting.) &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User response:&#039;&#039;&#039;  Correct any conditions indicated by the preceding messages.   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2947: Module address &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;address&amp;lt;/var&amp;gt; length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; protected===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; This informational message is displayed during startup to show the ranges of load module protection. To see which Rocket CSECTs are being referenced, look at the module map in a snap. For more information on the load module protection facility, see the [[MODPROT parameter]] description.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; No response is required. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
==DDGEN messages==&lt;br /&gt;
===DDG017: UNABLE TO PROCESS NON-TBO FILE WITH SYSOPT=4, CHANGE FILE TO TBO OR RESET SYSOPT.===&lt;br /&gt;
===DDG018: FICREATE UNRECOGNIZABLE. DDGEN RUN CANCELLED.===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-left: 25%&amp;quot;&amp;gt;[[#toc|Up to Contents]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Release notes]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=New_and_updated_messages_in_Model_204_version_7.5&amp;diff=78683</id>
		<title>New and updated messages in Model 204 version 7.5</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=New_and_updated_messages_in_Model_204_version_7.5&amp;diff=78683"/>
		<updated>2015-07-30T23:17:42Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Was missing &amp;quot;File&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Release_notes_for_Model_204_version_7.5|Back to 7.5 Release Notes]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;noautonum&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==M204 messages==&lt;br /&gt;
===Mixed case messages by default===&lt;br /&gt;
As of version 7.5, all Model 204 messages are issued with mixed case text by default unless [[UPCASMSG parameter|UPCASMSG]] is set.&lt;br /&gt;
===M204.0141: Bug .. duplicate file name in cp record===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A duplicate file name was encountered while attempting to add a deferred update dataset to the file directory during recovery. This indicates a potential problem in the Model 204 software.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Contact Technical Support with the following documentation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Audit trail from the previous run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Journal from the previous run&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 4 AD OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0204: Parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parmName&amp;lt;/var&amp;gt; obsolete and not reset===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Writing records to the SMF data set no longer requires the installation of an SVC. The&lt;br /&gt;
SMFSVC parameter is therefore obsolete and cannot be reset.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; No response required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0316: Recursive ON units exceed MAXOND: Evaluation stopped===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; During evaluation, one or more ON units was entered recursively. When the number of recursions exceeded MAXOND, the evaluation was terminated.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; This message might indicate a logic error in the program. Inform the program author.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0332 and M204.0336===&lt;br /&gt;
These messages indicate problems with the CRAM interface. &lt;br /&gt;
The visibility of these messages has been improved by:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;writing the message to the operator and the JESLOG&lt;br /&gt;
&amp;lt;li&amp;gt;writing the message as an ER line in CCAAUDIT&lt;br /&gt;
&amp;lt;li&amp;gt;setting the return code to 80&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====M204.0332: RC &#039;&#039;nn&#039;&#039; from CRFS OPEN====&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The run has failed to initialize due to problems with the CRAM interface.&lt;br /&gt;
The possible formats of this message are:&lt;br /&gt;
&lt;br /&gt;
Format 1: RC nn from CRFS OPEN/PUT/GET&lt;br /&gt;
&lt;br /&gt;
Format 2: ECB postcode from CRFS PUT/GET&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 1 indicates that Model 204 module CRFS attempted to open channel, send a message down the channel, or receive a message from a channel. CRAM was unable to satisfy the request. The message states the return code and the&lt;br /&gt;
operation attempted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 2 indicates that Model 204 module CRFS received an unexpected post code from CRAM while attempting an I/O operation on a channel. The message states the post code and the operation attempted.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Possible return codes include the following values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;INVALID FUNCTION&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;CB FORMAT ERROR&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN MAST) CHANNEL ALREADY OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN USER) NO USER LINES FREE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN) SUBTASKS NOT PROPERLY OPENED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) ICB NOT OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) OTHER TASK HAS DIED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) UNEXPECTED COMMAND&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;28&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;NOT ENOUGH STORAGE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;99&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;There is no SVC defined in the IGCLM244 module and the XMEMOPT ’80’ bit must be set for an SVC-less installation&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;110&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(VMCF WRITE) MESSAGE LIMIT EXCEEDED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Contact Technical Support and have the audit trail available.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 80 80 AUDITER NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
====M204.0336: RC &#039;&#039;nn&#039;&#039; from CRIO OPEN====&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The run has failed to initialize due to problems with the CRAM interface.&lt;br /&gt;
The possible formats of this message are:&lt;br /&gt;
&lt;br /&gt;
Format 1: RC nn from CRIO OPEN/PUT/GET&lt;br /&gt;
&lt;br /&gt;
Format 2: ECB postcode from CRFS PUT/GET&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 1 indicates that Model 204 module CRIO attempted to open a channel,&lt;br /&gt;
send a message down a channel, or receive a message from a channel. CRAM&lt;br /&gt;
was unable to satisfy the request. The message states the return code and the&lt;br /&gt;
operation attempted. For example, the return code 16 indicates that the CRAM&lt;br /&gt;
channel is already open.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Format 2 indicates that a Model 204 CRAM interface module, such as CRFS or CRIO, received an unexpected post&lt;br /&gt;
code from CRAM while attempting an I/O operation on a channel. The message&lt;br /&gt;
shows the post code and the operation attempted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Possible return codes include the following values:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th&amp;gt;Value&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;INVALID FUNCTION&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;CB FORMAT ERROR&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN MAST) CHANNEL ALREADY OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN USER) NO USER LINES FREE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(OPEN) SUBTASKS NOT PROPERLY OPENED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) ICB NOT OPEN&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;16&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) OTHER TASK HAS DIED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(READ/WRITE) UNEXPECTED COMMAND&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;28&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;NOT ENOUGH STORAGE&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;99&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;There is no SVC defined in the IGCLM244 module and the XMEMOPT ’80’ bit must be set for an SVC-less installation&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;110&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;(VMCF WRITE) MESSAGE LIMIT EXCEEDED&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Contact Technical Support and have the audit trail available.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 80 80 AUDITER NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0349: Login failed &amp;lt;br /&amp;gt; (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;alternative text&amp;lt;/var&amp;gt;) Enter logoff===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Either you entered an invalid userid, or the password for the userid is incorrect. If an external authorizer is active, you may not be authorized to use Model 204, or you may have entered an invalid account code if account validation is active. &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Available with zap 75Z279:&amp;lt;/b&amp;gt; The &amp;quot;Enter logoff&amp;quot; text is displayed for this message if the &amp;lt;var&amp;gt;[[CUSTOM parameter|CUSTOM]]&amp;lt;/var&amp;gt; parameter is set to 19.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Retry the login with a valid user ID and the correct password. If you are still unable to log in, contact your system manager to verify your userid and password. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; Issue the LOGLST command to determine if the user has a user ID and, if so, find out his or her password from your hardcopy file record and give the correct password to the user. If you do not have any record of the password or if the user ID does not exist, change the entry or add a new entry to the password table for the user with the LOGCTL command. &lt;br /&gt;
&lt;br /&gt;
If an external authorizer is active (ACF2, Security Server (formerly RACF), Top Secret), use the appropriate commands for that system to verify that the user is a valid system user. &lt;br /&gt;
If Model 204 is validating the authority of the user to enter the system, verify that the user has the appropriate authorization. In addition, if the default user ID has been set to blanks, or, if the default user ID cannot log in, no CCASTAT defined users may log in. &lt;br /&gt;
&lt;br /&gt;
Finally, if account validation is active, ensure that the userid has the authority to use the account code that was entered. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0434: NJBUFF set to %C===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The NJBUFF parameter was set to an invalid value. NJBUFF must be equal to:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One (1), or &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value of the NSERVS parameter, plus NSUBTKS parameter, plus 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;NJBUFF specifies the number of journal buffers allocated by Model 204 during initialization.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify the system manager. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; Reset the NJBUFF parameter to a valid value and rerun Model 204.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; I 0 0 AUDITAD&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0761: ATRPG*ASTRPPG exceeds &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxentries&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; You attempted to initialize a file that was created with invalid parameters. The number of dictionary entries is determined by the product of the parameters ATRPG and ASTRPPG. The maximum allowed product is 4000 (attribute dictionary entries), or 32000 for a FILEORG=x&#039;100&#039; file. The INITIALIZE command is rejected.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; The file must be recreated. Retry the CREATE command specifying ATRPG and ASTRPPG parameter values such that the product of the two is less than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxentries&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0790: File too big===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The total number of records possible in Table B exceeds 342 segments for files that do not have the FILEORG X&#039;200&#039; bit set and 1024 segments for files that have the FILEORG X&#039;200&#039; bit set.                           &lt;br /&gt;
The number of potential record numbers per segment is 49,152.             &lt;br /&gt;
The number of possible segments in Table B is calculated by the following formula:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;((BSIZE * BRECPPG) / 49,152)) + (1 if remainder not 0)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
If the result exceeds 342 or 1024 respectively too many segments result and MODEL 204 rejects the CREATE command. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Make the file smaller (by specifying a smaller BSIZE or smaller BRECPPG), or divide the file into smaller pieces and use the file group feature to process them as a single logical file.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.0797: BSIZE*BRECPPG exceeds maximum value===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The product of BSIZE and BRECPPG must not exceed 16,777,216 for regular Model 204 files (which do not have the FILEORG X&#039;200&#039; bit set) and 50,331,648 for files that have the FILEORG X&#039;200&#039; bit set. These numbers specify the maximum number of records allowed in a single Model 204 file. &lt;br /&gt;
&lt;br /&gt;
The CREATE or INCREASE command is rejected.        &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Retry the command, specifying values for BSIZE and BRECPPG so that BSIZE*BRECPPG does not exceed the limit. See [[Managing file and table sizes]] for more information.                                                                      &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1050: CCATEMP full: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;operation&amp;lt;/var&amp;gt; or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pooltype&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The operation being performed required an extra page from CCATEMP, but there were no free pages available. CCATEMP is defined by the system manager and provides a set of work pages that are assigned on request to various users. If a request gets this message, it might be because some other user is holding a large number of CCATEMP pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The message specifies either the operation being performed, or the section (&amp;quot;pool&amp;quot;) of CCATEMP that was full.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;operation&amp;lt;/var&amp;gt; can be one of:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;$BLDPROC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;quot;USE PROCEDURE&amp;quot; COMMAND&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE INITIALIZING SORT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;FOR FRV KEYS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE GENERATING RECORDS TO BE SORTED&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE GENERATING ORDERED INDEX SORTED RECORDS&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;WHILE PERFORMING SORT&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pooltype&amp;lt;/var&amp;gt; can be one of:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SMALL MODEL PAGE POOL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;SMALL MODEL PAGE POOL AND EXPANSION PAGE POOL&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
The current request is cancelled.&lt;br /&gt;
&lt;br /&gt;
If the operation was $BLDPROC or USE PROCEDURE COMMAND, then the temporary procedure that was being written is deleted, except for its very last CCATEMP page, which is retained for information purposes.&lt;br /&gt;
&lt;br /&gt;
In some cases the user is restarted and, if the user was in the process of updating any files, MODEL 204 marks them physically inconsistent.&lt;br /&gt;
&lt;br /&gt;
CCATEMP pages below 64K are allocated from the small model pool.&lt;br /&gt;
CCATEMP pages above 64K are allocated from the expansion area pool.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pooltype&amp;lt;/var&amp;gt; specified in the message indicates whether you exceeded the capacity of the small model pool or both the small model and expansion area pools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify your system manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager response:&amp;lt;/b&amp;gt; Recover the physically inconsistent files using one of the following procedures:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Roll back/roll forward&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;File reorganization procedure described in [[File reorganization and table compaction]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The RESTORE command for restoring previously dumped copies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
This message is informational, but it indicates a need to increase the space allocation for CCATEMP. As the size of CCATEMP is fixed at initialization, it is necessary to bring down MODEL 204 to increase it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; E 60 60 AUDITAD CANCEL NOTERM OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1052: LOUTPB %C TO %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039;&lt;br /&gt;
LOUTPB has been increased or decreased, to the value given in the message.&lt;br /&gt;
With a full-screen terminal the value is 1.5 times the minimum for that model number, rounded&lt;br /&gt;
up to a multiple of 8.&lt;br /&gt;
A model 2 terminal results in a LOUTPB of 3200.&lt;br /&gt;
A model 5 terminal results in a LOUTPB of 5664.&lt;br /&gt;
&amp;lt;p&amp;gt;If NBKPG is greater than 0, the largest allowable value for LOUTPB is PAGESZ&lt;br /&gt;
minus 40, so the value can be decreased for this reason.&amp;lt;/p&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Response:&#039;&#039;&#039; No response is needed. This message is for information only.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITAD&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1060: %C not allowed with non swappable servers===&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The service requested is not compatible with non-swappable servers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; Remove any non-swappable server settings and restart Model 204 to repeat the service.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1131: Can&#039;t &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;action&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The procedure action cannot be taken for one of the following reasons:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The procedure is in use by another user.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The procedure is not in the file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The user does not have the correct privileges to change the procedure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If a RENAME or ASSIGN has been attempted, the alias might already exist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; Make sure that the procedure name is spelled correctly.&lt;br /&gt;
If the named procedure is in use, retry the command when the procedure is no longer in use.  Otherwise, arrange to place the&lt;br /&gt;
procedure in the file or to obtain the privileges to change the procedure.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 SUFFIX AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The return codes for message M204.1149 have changed.&lt;br /&gt;
&lt;br /&gt;
===M204.1149: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parameter_name&amp;lt;/var&amp;gt; has been set to its minimum|maximum value: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; You have attempted to reset a parameter either below the minimum or above the maximum allowed for it. Model 204 has reset the parameter to the correct minimum or maximum. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; Retry the command with a value within the correct range, or leave the value as is, since Model 204 has already reset the parameter to the correct minimum or maximum. &lt;br /&gt;
&amp;lt;p&amp;gt;For PARAMETER=ESIZE, if you specify:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A zero value, which is the equivalent of Not Applicable, no pages are allocated for Table E.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A non-zero value, then the minimum of 20 pages allocated for Table E is enforced.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1167: ITBL full -- argument string ignored===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; Model 204 stores the arguments passed by the &amp;lt;var&amp;gt;INCLUDE&amp;lt;/var&amp;gt; command ($READ and dummy string (??) responses) in the ITBL server table. If the storage allocated to ITBL is too small to accommodate the number and size of the arguments being passed, the argument string is ignored. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;For example: &lt;br /&gt;
In your include command &amp;lt;code&amp;gt;INCLUDE HOTEL,GRAND,BUDAPEST&amp;lt;/code&amp;gt;, the procedure named HOTEL is being passed the arguments GRAND and BUDAPEST. However, the M204.1167 message indicates that the storage allocated to ITBL is too small to accommodate those arguments. Consequently, the argument string &amp;lt;code&amp;gt;GRAND,BUDAPEST&amp;lt;/code&amp;gt; is ignored. You will be prompted to provide those arguments, one at a time, as required for the number of $READ statements and dummy string substitutions encountered in the procedure.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Use the &amp;lt;var&amp;gt;[[VIEW command|VIEW]] LITBL&amp;lt;/var&amp;gt; command to determine the current size of ITBL; then use the &amp;lt;var&amp;gt;[[UTABLE command|UTABLE]] LITBL&amp;lt;/var&amp;gt; command to increase its size.  A 10-20% increase should be sufficient in most cases.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1260: {Field|Fieldgroup} was previously defined with different attributes, new {field|fieldgroup} options ignored===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; A &amp;lt;b&amp;gt;DEFINE FIELD&amp;lt;/b&amp;gt; or a &amp;lt;b&amp;gt;DEFINE FIELDGROUP&amp;lt;/b&amp;gt; command has attempted to define an existing field or field group with different attributes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; To redefine the attributes of the field or field group, you must issue the &amp;lt;b&amp;gt;REDEFINE FIELD&amp;lt;/b&amp;gt; or the &amp;lt;b&amp;gt;REDEFINE FIELDGROUP&amp;lt;/b&amp;gt; command. Notify your file manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1307: %C logon rejected - &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason text&amp;lt;/var&amp;gt; (reason code: %X)===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The MODEL 204 3270 terminal handler has rejected a logon request from a 3270 terminal for the reason stated. The following reason codes are defined:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There are no control blocks available for new logons. Increase the number of IODEV 7 terminal definitions. The reason text is: NOT ENOUGH 3270 TERMINALS.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal has been defined with a non-3270 transmission services profile. The LU type must be 2.  The reason text is: LU TYPE NOT = 2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal has been defined to require definite responses to messages it sends inbound to the host. The transmission services profile must be 3. &amp;lt;br&amp;gt;&lt;br /&gt;
The reason text is: TS PROFILE NOT = 3.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;There has been an error on this terminal. This is a retryable error. The reason text is: LOSTERM SET FOR THIS TERMINAL.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The terminal definition is in use. This error should not occur. The reason text is: TERMINAL ALREADY IN USE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Contact your VTAM systems programmer to correct the VTAM definition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 4 AD SAVE NOTERM OPR&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.1346: Server area greater than cylinder capacity for this device. Cylinder size = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; BYTES.===                                               &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt;                                                                    &lt;br /&gt;
The number of bytes specified for the largest server area (SERVSIZE)      &lt;br /&gt;
is greater than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;, the number of bytes contained in a cylinder for    &lt;br /&gt;
the type of disk device on which your CCASERVR (CCASRVR for DOS) data set resides.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;b&amp;gt;System Manager Response:&amp;lt;/b&amp;gt; Do one of the following:                                                  &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ensure that the largest SERVSIZE value does not exceed &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;           &lt;br /&gt;
&amp;lt;li&amp;gt;place your server data sets on a type of disk device that has a         &lt;br /&gt;
larger cylinder capacity&amp;lt;/li&amp;gt;                                                  &lt;br /&gt;
&amp;lt;li&amp;gt;place CCASERVR in storage. (See the &amp;quot;CCASERVR in Storage feature&amp;quot; section in the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 System Manager&#039;s Guide&amp;lt;/var&amp;gt;.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 96 96 AUDITER      &lt;br /&gt;
----&lt;br /&gt;
===M204.1381: (new informational message for REGENERATE)===&lt;br /&gt;
M204.1381 is a new informational  message issued during REGENERATE to help verify that the journal data provided in CCAGEN is from the correct CCAJRNL.  &lt;br /&gt;
&lt;br /&gt;
The 58 bytes printed are the journal header of each journal block. (Journal headers are described in the [[Using system statistics#Header entries (Type 0)|Header entry formats]] table.)  &lt;br /&gt;
&lt;br /&gt;
The message has four variations, which always appear:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;M204.1381: CCAGEN: FIRST 5 CCAJRNL BLOCKS + LAST BLOCK IN HEX&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The first 58 bytes, in hex, of the first five CCAJRNL blocks and the last CCAJRNL block read from CCAGEN follow in CCAAUDIT.&amp;lt;/p&amp;gt;   &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;M204.1381: PASS1:&amp;lt;/b&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hex representation of data&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;M204.1381: LASTB:&amp;lt;/b&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hex representation of data&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;M204.1381: CCAGEN BLOCK COUNT: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnnn&amp;lt;/var&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The count of CCAJRNL blocks read from CCAGEN.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;  &lt;br /&gt;
&amp;lt;b&amp;gt;Example&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example shows the first 5 CCAJRNL blocks and the last block read from CCAGEN during pass 1 of REGENERATE.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.1381: CCAGEN: FIRST 5 CCAJRNL BLOCKS + LAST BLOCK IN HEX&lt;br /&gt;
M204.1381: PASS1: 006000020113214F155421910000000000CB...            &lt;br /&gt;
M204.1381: PASS1: 0AD000020113214F155421910000000100CB...            &lt;br /&gt;
M204.1381: PASS1: 07BF008A0113214F155421920000000200CB...            &lt;br /&gt;
M204.1381: PASS1: 0B5E00020113214F155422000000000300CB...            &lt;br /&gt;
M204.1381: PASS1: 0AAF00120113214F155422030000000400CB...            &lt;br /&gt;
M204.1381: LASTB: 00C900020113214F155930280000337100CB...   &lt;br /&gt;
M204.1381: CCAGEN BLOCK COUNT: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;....&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;                                                  &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; This message is informational only; no response is required.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; I 0 0 AUDITAD&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1382: Chunk size &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt; used: flags=X&amp;quot;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt;&amp;quot;, low=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt;, high=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nn&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;This is a debugging error message. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Response: &amp;lt;/b&amp;gt;No response is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; I 0 0 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1387: Allocate failed; DDNAME=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt;,DSNAME=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname&amp;lt;/var&amp;gt; could not be located===    &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; An attempt to allocate an existing data set, data set name=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsname&amp;lt;/var&amp;gt;, failed because the specified dsname was not found in the catalog or the catalog could not be accessed.&amp;lt;/p&amp;gt;  &lt;br /&gt;
M204.1387 replaces &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.1070: ALLOCATE FAILED - &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt; with additional information regarding the failure of the ALLOCATE command. However, M204.1070 remains in use by Janus/TCPIP for a different purpose. &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Correct the data set name or ensure that the data set exists and is cataloged.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1388: CHUNK size exceeds maximum of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;On a DEFINE field command, the chunk size specified is too large.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;User response: &amp;lt;/b&amp;gt;Specify a chunk size less than or equal to the maximum.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return codes: &amp;lt;/b&amp;gt;C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1393: CHUNK clause not of format &amp;quot;CHUNK &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkSize&amp;lt;/var&amp;gt; FOR &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkTarget&amp;lt;/var&amp;gt;&amp;quot;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the syntax of the CHUNK clause was not in the format shown in this message.                                                   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the incorrect CHUNK clause syntax.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1394: CHUNK &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;chunkSize&amp;lt;/var&amp;gt; value invalid: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the value specified for the size of a CHUNK is invalid;  &lt;br /&gt;
&amp;quot;reason&amp;quot; indicates why. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK size.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1395: CHUNK target field invalid type: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reason&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, the field specified as a CHUNK target is not a field type that can be used as a chunk target, for the reason specified. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command containing the invalid CHUNK target type.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1396: CHUNK fields must be INVISIBLE ORDERED NUMERIC===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; On a DEFINE FIELD, an attempt was made to create a CHUNK field that was not INVISIBLE ORDERED NUMERIC, which is a requirement of chunk fields. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD command that has the invalid CHUNK target type.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1397: A CHUNK field was defined, %F may no longer be opened with M204 releases prior to V7R5===&lt;br /&gt;
&#039;&#039;&#039;Response:&#039;&#039;&#039; This is an informational message. No action is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1399: Same server area defined for server above the bar and non swappable server===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;The same server table has been defined in SERVNSA and SERVGA.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Correct the SERVNSA and/or SERVGA settings. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1400: Server areas ATB require server swapping in memory===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;Parameters indicated that server areas ATB were used in the run where CCASERVR data set was defined.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039;  Either remove the server areas ATB parameters or use server swapping in memory.    &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1402: Invalid value for chunk target: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fname&amp;lt;/var&amp;gt;=&#039;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;val&amp;lt;/var&amp;gt;&#039;; values must be -999999999999999 -&amp;gt; 999999999999999===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;If a chunk target is any field type besides DATETIME, any value stored in it must be within the range shown in the error message.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Response: &amp;lt;/b&amp;gt;Correct the value being stored.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Correct the value being stored.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1403: Increase SERVGSZ to at least %C for required ATB server areas===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;The total size of ATB server areas is larger than the ATB server size defined in SERVGSZ.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User Response:&#039;&#039;&#039; If the message is issued by the UTABLE command, decrease the size of the ATB server areas.       &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; If the message is issued at initialization, either increase SERVGSZ or decrease the ATB server area size.    &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 80 80 AUDITAD OPR &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1412: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;service&amp;lt;/var&amp;gt; not allowed with ATB servers===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;The requested service is not compatible with ATB (above the bar) servers.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Remove the ATB server parameters and restart Model 204.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1433: CCAGEN: IS EMPTY ¦ CCAGEN: PERMANENT I/O ERROR===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; There were no valid records found in the journal(s) pointed to by CCAGEN, or a permanent I/O error was encountered.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Verify that you have the correct journal(s) for the run. If I/O errors were detected while reading in CCAGEN, the appropriate error messages will have been issued before this message. Correct the error and rerun media recovery. If the problem remains unclear, contact Technical Support and have the following documentation available:&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Audit trail&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Snap dump&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;UTILJ output for CCAGEN dataset&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1489: Not enough file space to continue procedure definition - %F===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; There is no room in the file to store the procedure being entered with the PROCEDURE command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;If…&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Then Model 204…&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Error occurs after the first line of procedure text has been stored&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Keeps the partial procedure&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;You are entering the text at your terminal&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Ends procedure definition immediately&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Procedure text is supplied by another procedure&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Flushes the remainder of the input&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Procedure text is supplied in a batch input stream (CCAIN)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Flushes the remainder of the procedure text and resumes processing after the END PROCEDURE command&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Create space in the file by deleting unwanted procedures or increasing Table D with the INCREASE command. Replace the partial procedure using the PROCEDURE command, or use the EDIT command to supply the missing text.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===M204.1508: %&amp;lt;C userid&amp;gt; is not authorized to use Model 204=== &lt;br /&gt;
Message M204.1508 has been updated to include the actual user ID of the unauthorized user.&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; This user ID does not have the authority to use Model 204.  Login authorization to Model 204 is defined by your installation security officer or system manager.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Ask your installation security officer or system manager to authorize you for logging into Model 204.&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; Contact the installation security officer or issue the appropriate external security system commands to give the user’s logon ID the authority to use Model 204. Refer to the [[Security_interfaces_overview|Security interfaces pages]] for instructions.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1587: FSCB full, IMAGE too large: LFSCB required = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;num&amp;lt;/var&amp;gt;, bytes available in FSCB = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;num&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The value specified in an &amp;lt;var&amp;gt;Identify&amp;lt;/var&amp;gt; statement with&lt;br /&gt;
the &amp;lt;var&amp;gt;Len&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;Occurs&amp;lt;/var&amp;gt; option causes the size of the associated &amp;lt;var&amp;gt;Image&amp;lt;/var&amp;gt; to&lt;br /&gt;
overflow the full screen buffer (FSCB). The FSCB is a server work area&lt;br /&gt;
that is used to hold a compiled Image definition.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Use the &amp;lt;var&amp;gt;VIEW LFSCB&amp;lt;/var&amp;gt; command to determine the current&lt;br /&gt;
size of the FSCB. Use the &amp;lt;var&amp;gt;UTABLE&amp;lt;/var&amp;gt; command to increase the value of the&lt;br /&gt;
&amp;lt;var&amp;gt;LFSCB&amp;lt;/var&amp;gt; parameter. Check the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; request for programming errors&lt;br /&gt;
that might cause the value specified in the &amp;lt;var&amp;gt;Identify&amp;lt;/var&amp;gt; statement to be&lt;br /&gt;
too large. Retry the request.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Return Codes: &#039;&#039;&#039;C 0 4 CANCEL AUDITER &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.1589: Maximum IMAGE length is 32767: LFSCB required = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;num&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; An attempt has been made to define an image greater than 32K.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Redefine the image so that it is not greater than the maximum length of 32767.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL AUDITER&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
===M204.2126: User&#039;s pushdown list overflowed===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The user&#039;s pushdown list is an internal stack for maintaining state information for user threads across internal Model 204 subroutines. The user pushdown list lives in each user&#039;s server.  Its size requirement depends on the complexity of the command or User Language request.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This message is issued whenever Model 204 detects that pushdown list data has spilled into adjacent control structures.  Because of potential corruption the user is restarted.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Response:&#039;&#039;&#039; Increase the size of the user pushdown list by using the LPDLST parameter of the UTABLE command.  Notify your system manager.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; If this becomes a frequent occurrence, consider more permanent changes to LPDLST and SERVSIZE, since the pushdown list is a server component.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
===M204.2329: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;subsystem_name&amp;lt;/var&amp;gt; at &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;location_name&amp;lt;/var&amp;gt; unavailable===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The indicated subsystem at the specified node is not available for use due to one or more errors occurring at the specified node during start or login processing.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Notify the system manager or try again later.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;System manager response:&amp;lt;/b&amp;gt; If the subsystem is started, stop the subsystem and resolve communications errors or other errors which occurred at the specified node. After resolving error, use the START SUBSYSTEM command to make the subsystem available for general use. Check to make sure that the LOCATION parameter was set properly in the CCAIN input stream for the Online.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2551: {FPL|FCT PG1} is invalid for file: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; If the message says FPL, then the FPL (file parameter list) for the associated file is invalid. This could be the result of an incorrect DD, FILEDEF or DLBL statement.                                              &lt;br /&gt;
&lt;br /&gt;
If the message says FCT PG1, then the existence page array page is invalid.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;File manager response:&#039;&#039;&#039; If the DD, FILEDEF or DLBL statement is correct and points to the correct data set, then the file must be restored from a backup.         &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2651: Not all threads processed for IODEV %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The run is terminated because either:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The number of threads specified by NUSERS has been initialized, but there are fewer users of the specified IODEV type than expected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The DUPTERM number specified by the IODEV card could not be initialized because it exceeded the number of NUSERS.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Check that NUSERS matches the total of the listed IODEVs, plus one extra for USER 0. Check also the NOTERM/DUPTERM parameter for the specified IODEV card.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 80 80 ER&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2719: Open %C failed. Update statements already compiled, read only privileges insufficient===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The OPEN or OPENC User Language statement was issued from a request to reopen a file with read-only privileges. However, that request had already been compiled with update statements against the file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; In a User Language request, you cannot use the User Language OPEN or OPENC statement to reopen a file with read-only privileges, if that request contains updates statements against the same file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2739: Parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; cannot be reset on user 0’s parameter line: value ignored===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; You reset parameter &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; on the User 0 parameter line, but the parameter cannot be set there. The value is ignored, the default value for this parameter remains in effect.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Remove &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;parm&amp;lt;/var&amp;gt; from the User 0 parameters, since it will not change the value of the parameter.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; E 0 4 AD&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2746: XSIZE*XRECPPG may not be 1 nor exceed 536870911===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The product of XSIZE and XRECPPG must not exceed 16777216 times 32 minus one, or 536870911. This specifies the maximum number of extension records allowed in a single Model 204 file when using Table X. Also, setting both XRECPPG and XSIZE to 1 is invalid.&amp;lt;/p&amp;gt;&lt;br /&gt;
The CREATE command is rejected.&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Retry the command specifying values for XSIZE and XRECPPG whose product does not exceed the 526870911 limit. Refer to the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;Rocket Model 204 File Manager’s Guide &amp;lt;/var&amp;gt;for more information on file sizes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2774: Another &amp;lt;i&amp;gt;command&amp;lt;/i&amp;gt; command is in progress===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; An INCREASE or DECREASE command or auto increase is taking place while another INCREASE, DECREASE, or auto increase has not finished yet.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;File manager response:&amp;lt;/b&amp;gt; Repeat the command after the completion of the auto increase or previous INCREASE or DECREASE command. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2826: %F %C compaction not allowed===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; An attempt was made to compact a file created prior to Model 204 version 6.3.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Reorganize the file using Model 204 version 6.3.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2831: Updates to DTS files not supported in this environment===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; DTS files cannot be updated in IFAM, SQL, or PQO environments.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; Do not attempt to update DTS file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
===M204.2833: Fields cannot be defined in a file with ATRPG*ASTRPPG&amp;amp;gt;4000===&lt;br /&gt;
&amp;lt;p&amp;gt;Return Codes: C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2836: Value of parameter %C invalid—reset to %C===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This is an informational message only.&lt;br /&gt;
&lt;br /&gt;
A parameter was specified with an incorrect value. It has been reset to an internally calculated value that will accommodate other parameter settings. See the description of the parameter named to see what that calculation involves.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System Manager Response:&#039;&#039;&#039; The parameter has been reset. No response is required.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2838: %C only valid in FILEORG X’100’ files===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2839: %C is a %C, not a %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
===M204.2841: Remote fieldgroups not supported=== &lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----							&lt;br /&gt;
===M204.2842: Invalid context for fieldgroup===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----									&lt;br /&gt;
===M204.2843: Maximum fieldgroup id exceeded in record %R in %F===&lt;br /&gt;
&amp;lt;p&amp;gt;Return Codes: C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----								&lt;br /&gt;
===M204.2844: Mix of fields and fieldgroups, name &amp;lt;nowiki&amp;gt;=&amp;lt;/nowiki&amp;gt;===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2845: Invalid fieldgroup context for %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; The $function was used outside of field group context.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Descriptor code:&amp;lt;/b&amp;gt;C 0 4 SUFFIX ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2846: Invalid fieldgroup context for %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2847: Fieldgroup context lost in record %R in %F===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2848: Invalid fieldgroup id: %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2849: Required keyword %C missing===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;X 0 4 ECHO&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2850: %C value missing===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
===M204.2851: %C value &amp;amp;quot;%C&amp;amp;quot; too big, must be &amp;amp;lt;%C bytes===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2852: Update to missing fieldgroup occurrence in record %R in %F===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2853: %C not allowed for EXACTLY-ONE field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2854: Attempt to do %C for EXACTLY-ONE field: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2855: Field depth+length unrepresentable in record %R in %F===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2856: Fieldname variable %C: expected %C, got %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2857: %C field not allowed for %C field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2858: Fieldgroup context mismatch between COUNT-OCCURRENCES-OF field and counted field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2859: New automatic field not allowed for non-empty file===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2860: Field %C already has a COUNT-OCCURRENCES-OF field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2861: Occurrence counter %C overflowed===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2862: Attempt to update automatic field %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 SUFFIX ECHO&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2863: Attempt to do %C for automatic field: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2865: Attempt to %C invalid datetime value: %C = %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
											&lt;br /&gt;
===M204.2866: File already has %C field===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2867: Fieldgroup %C already has %C field===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; If you try to define a second update tracker field of the same type for the same field group, you will invoke message 2867, where %C represents:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A CREATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-TIME&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-TIMEUTC&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;AN UPDATE-USER&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C O 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2868: MINLOBE must be between 0 and %C===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&amp;lt;/p&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2869: Change refused: MINLOBE &amp;gt; 0 for File &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; field &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2870: Change refused: MINLOBE &amp;gt; 0 for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;filename&amp;lt;/var&amp;gt; field &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 CANCEL AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2871: Fieldgroup context mismatch between CONCATENATION-OF field and COMPONENT field===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2872: Concatenation value too long for field %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2873: Concatenation field %C component field %C contains separator character===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2874: Attempt to %C a value that&amp;amp;#39;s %C: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: &amp;lt;/b&amp;gt;C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2875: Concatenation list invalid: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2876: Invalid %C value: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2877: WITH clause invalid: %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: C 0 4 ECHO&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2878: WITH clause invalid: field %C in %F %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2879: Remote id %C mode %C===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: I 0 0 SAVE NOTERM OPR&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2880: Memory datasets cannot be part of multi-dataset file===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes: C 0 4&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
										&lt;br /&gt;
===M204.2881: Data conversion error===&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2882: Recovery journal (CCARF) version %C is not supported===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation: &amp;lt;/b&amp;gt;A CCARF data set was provided as input to a recovery step, but that CCARF data set was produced by a different version of Model 204 than the version that is running recovery.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;System manager response: &amp;lt;/b&amp;gt;Correct the data set name referenced in CCARF and ensure that it was produced by the version of Model 204 that you are using to run recovery.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return codes: &amp;lt;/b&amp;gt;E 52 52 OPR&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2883: Mix of journal versions in recovery CCARF===&lt;br /&gt;
&amp;lt;b&amp;gt;Return codes: &amp;lt;/b&amp;gt;E 52 52 SNAP OPR    &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2884: {Field|Fieldgroup} was previously defined as a {fieldgroup|field}, new definition ignored===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2885: Invalid fieldgroup id: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldgroup&amp;lt;/var&amp;gt;===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4 CANCEL&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
								&lt;br /&gt;
===M204.2886: Fieldgroup id %C already exists in record %R in %F===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; C 0 4&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2903: FILEORG=X&amp;amp;#39;100&amp;amp;#39; is not supported during FLOD/FILELOAD===&lt;br /&gt;
&amp;lt;b&amp;gt;Return Codes:&amp;lt;/b&amp;gt; E 0 8&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2916: %C requires at least one area to be set in %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; When the size of a non-swappable server area is indicated (SERVNSSZ), at least one non-swappable server area must be indicated in SERVNSA.              &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Operator response:&#039;&#039;&#039; Correct the SERVNSA parameter setting.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2921: Server areas above the bar are not supported in VSE===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Non-swappable server areas ATB are not supported in VSE.                 &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Operator response:&#039;&#039;&#039; Remove the parameters for non-swappable server areas.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2922: %C bit setting is not valid===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; The bit setting in [[SERVNSA parameter|SERVNSA]] is not valid. &lt;br /&gt;
&amp;lt;br&amp;gt;For release 7.4, valid bits are: X&#039;02000000&#039;  &lt;br /&gt;
&amp;lt;br&amp;gt;For release 7.5, valid bits are: X&#039;02000000&#039;, X&#039;00800000&#039;, X&#039;00004000&#039;, and X&#039;00002000&#039;                    &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Operator response:&#039;&#039;&#039; Correct the SERVNSA setting.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2933: Module version mismatch, KOMM=%C, %C=% C===&lt;br /&gt;
&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 SNAP&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===M204.2934: FILEORG X&amp;lt;nowiki&amp;gt;&#039;200&#039;&amp;lt;/nowiki&amp;gt; not supported for hashed or sorted file organizations===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; Hashed or sorted files must be 16M files. The CREATE FILE command   &lt;br /&gt;
is rejected. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Remove the conflicting FILEORG parameter and reissue CREATE FILE.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; E 0 4 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2935: {CHUNK|CHUNK target} fields may not be RENAMED or DELETED===&lt;br /&gt;
&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Do not attempt to RENAME or DELETE chunks or chunk targets.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2936: A CHUNK field of size &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; already exists for this field===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; For a given CHUNK target field, duplicate chunk sizes are not permitted. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD that caused the message.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2937: CHUNK SIZE: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt; is not an integral multiple/divisor of the existing CHUNK size: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;nnn&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; A CHUNK field&#039;s chunk size must be an integral multiple/divisor of all other chunk&#039;s sizes for a given chunk target.  &lt;br /&gt;
&amp;lt;br&amp;gt;This message identifies the existing chunk size that conflicts with the new one.  &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the DEFINE FIELD that caused the message.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2938: You may not define more than %C chunks for a field===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; A given chunk target can have at most 20 chunks defined. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Do not try to define more than 20 CHUNK fields for any given CHUNK target field.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return Codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2939: %C has been set to its %C value: %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; &amp;lt;i&amp;gt;TBD&amp;lt;/i&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2940: Use of filename after INITIALIZE keyword discouraged because it gave different results prior to version 7.5===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt;&lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if it was anything other than KEEPDEF[S], it  was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you have entered the name of the file being initialized AFTER the INITIALIZE command keyword, you can either correct the command (that is, remove the filename after the INITIALIZE command keyword) or use the MSGCTL M204.2940 command as described below so that the command can continue to work.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; The most direct response is to correct the command to conform to the proper syntax, that is, remove extraneous strings after the INITIALIZE command keyword.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager has chosen to keep the filename after the INITIALIZE command keyword, and the filename is the same as the name of the file being initialized, you can have the following command executed at any time before the INITIALIZE command is executed:&lt;br /&gt;
    &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2940 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Issuing the above MSGCTL command with version 7.5 of Model 204 will not present any risk of an incorrect operation of INITIALIZE. &lt;br /&gt;
A word of caution, however: In prior versions of Model 204, a filename after the INITIALIZE command keyword is NOT checked against the name of the file being initialized. Therefore the use of the filename after the INITIALIZE command keyword could be a risky practice if such a command might be used in a prior version of Model 204. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2941: File being initialized does not match name given after INITIALIZE command: %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; &lt;br /&gt;
This message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:  &lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt;     &lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if it was anything other than KEEPDEF[S], it was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases, users have entered the name of the file being initialized AFTER the INITIALIZE command keyword, but this message indicates that whatever string you entered after the INITIALIZE command keyword is not the name of the file being initialized. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response: &#039;&#039;&#039;&lt;br /&gt;
Correct the command. The most direct response is to correct the command to conform to the proper syntax: that is, remove extraneous strings after the INITIALIZE command keyword. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
However, if the system manager has performed a MSGCTL M204.2940 NOCOUNT command, and you want to enter the correct filename on the INITIALIZE command, that will allow the INITIALIZE operation to  proceed. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;System manager response: &#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;If the file manager is unable to correct the INITIALIZE command, you can have the following commands executed at any time before the INITIALIZE command is executed:                                                                         &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2940 NOCOUNT&lt;br /&gt;
MSGCTL M204.2941 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
These actions represent a very special case for the NOCOUNT option of MSGCTL. &lt;br /&gt;
&amp;lt;br&amp;gt;Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but it does not directly affect the operation which issued the error message.   &lt;br /&gt;
&amp;lt;br&amp;gt;For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;Issuing MSGCTL M204.2941 NOCOUNT is not recommended, because this results in what might appear to be checking of the filename when in fact it is not checked.                                             &lt;br /&gt;
&amp;lt;br&amp;gt;Issuing MSGCTL M204.2940 NOCOUNT does not present any risk with version 7.5 of Model 204, but, as discussed in the System Manager response section of message 2940, this practice should be done with caution. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2942: Extraneous string after field attribute list: %C===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the INITIALIZE command as entered for a hashed, sorted, or record security file does not conform to the syntax of: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE&lt;br /&gt;
[SORT fldName (attributes)]&lt;br /&gt;
[HASH fldName (attributes)]&lt;br /&gt;
[RECSCTY fldName (attributes)]&amp;lt;/p&amp;gt;&lt;br /&gt;
In particular, it indicates that some string followed the right parenthesis (&#039;)&#039;) of the attribute list.&lt;br /&gt;
Prior to version 7.5, nothing after the closing parenthesis was checked.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; Correct the command. There should be no string after the right parenthesis.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager is unable to correct the INITIALIZE command, you can have the following command executed at any time before the INITIALIZE command is executed:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2942 NOCOUNT &amp;lt;/p&amp;gt;                                           &lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL. Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message. &lt;br /&gt;
&amp;lt;br&amp;gt;For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;Issuing MSGCTL M204.2942 NOCOUNT is not recommended, because if you issue this command the string after the right parenthesis will not be analyzed.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2943: Error using filename phrase for file %C: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;restriction&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:&lt;br /&gt;
    &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt; &lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if it was anything other than KEEPDEF[S], it was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In some cases, users have entered the name of the file being initialized AFTER the INITIALIZE command keyword, but this message indicates that the syntax requires some modification for the particular file being initialized. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; The command should be corrected; the most direct response is to correct the command to conform to the proper syntax, that is remove extraneous strings after the INITIALIZE command keyword. &lt;br /&gt;
However, if the system manager has performed a MSGCTL M204.2940 NOCOUNT command, you can modify the command as indicated by the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;restriction&amp;lt;/var&amp;gt; shown in the M204.2943 text.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager is unable to correct the INITIALIZE command, you can have the following commands executed at any time before the INITIALIZE command is executed:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2940 NOCOUNT&lt;br /&gt;
MSGCTL M204.2943 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL. Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Issuing MSGCTL M204.2943 NOCOUNT is not recommended, because this bypasses the checking that is intended by the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;restriction&amp;lt;/var&amp;gt; shown in the M204.2943 text.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Issuing MSGCTL M204.2940 NOCOUNT does not present any risk with version 7.5 of Model 204, but, as discussed in the system manager response for M204.2940, this practice should be done with caution. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2944: Should have end of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command but instead found: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt;===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This message indicates that the format of the command indicated by cmd as entered does not conform to command syntax. &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User response:&#039;&#039;&#039; Correct the command, either by simply removing string and any following strings or else by correcting the command to conform to the proper syntax.       &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;File manager response:&#039;&#039;&#039; If the cmd in the M204.2944 text is INITIALIZE, this message indicates that the format of the INITIALIZE command as entered does not conform to the syntax of:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;INITIALIZE [KEEPDEF[S]]&amp;lt;/p&amp;gt;&lt;br /&gt;
Prior to version 7.5, it was possible to place any text on the INITIALIZE command, and if the text was anything other than KEEPDEF[S], it was ignored.  In version 7.5, the syntax of INITIALIZE command is checked for strict correctness. &lt;br /&gt;
The command should be corrected as described in the user response above.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;System manager response:&#039;&#039;&#039; If the file manager is unable to correct the INITIALIZE command, you can have the following command executed at any time before the INITIALIZE command is executed:  &lt;br /&gt;
   &amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MSGCTL M204.2944 NOCOUNT&amp;lt;/p&amp;gt;&lt;br /&gt;
This action represents a very special case for the NOCOUNT option of MSGCTL. Normally, the NOCOUNT option only changes a message such that it does not increment the count of counting errors, but does not directly affect the operation which issued the error message.   &lt;br /&gt;
                                                                   &lt;br /&gt;
For this message, however, setting the NOCOUNT operation indicates that this condition is to be allowed, and normal processing of the INITIALIZE command will continue.  &lt;br /&gt;
&lt;br /&gt;
Issuing MSGCTL M204.2944 NOCOUNT is not recommended, because whatever string was indicated on the INITIALIZE command is not checked.&lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
 &lt;br /&gt;
===M204.2945: Error encountered, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command not performed===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This counting error message indicates that the processing of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command was not performed. This message should be preceded by one or more messages. (If the preceding messages were not counting error messages, they might not have been displayed on the user&#039;s terminal, depending on the MSGCTL parameter setting.) &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User response:&#039;&#039;&#039;  Correct any conditions indicated by the preceding messages.   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; C 0 4 AUDITER&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
 &lt;br /&gt;
===M204.2946: Error encountered, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command not performed ===&lt;br /&gt;
&#039;&#039;&#039;Explanation:&#039;&#039;&#039; This informational message indicates that the processing of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;cmd&amp;lt;/var&amp;gt; command was not performed. This message should be preceded by one or more messages. (If the preceding messages were not counting error messages, they might not have been displayed on the user&#039;s terminal, depending on the MSGCTL parameter setting.) &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;User response:&#039;&#039;&#039;  Correct any conditions indicated by the preceding messages.   &lt;br /&gt;
&amp;lt;br&amp;gt;&#039;&#039;&#039;Return codes:&#039;&#039;&#039; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===M204.2947: Module address &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;address&amp;lt;/var&amp;gt; length &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; protected===&lt;br /&gt;
&amp;lt;b&amp;gt;Explanation:&amp;lt;/b&amp;gt; This informational message is displayed during startup to show the ranges of load module protection. To see which Rocket CSECTs are being referenced, look at the module map in a snap. For more information on the load module protection facility, see the [[MODPROT parameter]] description.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Response:&amp;lt;/b&amp;gt; No response is required. &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;Return codes:&amp;lt;/b&amp;gt; I 0 0 AUDITMS&lt;br /&gt;
&lt;br /&gt;
==DDGEN messages==&lt;br /&gt;
===DDG017: UNABLE TO PROCESS NON-TBO FILE WITH SYSOPT=4, CHANGE FILE TO TBO OR RESET SYSOPT.===&lt;br /&gt;
===DDG018: FICREATE UNRECOGNIZABLE. DDGEN RUN CANCELLED.===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p style=&amp;quot;margin-left: 25%&amp;quot;&amp;gt;[[#toc|Up to Contents]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Release notes]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_Load_utility:_FLOD_and_FILELOAD_commands&amp;diff=78577</id>
		<title>File Load utility: FLOD and FILELOAD commands</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_Load_utility:_FLOD_and_FILELOAD_commands&amp;diff=78577"/>
		<updated>2015-07-27T23:45:43Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Clone text about FILEORG x&amp;#039;100&amp;#039; from the FILEORG_parameter page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;toclimit-3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command is followed by a series of file load statements that comprise the file load program. The program is terminated by an &amp;lt;var&amp;gt;END&amp;lt;/var&amp;gt; statement, beginning in column 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you are doing a multistep File Load procedure, the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command&lt;br /&gt;
marks the beginning of a file load program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you are doing a one-step procedure, use the &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;FILEORG&amp;lt;/var&amp;gt; X&#039;100&#039; files cannot be loaded via &amp;lt;var&amp;gt;[[FLOD_command|FLOD]]&amp;lt;/var&amp;gt; or&lt;br /&gt;
&amp;lt;var&amp;gt;[[FILELOAD_command|FILELOAD]]&amp;lt;/var&amp;gt; except with a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;&lt;br /&gt;
[[Media:FrelrNew.pdf|Fast/Reload]]&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Load All Information&amp;lt;/var&amp;gt; (&amp;lt;var&amp;gt;LAI&amp;lt;/var&amp;gt;)&lt;br /&gt;
&amp;lt;var&amp;gt;FLOD/FILELOAD&amp;lt;/var&amp;gt; program.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
These commands place the file in deferred update mode, in which updates to Tables C and D are deferred to deferred update data sets and are applied later to Tables C and D.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Including the FLOD or FILELOAD command in your run===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Include the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command and its associated file load program in the CCAIN data set, along with any other &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; commands needed to prepare the file for loading or to manipulate or check the data after loading.&amp;lt;/p&amp;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;&lt;br /&gt;
There can be only one &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;Z&amp;lt;/var&amp;gt; command specified in any given File Load job step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Getting information about a FLOD or FILELOAD run===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Some of the characteristics of the File Load run such as the number of records deleted or the number of fields added during the run are kept as counters that are printed at the end of the run. These counters are listed in [[#FLOD and FILELOAD command output|FLOD and FILELOAD command output]]. A histogram listing the distribution of deferred update record lengths along with the number of records for each range of lengths is also displayed for variable-length deferred update data sets. It can be used as an aid to setting the variable-length sort parameter, and is illustrated in [[Deferred update feature#Setting the variable-length parameter(vl)|Setting the variable-length parameter(vl)]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Double-checking your file load run==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you know how many records you are loading, you can use the SOUL &amp;lt;var&amp;gt;FPC&amp;lt;/var&amp;gt; (Find and Print Count) construct to ensure that all records have been loaded.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Loading nondeferrable fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are loading fields whose updates should not be deferred, it is not sufficient to specify the &amp;lt;var&amp;gt;NON-DEFERRABLE&amp;lt;/var&amp;gt; attribute in order to override the deferral of updates for these fields. (In single-user File Load runs, the &amp;lt;var&amp;gt;NON-DEFERRABLE&amp;lt;/var&amp;gt; attribute is ignored by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.) See [[Deferred update feature#Overriding deferred updates|Overriding deferred updates]] for a description of the techniques available to override deferred updates.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Do not use RRN files in deferred update mode===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Rocket Software suggests that you do not use deferred update mode with &amp;lt;var&amp;gt;Reuse Record Number&amp;lt;/var&amp;gt; files except where you are performing simple record adds (such as reorganizing files). Doing so could cause you to lose updates without warning. See [[File design#RRN files and deferred update_mode|RRN files and deferred update mode]] for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FLOD command==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command marks the beginning of a file load program. This command is followed by the file load statements described starting on [[#File Load statements: overview|File Load statements: overview]]. The procedure ends with the word &amp;lt;var&amp;gt;END&amp;lt;/var&amp;gt;, beginning in column 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FLOD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;k,n,m&amp;lt;/span&amp;gt;&lt;br /&gt;
 . &lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; specifies the maximum number of records to be loaded into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; is -1, &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; loads all records into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; is any negative number except -1, the number is converted into a 32-bit unsigned number, &amp;lt;var&amp;gt;N,&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt; records are processed. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; specifies the maximum number of times the statements in the file load program are to be executed:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is 0, the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; code is compiled, but is &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;not&amp;lt;/var&amp;gt; executed. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is -1, &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; keeps making passes through the code until the process is stopped by another condition (such as EOF)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; specifies the number of input records to skip before starting the File Load process, which is helpful for breaking up the load process so that dumps (backups) can be taken during large loads:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is -1, all records are skipped.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is any negative number except -1, the number is converted into a 32-bit unsigned number, &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt;, and &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; skips &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; records before processing begins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each time the &amp;lt;var&amp;gt;END&amp;lt;/var&amp;gt; statement is encountered during execution, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; begins again with the first statement following the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command. The procedure continues to execute until one of the following occurs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All the records in the input data set have been processed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; records have been added to the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; passes have been made through the file load program. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Thus, either &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; can be used to limit File Load processing and to load only a sample of the data. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To process all the input records, set both &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; to -1. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following command specifies that all input records be processed starting with the first record (that is, skip 0 records):&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1, 0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FILELOAD command==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To perform a one-step file load, use the &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command to mark the beginning of a file load program. This command is followed by the file load statements described starting on [[#File Load statements: overview|File Load statements: overview]]. The procedure ends with the word &amp;lt;var&amp;gt;END&amp;lt;/var&amp;gt;, beginning in column 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FILELOAD command processing===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command attaches one or two sort subtasks to do the sorting required to load index and &amp;lt;var&amp;gt;FRV&amp;lt;/var&amp;gt; entries efficiently. These subtasks run asynchronously with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; (except under z/VM, which does not support true subtasking). Two buffers are used for the sorts. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; fills the second buffer while the sort is emptying the first. After the records are sorted, the same double-buffering mechanism is used to pass the records back to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The complete format of the &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FILELOAD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;k,n,m&amp;lt;/span&amp;gt; [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/span&amp;gt;] [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/span&amp;gt;] [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/span&amp;gt;] [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/span&amp;gt;] [,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;]]]]]&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;, and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; have the meanings described for the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command in [[#FLOD command|FLOD command]], above.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; represents the amount of memory that the sort package uses for sorting the deferred update index records produced by the file load program. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; is omitted or is not a positive integer, a default value of 50,000 bytes (64K for z/VM) is used for the sort work space. &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; Make the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; parameter as large as possible, especially for sorts involving many records. It is important to increase &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; for large sorts. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt; represents the amount of memory used for sorting the deferred update &amp;lt;var&amp;gt;FRV&amp;lt;/var&amp;gt; index records. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt; is omitted or is not a positive integer, a default value of 50,000 bytes (64K for z/VM) is used. For 3380 disk drives the minimum values for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt; are 64,000 bytes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; represents the amount of memory allocated for the two buffers used to pass data from &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to the sorts. This parameter specifies the combined size of the two buffers. The core specified in &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; is evenly divided between the two buffers, and the default value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; is 8000 bytes. The minimum value accepted is 48 bytes, but such a small size is not recommended. A larger value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; can produce a noticeable performance improvement. However, increasing &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; normally has a greater effect on performance than a corresponding increase in &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/var&amp;gt; represents the amount of memory allocated for the two buffers used to pass data from the sorts to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/var&amp;gt; is ordinarily equal in size to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; and is set equal to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; by default.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; specifies the maximum sort record length in variable-length record sorts. (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; corresponds to the &amp;lt;var&amp;gt;L2&amp;lt;/var&amp;gt; of the &amp;lt;var&amp;gt;RECORD&amp;lt;/var&amp;gt; sort statement.)&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter is required when &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; fields are updated by the file load program. For efficiency, do not use the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter if &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; fields are not updated. For more information about the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter and how to select a value for it, see [[Deferred update feature#Setting the variable-length parameter(vl)|Setting the variable-length parameter(vl)]].  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To specify a value for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt;, but not &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt;, supply two consecutive commas before &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt;, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FILELOAD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k,n,m,,s2,s3,s4&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The same technique can be used to specify values for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/var&amp;gt;, and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FILELOAD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k,n,m,,,,,vl&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Alternatively, specify a zero or negative value for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; and allow the system to supply the default. The same technique can be used to specify values for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt;, and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/var&amp;gt;. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FILELOAD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k,n,m,&amp;lt;/var&amp;gt;0,-1,-2,-3,&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FILELOAD error reporting===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If a serious problem arises while the &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command is running, the user is restarted. A message is issued reporting the completion codes issued by the sorts. The message is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0760: SORT RETURN CODES - SORT 1: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxxxxx&amp;lt;/var&amp;gt;, &lt;br /&gt;
    SORT 2: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxxxxx&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The completion codes issued by the sorts (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;xxxxxx&amp;lt;/var&amp;gt;) are reported as six hexadecimal digits. The first three digits are the subtask system completion code, such as &amp;lt;code&amp;gt;0C4&amp;lt;/code&amp;gt;. The last three digits are the user completion code, such as &amp;lt;code&amp;gt;010&amp;lt;/code&amp;gt; (which is a decimal 16). These completion codes can be useful in determining whether a problem is in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; or is in the sort package itself.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==FLOD and FILELOAD command output==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the file load program has completed, the following counters are displayed: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This counter &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Displays the number of... &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;RECORDS INPUT &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Records read from the TAPEI (input) data set, including those skipped by the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;ADDS &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;New &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; records begun&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DELETES &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; records deleted&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;AF &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields added&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DF &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Fields deleted (not including those deleted through a &amp;lt;var&amp;gt;DELETE&amp;lt;/var&amp;gt; command) &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
These counters can help you ensure that you have added, deleted, or changed all the records that you intended to. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Load statements: overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; provides several File Load statements that are elements of a separate File Load language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file load language provides limited programming capability. If complicated edits or large amounts of data manipulation are required, consider using &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; exits, a preprocessing program, or a host language or SOUL program to load the file. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All File Load statements follow the &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
See the following sections for details:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#File Load statements: mode bits|File Load statements: mode bits]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#File Load statements: loading a new Model 204 file|File Load statements: loading a new Model 204 file]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#File Load statements: manipulating data areas with string buffers|File Load statements: manipulating data areas with string buffers]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#File Load statements: working with index registers|File Load statements: working with index registers]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#File Load statements: updating existing Model 204 records|File Load statements: updating existing Model 204 records]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#File Load statements: deleting records and fields|File Load statements: deleting records and fields]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===File Load statement summary===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
See [[#Syntax of File Load statements|Syntax of File Load statements]] for a complete summary of all statements in the File Load language.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Load statements: mode bits==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Many of the statements described in the next sections use mode bits. These mode bits allow you to specify various options that are discussed here. Most options can be summed.&amp;lt;/p&amp;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;&lt;br /&gt;
If numeric sequence numbers are present, you must specify mode bits.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mode bits summary===&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Mode bit &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;8000&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Begin a new &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;4000&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Delete a field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;2000&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Sort or hash key omitted (specified with X&#039;8000&#039;)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;1000&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Delete first occurrence of field&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;0800&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Suppress deletion of blanks&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;0400&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Translate numeric codes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;0200&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Load all-zero fields as &#039;0&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;0100&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Strip leading zeroes&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt;X&#039;0080&#039;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Read and load floating point data&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Begin a new Model 204 record (X&#039;8000&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Mode bit X&#039;8000&#039; causes a new &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record to be started. More than one &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record can begin on each pass through a file load program. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that the input statements for the following example each contained data for two people, with one person&#039;s data starting in column 1 and the other&#039;s in column 41. The file load program might look like this:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD 5000,5000,0&lt;br /&gt;
G&lt;br /&gt;
 SOC.SEC.NO=1,9,X&#039;8000&#039;          * begin a new record&lt;br /&gt;
 NAME=10,14&lt;br /&gt;
 DEPT=24,2&lt;br /&gt;
 SCALE=26,6&lt;br /&gt;
 SOC.SEC.NO=41,9,X&#039;8000&#039;         * begin a new record&lt;br /&gt;
 NAME=50,14&lt;br /&gt;
 DEPT=64,2&lt;br /&gt;
 SCALE=66,6&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The X&#039;8000&#039; mode bit begins a new record even if the field turns out to be all blank, and is not actually stored in the new record (that is, it is possible to have a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record that has no fields).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Delete a field (X&#039;4000&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The X&#039;4000&#039; mode bit deletes one field. It is used in conjunction with the read-and-load-a-field statement, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt;,&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt;,X&#039;4000&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For more information see [[#File Load statements: deleting records and fields|File Load statements: deleting records and fields]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Sort or hash key omitted (X&#039;2000&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The X&#039;2000&#039; mode bit allows you to specify that a record in a sort or hash key file does not have a sort or hash key. This mode bit can be used in conjunction with the X&#039;8000&#039; mode bit when reorganizing sort or hash key files. For more information, see [[File reorganization and table compaction#Reorganizing sorted and hash key files|Reorganizing sorted and hash key files]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Delete first occurrence of field (X&#039;1000&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The X&#039;1000&#039; mode bit, when combined with the X&#039;4000&#039; and X&#039;0800&#039; mode bits, allows you to delete a specific value from a record. Use the X&#039;4000&#039; mode bit to delete &amp;lt;var&amp;gt;INVISIBLE&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; fields; the value of the &amp;lt;var&amp;gt;INVISIBLE&amp;lt;/var&amp;gt; field must be specified. Use the combined mode bit X&#039;5800&#039; to delete specific values in multiply occurring visible fields. See [[#Deleting a VISIBLE field|Deleting a VISIBLE field]] and [[#Deleting specific values|Deleting specific values]] for more information.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Suppress blank deletion (X&#039;0800&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Unless suppressed with mode bit X&#039;0800&#039;, the File Load utility automatically deletes leading and trailing blanks from the value string. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Translate numeric codes (X&#039;0400&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Input data sometimes contains information in a coded format. For instance, in the example at the beginning of the section, the department field is expressed as a two-digit code to save space on the input line. The File Load utility can store this code as is. However, if the code is a simple numeric code ranging upwards from 0, you can provide a translation table, using mode bit X&#039;0400&#039;, following the read-and-load-a-field statement to convert these codes into full departmental names. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sample statement translates and stores a department code:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEPT=24,2,X&#039;0400&#039;&lt;br /&gt;
=                      * Code 0&lt;br /&gt;
ACCOUNTING=            * Code 1&lt;br /&gt;
PERSONNEL=             * Code 2&lt;br /&gt;
PURCHASING=            * Code 3&lt;br /&gt;
DATA PROCESSING=       * Code 4&lt;br /&gt;
=                      * Code 5&lt;br /&gt;
MEN&#039;S CLOTHING=        * Code 6&lt;br /&gt;
WOMEN&#039;S CLOTHING=      * Code 7&lt;br /&gt;
NOTIONS=&lt;br /&gt;
SPORTSWEAR=&lt;br /&gt;
MILLINERY=&lt;br /&gt;
ADMINISTRATIVE=&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An input line having &#039;06&#039; in columns 24 and 25 causes the field &amp;lt;code&amp;gt;DEPT=MEN&#039;S CLOTHING&amp;lt;/code&amp;gt; to be stored in the new record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating translation tables====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To create a translation table:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Specify mode bit X&#039;0400&#039; on the read-and-load-a-field statement.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Enter the value strings for codes 0 through &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; on the next &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;+1 lines, each starting in column 2 and immediately followed by an equal sign (&amp;lt;tt&amp;gt;=&amp;lt;/tt&amp;gt;). If a particular code is not used, represent it with a line having only an equal sign in column 2 (like codes 00 and 05 in the above example).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Signal the end of the translation table with a line that contains a period in column 1. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Rules for translation tables====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The code in the data area of the input record must be an EBCDIC character representation of a decimal number. A plus sign (&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;) is permitted; blanks are not.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Translation does not occur and the code itself is stored as the field value in the current &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record under the following circumstances: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Data area does not contain a correct positive numeric code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is larger than the translation table.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code corresponds to a line for which no value is specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;&lt;br /&gt;
Do not confuse numeric codes in the input data with the &amp;lt;var&amp;gt;CODED&amp;lt;/var&amp;gt; field type option of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; files. &amp;lt;var&amp;gt;CODED&amp;lt;/var&amp;gt; fields affect only the internal storage of the field value and are virtually transparent to the end-user.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Using multiple translation table entries on a single line====&lt;br /&gt;
&amp;lt;p&amp;gt;Yo&lt;br /&gt;
u can place more than one translation table entry on a single line using the following rules:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value for one entry must immediately follow the equal sign for the preceding entry. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Last entry on each line must end with an equal sign. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Entries are numbered just as if each entry appeared on a line by itself. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Period ending the table must always appear on a line by itself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The previous example can be written:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DEPT=24,2,X&#039;0400&#039;&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=ACCOUNTING=PERSONNEL=PURCHASING=&lt;br /&gt;
DATA PROCESSING==MEN&#039;S CLOTHING=&lt;br /&gt;
WOMEN&#039;S CLOTHING=NOTIONS=SPORTSWEAR=&lt;br /&gt;
MILLINERY=ADMINISTRATIVE=&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Loading a constant field using a translation table====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At times, you might want to specify a field to add to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record rather than taking a value from the input record. To do this, write a read-and-load-a-field statement that specifies a position and length of zero and a translation table that has one entry:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=0,0,X&#039;0400&#039;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Position zero is a special case that makes no reference to the current input record. For example, if the personnel records for more than one company are kept in the &amp;lt;code&amp;gt;PEOPLE&amp;lt;/code&amp;gt; file, the records for each company can be loaded in separate File Load runs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For a particular run, the following example adds the field &amp;lt;code&amp;gt;COMPANY=Rocket&amp;lt;/code&amp;gt; to every record loaded during that run:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;COMPANY=0,0,X&#039;0400&#039;&lt;br /&gt;
Rocket=&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Load zero fields as &#039;0&#039; (X&#039;0200&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Mode bit X&#039;0200&#039; loads all-zero fields as &#039;0&#039;. This option is valid only if used in conjunction with mode bit X&#039;0100&#039; (strip leading zeroes). Use mode bits X&#039;0100&#039; and X&#039;0200&#039; together to strip leading zeroes, but to ensure that a field containing all zeros is stored as &#039;0&#039;. This is useful when a zero field and a missing field have different meanings in the database. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Strip leading zeros (X&#039;0100&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To compress values, you can strip all leading zeroes from certain field values before they are loaded into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file using mode bit X&#039;0100&#039;. If a field contains all zeroes, it is stripped completely and is not stored. Unless blank deletion is suppressed, blanks are stripped before zeroes. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Read and load floating-point data (X&#039;0080&#039;)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Mode bit X&#039;0080&#039; indicates that the incoming data contains floating- point input. If the field to be loaded is not &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt;, the field value is converted to a character string for storage. If the field is &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt;, the value is stored with no conversion. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
With the mode bit turned off, character string input to a &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; field is converted to a floating-point value, if possible. Exponent format input is converted to numeric form for storage in &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; fields, and is left unconverted for non-&amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Floating-point format input to a &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; field is stored without conversion, but might be truncated or rounded, depending on its length. For more information about storing values in floating-point fields, see [[Floating point conversion, rounding, and precision rules]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Load statements: loading a new Model 204 file==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statements that can be used in a file load program are summarized here. Most file load statements are sensitive to the column in which they begin; note the specifications carefully. &amp;lt;/p&amp;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;&lt;br /&gt;
The file load statements use the vertical bar (&amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;) character (that is, the character that has the hexadecimal value X&#039;4F&#039;). If the vertical bar is not available on the terminal being used for the File Load run, use the up-arrow (&amp;lt;tt&amp;gt;&amp;amp;#x2191;&amp;lt;/tt&amp;gt;) or caret (&amp;lt;tt&amp;gt;^&amp;lt;/tt&amp;gt;) instead. The broken vertical bar symbol available on some ASCII terminals is not equivalent to the vertical bar. Use the up-arrow or caret for these terminals.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===G (go to the next logical record) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;G&amp;lt;/var&amp;gt; statement consists simply of the letter &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; in column 1. This statement causes the next logical record of the input data set to be positioned for processing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;G&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Various other file load statements can then refer to the data in the input record by specifying a relative position within the record. If the input records are of fixed or undefined length (RECFM = F, FB, or U), the data starts in position 1. If the records are of variable length (RECFM = V or VB), the data starts in position 5, and the binary length of the data is in positions 1 and 2.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no more input records remain, the file load program terminates and &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; goes on to the command that follows the &amp;lt;var&amp;gt;END&amp;lt;/var&amp;gt; statement.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===* statement (comment line)===&lt;br /&gt;
&amp;lt;p&amp;gt;Comment lines can be inserted anywhere in the file load program. Comment lines must have an asterisk in column 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;* This is a comment&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Read-and-load-a-field statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The read-and-load-a-field statement stores a field (in a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record) that contains the specified field name and a value extracted from the specified positions of the current input record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Read-and-load-a-field statement processing====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Before the value is stored, leading and trailing blanks are deleted from it for the sake of space saving and uniformity. (In retrieval specifications, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; considers &amp;lt;code&amp;gt;&#039;MALE&#039;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;MALE &#039;&amp;lt;/code&amp;gt; to be separate and distinct values.) Internal blanks are not changed in any way; for example: &amp;lt;code&amp;gt;&#039;A B&#039;&amp;lt;/code&amp;gt; is stored as &amp;lt;code&amp;gt;&#039;A B&#039;&amp;lt;/code&amp;gt; and not as &amp;lt;code&amp;gt;&#039;AB&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;A B&#039;&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the specified data area is entirely blank, then deleting the blanks reduces the length of the value to zero and the field is not stored. To load null values, use the &amp;lt;var&amp;gt;LOADNULLS ON&amp;lt;/var&amp;gt; statement as described on [[#LOADNULLS statement|LOADNULLS statement]]. Deleting leading and trailing blanks can be suppressed by using mode bits after the length specification.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; must start in column 2 and must be defined before running the file load program. &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; must be followed immediately by the equal sign with no intervening blanks. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; denotes the starting position of the field&#039;s value within the input record currently being processed and is always a positive number. (Position zero has a special significance that is explained in [[#Loading a constant field using a translation table|Loading a constant field using a translation table]].)&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; specifies the number of characters allotted to the value in the input record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/var&amp;gt; are optional and are described beginning on [[#File Load statements: mode bits|File Load statements: mode bits]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Load-constant (LDC) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The LDC statement loads a constant value into a field. &lt;br /&gt;
It is more efficient for loading a constant field than the translation table method described in [[#File Load statements: mode bits|File Load statements: mode bits]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;LDC &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;LDC&amp;lt;/var&amp;gt; begins in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; is the Model&amp;amp;nbsp;204 field into which the constant value is to be loaded.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/var&amp;gt; are optional and are the same as those described beginning on [[#File Load statements: mode bits|File Load statements: mode bits]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Equal signs (&amp;lt;tt&amp;gt;=&amp;lt;/tt&amp;gt;) are value delimiters. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;The following examples use the LDC statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load the value &amp;lt;code&amp;gt;1176 B&amp;lt;/code&amp;gt; into field &amp;lt;code&amp;gt;DEPT NO&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LDC DEPT NO=1176 B=&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Load the value &amp;lt;code&amp;gt;BOSTON&amp;lt;/code&amp;gt; into the field &amp;lt;code&amp;gt;CITY&amp;lt;/code&amp;gt; and begin a new &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LDC CITY=BOSTON=X&#039;8000&#039; &lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===LOADNULLS statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;LOADNULLS&amp;lt;/var&amp;gt; statement allows you to determine how to treat null values. Null values (values with a string length of zero) occur when you delete a data area that is blank.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;LOADNULLS [ON | OFF]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt; means that null values are loaded, the default.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; means that null values are not loaded.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If &amp;lt;var&amp;gt;LOADNULLS&amp;lt;/var&amp;gt; is not specified, the initial &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; state is set to &amp;lt;var&amp;gt;LOADNULLS OFF&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Load-repeating-field (LDRF) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;LDRF&amp;lt;/var&amp;gt; statement loads a variable number of occurrences of a fixed length field of an input record into a multiply occurring field of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record. If the number of occurrences of the fixed length field varies between input records, each input record must contain a field that specifies the number of occurrences. If the number of occurrences of the fixed length field is the same in all input records, the constant value can be loaded into a string buffer, and the &amp;lt;var&amp;gt;LDRF&amp;lt;/var&amp;gt; statement can refer to the string buffer. The fixed length fields must be adjacent in the input record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;LDRF &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;pos1&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;len1&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;pos2&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;len2&amp;lt;/span&amp;gt;[,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/span&amp;gt;][,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/span&amp;gt;]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;LDRF&amp;lt;/var&amp;gt; must begin in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pos1&amp;lt;/var&amp;gt; is the starting position within the input record of the first occurrence of the fixed length field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;len1&amp;lt;/var&amp;gt; is the length of each occurrence of the field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pos2&amp;lt;/var&amp;gt; is an EBCDIC number representing the number of occurrences of the fixed length field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;len2&amp;lt;/var&amp;gt;, in bytes, is the length of the number in &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pos2&amp;lt;/var&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/var&amp;gt; is optional and specifies an index register that points, after execution of the statement, to the record position just past the last occurrence loaded.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/var&amp;gt; are optional and described starting on [[#File Load statements: mode bits|File Load statements: mode bits]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pos2&amp;lt;/var&amp;gt; parameter is expected to be in EBCDIC. If this field is in the input record in some form, use the appropriate conversion statement (&amp;lt;var&amp;gt;CFB&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CFF&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CFP&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CFZ&amp;lt;/var&amp;gt;), with a string buffer. The string buffer can then be specified in the &amp;lt;var&amp;gt;LDRF&amp;lt;/var&amp;gt; statement as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;pos2&amp;lt;/var&amp;gt; parameter. See [[#File Load statements: manipulating data areas with string buffers|File Load statements: manipulating data areas with string buffers]] for more information about converting values. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, consider a file load program input file for a personnel database. The records might contain skill data that is likely to be multiply occurring. If the skill fields begin at position 45 of the input record, the length of each field is 15 bytes, a two-character EBCDIC occurrence count exists at record position 10, and the data is to be loaded into fields named &amp;lt;code&amp;gt;SKILL&amp;lt;/code&amp;gt;, the following statement loads the fields:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LDRF SKILL=45,15,10,2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Label definition (#) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Labels can be defined within a file load program by a statement in the form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;#&amp;lt;/var&amp;gt; (pound sign) is in column 1, and it is the label delimiter.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is a positive number. The minimum value for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is 1 (see [[#File load program execution|File load program execution]]). The maximum is either 4095 or the value of the parameter &amp;lt;var&amp;gt;[[LNTBL parameter|LNTBL]]&amp;lt;/var&amp;gt;, whichever is smaller. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Labels are used by these other file load statements:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unconditional branch&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Branch-on-character-equal&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; statements that transfer execution from one part of the procedure to another.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
These related statements are discussed in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Unconditional branches===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To force the execution of a file load program to transfer unconditionally to a statement other than the next one in line, specify a statement in the following form in column 1:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/var&amp;gt; is the &amp;quot;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&amp;quot; portion of the label as described in the previous section.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Branch-on-character-equal (=) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The branch-on-character-equal statement allows the execution of a file load program to transfer to a different part of the procedure if the character at a specified position of the input record is equal to a specified character. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;character&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;=&amp;lt;/var&amp;gt; (equal sign) is in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/var&amp;gt; is the &amp;quot;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&amp;quot; portion of the label defined elsewhere in the procedure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; denotes the position of the character in the input record to be compared.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;character&amp;lt;/var&amp;gt; is the EBCDIC character to which the input character is compared. If the characters are equal, execution is transferred to the file load statements following the specified label. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This statement can compare only one character at a time. The EBCDIC character must immediately follow the second comma in the statement. Be careful about what EBCDIC character you choose; you can only specify an unprintable character if the editor has special input capabilities. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, certain personnel input records contain the employee&#039;s sex (&amp;lt;code&amp;gt;F&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;M&amp;lt;/code&amp;gt;) in column 8, and the employee&#039;s spouse&#039;s name in columns 20 through 35: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G                            *Get a record from TAPEI&lt;br /&gt;
 SEX=8,1,X&#039;8000&#039;             *Start new rec, load SEX field&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=10,8,M                      *Branch to label 10 if SEX is M&lt;br /&gt;
 NAME OF HUSBAND=20,16       *Load husband&#039;s name&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=11                          *Branch to 11,skip wife&#039;s name&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#10                          *Branch here when SEX is M&lt;br /&gt;
 NAME OF WIFE=20,16          *Load wife&#039;s name&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#11                          *Fall through to END statement&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CASE statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; statement provides a character string compare and branch facility that allows the execution of a file load program to transfer to one of a number of other parts of the procedure based upon the contents of a data field at a specified position of the input record. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CASE &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&lt;br /&gt;
&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string1=label1&lt;br /&gt;
 string2=label2&lt;br /&gt;
 string3=label3&amp;lt;/span&amp;gt;&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
ENDCASE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; begins in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; denotes the starting position of the character string in the input record to be tested.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; denotes the length of the character string. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;stringN=labelN&amp;lt;/var&amp;gt; specifications form a branch table to indicate where to transfer control when the argument string is matched. Branch table entries must begin in column 2. &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; is limited to 25 or fewer entries.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;ENDCASE&amp;lt;/var&amp;gt;, starting in column 1, must be used to terminate the branch table. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; statement recognizes a match only if the content and length of the input record string argument are identical to the string value and length of one of the branch table entries. If no branch table entry matches the input record string argument, control passes to the statement following &amp;lt;var&amp;gt;ENDCASE&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Consider the following example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CASE 37,4&lt;br /&gt;
 JUNE=6&lt;br /&gt;
 JULY=7&lt;br /&gt;
 MAY =2&lt;br /&gt;
ENDCASE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; statement is executed, the four-character string that starts at position 37 of the input record is compared to each table entry. A match on content and length results in a branch to the procedure label following the &amp;lt;code&amp;gt;=&amp;lt;code&amp;gt;. Thus, if an input record contained &amp;lt;code&amp;gt;JUNE&amp;lt;/code&amp;gt; in positions 37-40, control is transferred to procedure label 6. If the record contained &amp;lt;code&amp;gt;JULY&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MAY&amp;lt;/code&amp;gt;, control is passed to label 7 or 2, respectively.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The table entry for &amp;lt;code&amp;gt;MAY&amp;lt;/code&amp;gt; in the previous example was expanded to four bytes. If the table entry is as follows, a match does not occur because its implies string length is 3:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;MAY=2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The comparison is of data content and length. Applications of the &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; statement, in which the length of the strings in the branch table vary, can be handled by using a file load program index register for the &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; length specification. Index registers are discussed in [[#File Load statements: working with index registers|File Load statements: working with index registers]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Transfer-on-condition (T) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the transfer-on-condition statement to compare two data areas of the input record and to transfer to a specified label if the comparison indicates a specified condition. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;T &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position1&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position2&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;condition&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;T&amp;lt;/var&amp;gt; is in column 1. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/var&amp;gt; is the &amp;quot;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;&amp;quot; portion of the specified label (see previous statements about labels).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position1&amp;lt;/var&amp;gt; is the position of the first data area.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; specifies the number of characters.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position2&amp;lt;/var&amp;gt; is the position of the second data area. Each data area is taken to be and is treated as a simple EBCDIC character string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;condition&amp;lt;/var&amp;gt; is represented by a decimal number, as follows: &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Code&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 2&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 4&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 7&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Not equal to&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 8&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Equal to&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 11&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Greater than or equal to&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td align=&amp;quot;right&amp;quot;&amp;gt; 13&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Less than or equal to&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example transfers to label 40, if the character string in columns 3 through 12 is greater than that in columns 31 through 40:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;T 40,3,10,31,2&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Read a field name from input data (D) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In some circumstances, the input data contains the names of the fields to be loaded as well as the values. The &amp;lt;var&amp;gt;D&amp;lt;/var&amp;gt; statement is similar to the read-and-load-a-field statement except that it also specifies the position and length of the field name within the current input. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;D &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position1&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length1&amp;lt;/span&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position2&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length2&amp;lt;/span&amp;gt;[,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/span&amp;gt;]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;D&amp;lt;/var&amp;gt; is in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position1&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length1&amp;lt;/var&amp;gt; specify the position and length of the data area that contains the field name. Leading and trailing blanks are deleted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position2&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length2&amp;lt;/var&amp;gt; specify the position and length of the data area that contains the field value.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/var&amp;gt; are optional and identical to the optional mode bits in [[#File Load statements: mode bits|File Load statements: mode bits]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Suppose that input statements are arranged so that each statement contains a field name in columns 2 through 31 and a field value in columns 32 through 80. Furthermore, column 1 contains a 1 if the field is the first field of a new record and a 2 otherwise. The input records are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;1SOC.SEC.NO           540237398&lt;br /&gt;
2NAME                 THORNHILL&lt;br /&gt;
2DEPT                 ACCOUNTING&lt;br /&gt;
1SOC.SEC.NO           239876433&lt;br /&gt;
2NAME                 DARCY&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following file load program loads the records:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G                             *Read new input record&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=10,1,2                       *Branch to 10 if rec starts with 2&lt;br /&gt;
D 2,30=32,49,X&#039;8000&#039;          *Load first fld of Model 204 rec&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=20                           *Branch to label 20&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#10&lt;br /&gt;
D 2,30=32,49                  *Add a field to Model 204 record&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#20&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Print a character string (P) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; statement to print selected portions of the current input record or of a string buffer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;P &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; is in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; indicates the starting position on the input record or string buffer.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; indicates the number of bytes of data to be printed from the input record or string buffer. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following statement can be used to print out sample input data:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,50,0&lt;br /&gt;
G&lt;br /&gt;
P 1,80&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This statement prints 50 input records of 80 bytes each.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;P&amp;lt;/var&amp;gt; statement also is useful for printing out input records that are not in an expected format. The following procedure prints out input records that contain something other than an &amp;lt;code&amp;gt;X&amp;lt;/code&amp;gt; or a &amp;lt;code&amp;gt;Y&amp;lt;/code&amp;gt; in column 1:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=10,1,X                 * Branch to 10 if first column is X.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=20,1,Y                 * Branch to 20 if first column is Y.&lt;br /&gt;
P 1,80                  * Print bad input record.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=30                     * Don&#039;t process bad record.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#10&lt;br /&gt;
  .&lt;br /&gt;
  .                     * Process X records.&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=30&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#20&lt;br /&gt;
  .&lt;br /&gt;
  .                     * Process Y records.&lt;br /&gt;
  .&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#30&lt;br /&gt;
END  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===STOP statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;STOP&amp;lt;/var&amp;gt; statement allows a file load program to exit before the number of records in the data set or specified in the file load program have been processed. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;STOP &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;return_code&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;return_code&amp;lt;/var&amp;gt; is an optional, nonzero number. This number sets the job step return code for the file load program step. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the &amp;lt;var&amp;gt;STOP&amp;lt;/var&amp;gt; statement is executed, the file load program ends evaluation of the statements in the procedure and displays the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*** M204.0697: FLOD FINISHED -- STOP STATEMENT&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the file load program &amp;lt;var&amp;gt;STOP&amp;lt;/var&amp;gt; statement executes, it ends the program, but not any of the other commands contained in the job stream.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Load statements: manipulating data areas with string buffers==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Two 256-byte areas, called string buffers, are provided to allow you to manipulate and reformat data areas before they are loaded. Use string buffers when:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Input contains a long data area that is continued over two or more input records&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Number of data areas are to be combined, reordered, or reformatted before loading&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using a numeric conversion statement (&amp;lt;var&amp;gt;CFB&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CFP&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CFF&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;CFZ&amp;lt;/var&amp;gt;)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using an &amp;lt;var&amp;gt;L/ENDL&amp;lt;/var&amp;gt; loop (see [[#L...ENDL statement (locate existing records)|L...ENDL statement (locate existing records)]]) &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use the following statements to manipulate the contents of the string buffers.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Statement&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;S &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Clears the string buffer; moves a character string into the buffer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;SC&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Clears the string buffer; moves a constant into the buffer&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;M&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Appends (moves) a character string into the buffer without clearing&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;MC&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Appends (moves) a constant into the buffer without clearing&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CFB&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Converts from binary&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CFF&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Converts from floating-point&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CFP&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Converts from packed decimal&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;CFZ&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Converts from zoned decimal&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Referring to string buffers===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any statement that refers to the normal input record can also refer to a string buffer. A position field in any statement can be modified to refer to the string buffer instead of the input record using the following format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position,&amp;lt;/span&amp;gt; {|0S | |1S} &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example branches to label 12 if column 37 of string buffer 0 contains an &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt;:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=12,37|0S,A&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example loads a field called &amp;lt;code&amp;gt;DATE&amp;lt;/code&amp;gt; with a value taken from the first six columns of string buffer 1:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DATE=1|1S,6&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The length of the current contents of a string buffer is remembered by &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; and can be used in any statement that contains a length field. This is done by immediately following the length with a vertical bar, the string buffer number, and the letter &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. This causes the current length of the specified string buffer to be added to the length field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Therefore, the length field normally is specified as zero.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example loads a field called &amp;lt;code&amp;gt;DATE&amp;lt;/code&amp;gt; with a value equal to the current contents of string buffer 1:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;DATE=1|1S,0|1S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example transfers to label 20, if the current contents of string buffer 0 are less than or equal to (condition 13) the contents of the date area beginning at column 73 of the current record:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;T 20,1|0S,0|0S,73,13&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, certain input records contain Social Security numbers in the form 123-45-6789 in columns 21 through 31. The following code removes the hyphens before the numbers are loaded into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;S       0,21,3        * Blank buffer; load 3 digits.&lt;br /&gt;
M       0,25,2        * Add middle 2 digits.&lt;br /&gt;
M       0,28,4        * Add last 4 digits. &lt;br /&gt;
SOC.SEC.NO=1|0S,9     * Load number from buffer.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===S statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt; statement clears the contents of the specified string buffer to blanks and then moves in a character string from the current input record. The string is left-justified in the string buffer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt; statement is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;S {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt; begins in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;0 and 1 are string buffers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; is the starting column number from which to read characters from the current input record.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; is the number of characters to read.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example clears buffer 0 and moves 11 characters from columns 29 through 39 of the current input record into the beginning of the buffer:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;S 0,29,11&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example clears string buffer 1 and inserts the character from column 3 of the input:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;S 1,3,1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example simply clears string buffer 0:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;S 0,1,0&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===M statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;M&amp;lt;/var&amp;gt; statement is almost identical to the &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt; statement except that the string buffer is not cleared first. Characters from the input record are simply appended to the existing contents of the buffer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the &amp;lt;var&amp;gt;M&amp;lt;/var&amp;gt; statement is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;M {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SC statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;SC&amp;lt;/var&amp;gt; statement clears the contents of the specified string buffer to blanks and then moves in a constant. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the &amp;lt;var&amp;gt;SC&amp;lt;/var&amp;gt; statement is: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;SC {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/span&amp;gt;=&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;SC&amp;lt;/var&amp;gt; begins in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;0 and 1 are string buffers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&amp;lt;var&amp;gt;=&amp;lt;/var&amp;gt; is any constant string. You &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;must&amp;lt;/var&amp;gt; specify the final equal sign. The constant can be up to 256 characters long.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example clears buffer 0 and moves the constant value, 7, into the beginning of the buffer:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;SC 0,7=&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MC statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;MC&amp;lt;/var&amp;gt; statement is almost identical to the &amp;lt;var&amp;gt;SC&amp;lt;/var&amp;gt; statement except that the string buffer is not cleared first. A constant value is simply appended to the existing contents of the buffer. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the &amp;lt;var&amp;gt;MC&amp;lt;/var&amp;gt; statement is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;MC {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/span&amp;gt;=&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Data conversion statements===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use string buffers as an intermediate storage area while converting input data from binary, packed decimal, zoned decimal, or floating-point to EBCDIC for storage in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Numeric data must be translated to character form if the data is to be accessible to a SOUL user.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
These statements are described in detail in the following sections.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CFB (convert from binary) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To allow you to translate from binary input data to a character string format for use in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;, the convert-from-binary instruction is provided.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statement format is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CFB {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CFB&amp;lt;/var&amp;gt; starts in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;0 and 1 are string buffers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; indicates where the binary data in the input record begins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; can be from 1-4 bytes. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The data in the specified position must be a 1- to 4-byte signed binary number. The &amp;lt;var&amp;gt;CFB&amp;lt;/var&amp;gt; instruction converts it to EBCDIC and stores it in the designated string buffer where it can be edited and/or loaded into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. Leading integer zeroes are stripped during conversion. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The first character of the result is either a significant digit or a minus sign (&amp;lt;tt&amp;gt;-&amp;lt;/tt&amp;gt;). If the input value is a zero, the result is a single zero. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, the following sequence converts a 2-byte binary field beginning in Position 4 of the input record to EBCDIC, leaving the result in string buffer 1:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CFB 1,4,2&lt;br /&gt;
 QUANTITY=1|1S,0|1S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The EBCDIC string is loaded from string buffer 1 into the &amp;lt;code&amp;gt;QUANTITY&amp;lt;/code&amp;gt; field of the current record.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CFF (convert from floating-point) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The convert-from-floating-point instruction converts short- or long-floating-point input data to a character string format for use in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statement format is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CFF {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:      &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CFF&amp;lt;/var&amp;gt; starts in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;0 and 1 are string buffers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; indicates where the binary data in the input record begins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; depends on the form of the input data. The input data can be either a short- or long-precision floating-point number. Length must be:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;4 for a short-precision number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;8 for a long-precision number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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;&lt;br /&gt;
If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; is specified incorrectly (neither 4 nor 8), a zero length results and no error indication is given. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Leading integer zeros and trailing fractional zeros are stripped during conversion. A decimal point is not included for an integer value. If the input value is a zero, the result is a single zero. If the input value is a negative number, the first character of the result is a minus sign. The result of the conversion has at least 15 digits of precision. The result of a CFF instruction can be loaded into a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record using a read-and-load-a-field statement, as shown in the following example.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CFF 1,20,8&lt;br /&gt;
 AMOUNT=1|1S,0|1S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For information about loading floating-point input directly into a field, see [[#Read and load floating-point data (X&#039;0080&#039;)|Read and load floating-point data (X&#039;0080&#039;)]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CFP (convert from packed decimal) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To allow you to translate from packed decimal input data to a character string format for use in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;, the convert-from-packed instruction is provided. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statement format is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CFP {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;[,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;decimal_position&amp;lt;/span&amp;gt;]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:  &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CFP&amp;lt;/var&amp;gt; starts in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;0 and 1 are string buffers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; indicates where the packed data in the input record begins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt;, specified in bytes rather than packed decimal digits, must be between 1 and 8. &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;&lt;br /&gt;
If the length is specified incorrectly (less than 1 or greater than 8) a zero length results and no error indication is given.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;decimal_position&amp;lt;/var&amp;gt; indicates where a decimal point can be inserted into the string, expressed as a number of digits to the right of the desired decimal point. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The data in the specified position must be a 1- to 8-byte packed decimal number, which starts on a byte boundary and, therefore, consists of an odd number of digits. This data is not checked for conformity to a packed decimal format. A number is assumed to be positive unless its sign position contains a valid minus sign.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;CFP&amp;lt;/var&amp;gt; instruction converts the data to EBCDIC and stores the result in the designated string buffer, where it can be edited and/or loaded into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. The first character of the result is either a blank or a minus sign, and leading and trailing zeros are not stripped. If a decimal position is specified, a decimal point is inserted in the string. If the decimal position is invalid (less than zero or greater than the number of digits in the input), a message is issued and the decimal point is not inserted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence converts a 6-byte packed decimal field beginning in Position 8 of the input record to EBCDIC, leaving the result in string buffer 1 with a decimal point inserted, giving the number two decimal places:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CFP 1,8,6,2&lt;br /&gt;
 AMOUNT=1|1S,0|1S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The result has the form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sddddddddd.dd&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s&amp;lt;/var&amp;gt; represents a blank or minus sign. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;d&amp;lt;/var&amp;gt; represents a digit between 0 and 9. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This result is then loaded into the &amp;lt;code&amp;gt;AMOUNT&amp;lt;/code&amp;gt; field of the current record from string buffer 1.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===CFZ (convert from zoned decimal) statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To allow translation from zoned decimal input data to a character string format for use in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;, the convert-from-zoned instruction is provided. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statement format is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CFZ {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;[,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;decimal_position&amp;lt;/span&amp;gt;]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CFZ&amp;lt;/var&amp;gt; starts in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;0 and 1 are string buffers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; indicates where the zoned data in the input record begins.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt;, specified in bytes, must be between 1 and 16. If the length is specified incorrectly (less than 1 or greater than 16), a zero length results and no error indication is given.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;decimal_position&amp;lt;/var&amp;gt; indicates where a decimal point can be inserted into the string, expressed as the number of digits to the right of the desired decimal point. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The data in the specified position must be a 1- to 16-byte zoned decimal number. The data is not checked for conformity to a zoned decimal format. If the zone of the low-order byte is not a valid minus sign, the number is assumed to be positive.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;CFZ&amp;lt;/var&amp;gt; instruction converts the data to EBCDIC and stores the result in the designated string buffer where it can be edited and/or loaded into the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file. The first character of the result is either a blank or a minus sign, and leading and trailing zeroes are not stripped. If the decimal position is invalid (less than 0 or greater than the number of digits in the input), a message is issued and the decimal point is not inserted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following sequence converts a 6-byte zoned decimal field beginning in position 20 of the input record to EBCDIC, leaving the result in string buffer 1 with a decimal point inserted, giving the number two decimal places:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CFZ 1,20,6,2&lt;br /&gt;
 PAYMENT=1|1S,0|1S&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The result has the form:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sdddd.dd&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s&amp;lt;/var&amp;gt; represents a blank or minus sign.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;d&amp;lt;/var&amp;gt; represents a digit between 0 and 9. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This result is then loaded into the &amp;lt;code&amp;gt;PAYMENT&amp;lt;/code&amp;gt; field of the current record from string buffer 1. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Load statements: working with index registers==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A number of work areas called index registers, which are used primarily to manipulate numbers, are available for use within file load programs. The numbers in these index registers are most often used to modify the position or length fields of other file load statements.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Number of allowable registers====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Index registers are denoted by index register numbers that can range from 1 to the value of the parameter &amp;lt;var&amp;gt;LNTBL&amp;lt;/var&amp;gt;, which defaults to 50 (see [[#File load program execution|File load program execution]]). The maximum number of index registers is 255, no matter how large &amp;lt;var&amp;gt;LNTBL&amp;lt;/var&amp;gt; is. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Index register size====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each index register is four bytes long (a fullword) and can contain number values between -2,147,483,648 and +2,147,483,647, inclusive.    &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting an index register===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; statement has a fairly complicated format. A number of simple forms are discussed first. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The basic statement format is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;I &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/span&amp;gt;,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;operands&amp;lt;/span&amp;gt;]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; is in column 1. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/var&amp;gt; is the number of the index register to be set.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;operands&amp;lt;/var&amp;gt; are optional operations that modify the indicated index register and can involve input records or other index registers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Clearing an index register===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If no optional operands are specified, the &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; statement sets the specified index register to zero. The following example sets index register 15 to zero:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 15&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting an index register from the input record===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As many as four bytes of data from the current input record can be loaded into an index register, using the following format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;I &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; is the number of bytes of data starting at the specified position that are placed into the specified index register right-aligned and padded with binary zeros on the left if length is less than 4. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example loads the first two bytes of the input record into index register 9:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 9,1,2 &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the input records are variable-length (RECFM=V or VB), index register 9 contains the number of characters of data in the record.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting an index register to a constant===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To set an index register to a specified number:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/var&amp;gt;,,,&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;number&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;number&amp;lt;/var&amp;gt;, which can be specified in decimal, hexadecimal (X&#039;&amp;lt;i&amp;gt;xx&amp;lt;/i&amp;gt;&#039;), or character (C&#039;&amp;lt;i&amp;gt;c&amp;lt;/i&amp;gt;&#039;) form, must be between -32,768 and +32,767, inclusive (two bytes). If a larger value is specified, only the low-order two bytes are used.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example sets index register 35 to minus one:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 35,,,-1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Adding to an index register===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A number can be added to the contents of an index register and stored back into that register or some other register.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
Use the following format:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;I &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/span&amp;gt;,,,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;number&amp;lt;/span&amp;gt;|&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number must conform to the previous rule for a constant.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that index register 23 contains the number 119. The following example sets index register 7 to 124. Register 23 still contains 119:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 7,,,5|23&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example changes the contents of register 23 from 119 to 99:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 23,,,-20|23&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Multiplying the contents of an index register===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The contents of an index register can be multiplied by a specified number and the result stored into that register or some other register.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
Use the following format:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;I &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/span&amp;gt;,,,,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;number&amp;lt;/span&amp;gt;|&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The number must conform to the rule given above for a constant.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, suppose that index register 4 contains the number 10. The following example sets index register 5 to -10. Register 4 still contains 10:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 5,,,,-1|4&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example changes the contents of register 4 from 10 to 70:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 4,,,,7|4&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Full format of I statement===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The full format of the &amp;lt;var&amp;gt;I&amp;lt;/var&amp;gt; statement is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;I &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;number2&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;number3&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index3&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In this full format the I statement computes the sum of these four quantities:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Data field of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; bytes at the specified position of the current input record&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;number2&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Contents of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/var&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Product of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;number3&amp;lt;/var&amp;gt; and the contents of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index3&amp;lt;/var&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The sum is then stored in &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; cannot exceed 4. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;number2&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;number3&amp;lt;/var&amp;gt; should follow the rule given above for a constant.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example adds the two bytes at the beginning of the input record, the contents of index register 15, and the contents of register 16, and stores the result in register 14:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 14,1,2,0|15,1|16&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Modifying position and length fields===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The position or length fields of most file load statements can be modified by the contents of any index register by immediately following the field with a vertical bar and the number of the index register. That is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;squareb&amp;quot;|&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The contents of the index register are added to the position or length number preceding the vertical bar. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Examples====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, if index register 18 contains 5, the following example branches to label 40 if column 8 of the current input record contains a semicolon (&amp;lt;tt&amp;gt;;&amp;lt;/tt&amp;gt;): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=40,3|18,;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Suppose that an input record contains a data area in columns 20 through 39 that has a person&#039;s name in the format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;last_name,first_name&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following code loads a &amp;lt;code&amp;gt;LAST NAME&amp;lt;/code&amp;gt; field composed of everything up to the comma:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;I 4                *Clear index register 4&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#31                *Top of comma loop check&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=32,20|4,,         *Branch to label 32 if comma found&lt;br /&gt;
I 4,,,1|4          *Add one to register 4&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=31                *Branch back to label 31&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#32&lt;br /&gt;
 LAST NAME=20,0|4  *Load last name (length in reg 4)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Referring to the contents of index registers===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In some cases, an index register can be treated as a data area itself. As such, the index register can be viewed as being four characters long (containing positions 1 through 4).&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Any file load statement that has a position field can refer to a position in a specified index register by replacing:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
with:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;indexposition&amp;lt;/var&amp;gt;&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/var&amp;gt;*&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;indexposition&amp;lt;/var&amp;gt; is 1, 2, 3, or 4 (position 1 is the high-order position).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/var&amp;gt; specifies the desired index register. The asterisk replaces the comma that normally follows the position specification. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example branches to label 40 if position 4 of index register 11 contains the EBCDIC character 3:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=40,4|11*3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The EBCDIC representation for 3 is equal to the number &amp;lt;code&amp;gt;X&#039;F3&#039;&amp;lt;/code&amp;gt;, or decimal 243. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following example branches to label 35 if the contents of positions 1 through 4 of index register 11 are equal to (condition 8) positions 1 through 4 of register 12. In other words, the following instruction simply compares two index registers: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;T 35,1|11*4,1|12*8&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Printing an index register value===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;Q&amp;lt;/var&amp;gt; statement prints the current numeric value of a specified index register as a decimal number. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;Q &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/span&amp;gt;    &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===File Load statements: updating existing Model 204 records===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use file load programs to update or retrieve data from existing records in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file as well as to load new records. The &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command and JCL are identical to those used for loading new records. The following special purpose file load statements can be used within file load programs to locate existing records, add fields, or determine the current value of an existing field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===L...ENDL statement (locate existing records)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement provides a means of locating all the existing records in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file with a specified field name = value pair. The field must be a &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; field. One pass is then made through a locate loop of file load statements for each record located in this way.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Beginning in &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; V4R2.0, the &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement supports the &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; attribute as well as the &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; attribute. Prior to V4R2.0, you might have defined fields in your files with both the &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; attributes, because you needed the &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; attribute for File Load &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement usage. In such cases, removing the &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; attribute eliminates Table C usage for that field and saves CPU time and disk I/O. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
During a particular pass, the located record becomes the current record (that is, the record updated by read-and-load-a-field statements, delete statements, and so on). If a new &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record has begun before the L statement, it is remembered and becomes the current record again when all the located records have been processed by the locate loop. If no records contain the specified field name = value pair, no passes are made through the locate loop. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A locate loop that follows an L statement consists of a sequence of file load statements followed by an &amp;lt;var&amp;gt;ENDL&amp;lt;/var&amp;gt; statement. You can use any file load statement except one that transfers control to a label outside the loop (that is, a label that is not between the &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;ENDL&amp;lt;/var&amp;gt; statements).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;The format of the &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;L {0 | 1},&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/span&amp;gt;[,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/span&amp;gt;]&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
ENDL&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; is in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;0 or 1 specifies the number of a string buffer that contains the value portion of the field name = value pair.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; must specify a field that has the &amp;lt;var&amp;gt;KEY&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index&amp;lt;/var&amp;gt; specifies the number of any unused index register. The index register is used as a work area by the locate loop.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/var&amp;gt; specifies a label to which control is to be transferred after passes have been made through the locate loop for all the located records. If no records are found by the &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement, control passes immediately to the label. For this reason, the statement after the &amp;lt;var&amp;gt;ENDL&amp;lt;/var&amp;gt; always needs a label or it is not executed. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;mode_bits&amp;lt;/var&amp;gt; are optional and described in [[#File Load statements: mode bits|File Load statements: mode bits]]. If default editing produces the wrong value, you must specify mode bits.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;ENDL&amp;lt;/var&amp;gt; ends the locate loop and must start in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Locate loops can be nested up to three levels. Each time an L statement is encountered, the current record is remembered and record processing is said to go down one level. When the lower locate loop has processed its records, the record processing goes up one level and the remembered record once again becomes the current record. Each nested locate loop operates a &amp;lt;var&amp;gt;FIND&amp;lt;/var&amp;gt; against the whole file of records, not just on the found set of the previous loop. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Nesting is shown in the following figure:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;caption&amp;quot; style=&amp;quot;width:346px&amp;quot;&amp;gt;Locate Loop Nesting&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;figure&amp;quot;&amp;gt;[[File:Locate loop nesting.gif|346px]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Suppose that a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file contains personnel information that includes a last name field. The input data contains last names in columns 1 through 20 followed by as many as three homonyms in columns 21-40, 41-60, and 61-80:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G                      * Get new input record&lt;br /&gt;
S 0,1,20               * Move last name into buffer 0&lt;br /&gt;
L 0,LAST NAME=30,45    * FR WHERE LAST NAME = last name&lt;br /&gt;
 HOMONYM=21,20         * Add Homonym Value&lt;br /&gt;
 HOMONYM=41,20         * Add Homonym Value&lt;br /&gt;
 HOMONYM=61,20         * Add Homonym Value&lt;br /&gt;
ENDL                   * END FOR&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#45&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For each input record, the previous procedure locates records that contain a &amp;lt;code&amp;gt;LAST NAME&amp;lt;/code&amp;gt; equal to the value in columns 1 through 20. For each such record, as many as three &amp;lt;code&amp;gt;HOMONYM&amp;lt;/code&amp;gt; fields are added.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A locate loop is quite similar to the following SOUL construction:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;LOOP:  FOR EACH RECORD WHERE fieldname = value&lt;br /&gt;
            .&lt;br /&gt;
            .&lt;br /&gt;
            .&lt;br /&gt;
        END FOR  &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===UP and DOWN statements (change record processing level)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The current record processing position can be changed through use of the &amp;lt;var&amp;gt;UP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;DOWN&amp;lt;/var&amp;gt; statements. The &amp;lt;var&amp;gt;UP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;DOWN&amp;lt;/var&amp;gt; statements consist of words starting in column 1. They can be used only within locate loops:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;UP&amp;lt;/var&amp;gt; statement causes record processing to go up one level. That is, the record that was remembered by the &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement once again becomes the current record and can be updated.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;DOWN&amp;lt;/var&amp;gt; statement reverses the process, and the record that the locate loop was processing at the time of the &amp;lt;var&amp;gt;UP&amp;lt;/var&amp;gt; statement becomes the current record. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;UP&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;DOWN&amp;lt;/var&amp;gt; statements must always occur in pairs.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement performs the &amp;lt;var&amp;gt;DOWN&amp;lt;/var&amp;gt; function automatically; an &amp;lt;var&amp;gt;ENDL&amp;lt;/var&amp;gt; statement performs an automatic &amp;lt;var&amp;gt;UP&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Suppose that a file contains two types of records: &amp;quot;people&amp;quot; records and &amp;quot;child&amp;quot; records. A number of child records are being loaded into the file. Each contains the name of the child&#039;s parent. It is assumed that the parent&#039;s record already is in the file. Moreover, the input data for the child records does not include addresses. As each child&#039;s record is loaded, this file load program locates the child&#039;s parent&#039;s record, reads its &amp;lt;code&amp;gt;ADDRESS&amp;lt;/code&amp;gt; field, and copies it into the new child record:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
   .&lt;br /&gt;
PARENT.NAME=65,15 *Add PARENT.NAME to child&#039;s record&lt;br /&gt;
S 1,65,15         *Move parent&#039;s name into buffer 1&lt;br /&gt;
L 1,NAME=43,20    *FR WHERE NAME = parent&#039;s name&lt;br /&gt;
F 19,ADDRESS=30,33  * FEO address&lt;br /&gt;
UP                  *  Make child&#039;s record current&lt;br /&gt;
 ADDRESS=1|30,0|33  *  Add address to child&#039;s record&lt;br /&gt;
DOWN                *  Make parent&#039;s record current&lt;br /&gt;
ENDF                * END FOR&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#19                * Transfer here at end of F loop.&lt;br /&gt;
ENDL                *END FOR&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#20                 *Transfer here at end of L loop.&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===F statement (read field values)===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; statement provides a means of reading the current value(s) of a specified field within the current record. One pass is made through an &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop of file load statements for each occurrence of the field within the record.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; statement is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;F &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; is in column 1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/var&amp;gt; specifies a label to which control is to be transferred after passes have been made through the &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop for all occurrences of the field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; must specify a field that has the &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; attribute.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/var&amp;gt; specify numbers of index registers not currently in use. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
At the beginning of each pass through the &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop, the value of the field occurrence to be processed in that pass is placed in a special work area, and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/var&amp;gt; is pointed at that work area. &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/var&amp;gt; contains the length of the current value. Thus, the statements within the &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop can refer to the current value by specifying a position of &amp;lt;code&amp;gt;1|&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; and a length of &amp;lt;code&amp;gt;0|&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After the last pass through the &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index1&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;index2&amp;lt;/var&amp;gt; still can be used to refer to the last value processed until another &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; statement is encountered. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop following an &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; statement consists simply of a sequence of file load statements followed by an &amp;lt;var&amp;gt;ENDF&amp;lt;/var&amp;gt; statement. Any file load statement can be used except:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One that transfers control to a label outside the &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; loop&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt; statement &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Another &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt; statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;DELETE&amp;lt;/var&amp;gt; statement &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Delete-field statement that deletes a &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; field &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following statements delete the last occurrence of the &amp;lt;code&amp;gt;CHILD&amp;lt;/code&amp;gt; field in the current record:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;F 27,CHILD=35,36&lt;br /&gt;
ENDF&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#27&lt;br /&gt;
 CHILD=1|35,0|36,X&#039;4000&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Load statements: deleting records and fields==&lt;br /&gt;
&lt;br /&gt;
===Deleting a record===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;DELETE&amp;lt;/var&amp;gt; statement deletes the current &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; record from the file. This statement consists of the word &amp;lt;var&amp;gt;DELETE&amp;lt;/var&amp;gt; in column 1. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following procedure deletes &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; records whose Social Security numbers correspond to those read from the input file:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G                      * Get an input record&lt;br /&gt;
S 1,1,9                * Move SSN to string buffer 1&lt;br /&gt;
L 1,SOC.SEC.NO=47,15   * FOR EACH matching M204 record&lt;br /&gt;
DELETE                 * Delete the record&lt;br /&gt;
ENDL                   * END FOR&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#15&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; run must be a multiuser run in order for the &amp;lt;var&amp;gt;NON-DEFFERABLE&amp;lt;/var&amp;gt; attribute to take effect at all. How to set up a multiuser run so that the &amp;lt;var&amp;gt;NON-DEFERRABLE&amp;lt;/var&amp;gt; attribute takes effect is described in [[Deferred update feature#Overriding deferred updates|Overriding deferred updates]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Two variations of the read-and-load-a-field statement allow you to delete fields from the current record. One form is limited to deleting &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; fields only. The other form can be used to delete &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;INVISIBLE&amp;lt;/var&amp;gt;, and multiply occurring fields. Descriptions of both variations follow.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deleting a VISIBLE field===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the statement used to delete a &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;=1,1,X&#039;5800&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; must start in column 2 and must specify a field that has the &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; attribute. If the field occurs in the current record more than once (for example, a &amp;lt;code&amp;gt;CHILD&amp;lt;/code&amp;gt; field), only the first occurrence is deleted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;1&#039;s are position and length indicators (as in the following subsection).&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;X&#039;5800&#039; is a combination of mode bit options (see [[#File Load statements: mode bits|File Load statements: mode bits]]). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following procedure changes the &amp;lt;code&amp;gt;ADDRESS&amp;lt;/code&amp;gt; fields of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; records whose Social Security numbers are provided in columns 1 through 9 of the input records. The new addresses are in columns 10 through 59:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FLOD -1,-1,0&lt;br /&gt;
G&lt;br /&gt;
S 0,1,9                   * Move SSN into string buffer 0&lt;br /&gt;
L 0,SOC.SEC.NO=15,20      * FR WHERE SOC.SEC.NO=value&lt;br /&gt;
 ADDRESS=1,1,X&#039;5800&#039;      * Delete old address&lt;br /&gt;
 ADDRESS=10,50            * Add new address&lt;br /&gt;
ENDL                      * END FOR&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#20&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deleting specific values===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Use this form of the read-and-load-a-field statement to delete any field value, even if it is &amp;lt;var&amp;gt;INVISIBLE&amp;lt;/var&amp;gt; or a value in a multiply occurring field.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The format of the statement used to delete a specific occurrence of a field is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/span&amp;gt;=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt;,X&#039;4000&#039;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; must start in column 2 and is followed immediately by an equal sign.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;position&amp;lt;/var&amp;gt; specifies the starting position within the current input record (or string buffer) of the specific value to be deleted.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; specifies the length of the value.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;X&#039;4000&#039; is the mode bit option for deleting a field (see [[#File Load statements: mode bits|File Load statements: mode bits]]). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;This delete-field statement differs from the first delete-field statement in the following ways:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Value must be specified as well as the field name.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Form can be used to delete &amp;lt;var&amp;gt;INVISIBLE&amp;lt;/var&amp;gt; fields as well as &amp;lt;var&amp;gt;VISIBLE&amp;lt;/var&amp;gt; fields.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;It can be used to delete the second, third, and subsequent occurrences of a multiply occurring field, as well as the first occurrence. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Deleting records===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The date-time stamp feature does not include support for &amp;lt;var&amp;gt;DELETE RECORD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;DELETE RECORDS&amp;lt;/var&amp;gt; processing. &amp;lt;var&amp;gt;DELETE RECORD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;DELETE RECORDS&amp;lt;/var&amp;gt; processing must be handled by your application software.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
As well, you can use logical delete techniques. However, in all forms of deleting records, it is your responsibility to maintain a log of record deletions, if you want one.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Handling the date-time stamp field in a file====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;DELETE FIELD&amp;lt;/var&amp;gt; command is prohibited for the &amp;lt;var&amp;gt;DTSFN&amp;lt;/var&amp;gt; field in a file when the &amp;lt;var&amp;gt;FOPT&amp;lt;/var&amp;gt; X&#039;10&#039; bit is set. Attempting to do so results in the following message:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2727: CAN&#039;T DELETE DTS FIELD WHEN FOPT=X&#039;10&#039; IS ON&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File load program execution==&lt;br /&gt;
&lt;br /&gt;
===File load program phases===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The file load program is processed in two phases. First, all of the statements between the &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; command and the &amp;lt;var&amp;gt;END&amp;lt;/var&amp;gt; statement are compiled. If any errors are detected, such as invalid field names or field-level security violations, the file load program is not executed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the compilation is successful, the procedure is executed.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Internal file load optimization feature===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Most file load programs add records to a new or partially loaded entry order file (where new records are always added at the end of the file). The internal file load optimization feature greatly optimizes file load program performance in such situations. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The internal file load optimization feature also enhances performance when loading records into new or reinitialized Reuse Record Number (&amp;lt;var&amp;gt;RRN&amp;lt;/var&amp;gt;) files. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In other environments, such as sorted, hash key, and unordered files, or for file load programs containing statements that examine or modify data already in the file (&amp;lt;var&amp;gt;DELETE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;F&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;L&amp;lt;/var&amp;gt;, or a statement having the X&#039;4000&#039; (delete) mode bit), the internal file load optimization feature is automatically turned off. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Storage tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
File load programs are compiled into various storage and work areas. These areas consist of the following tables:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;This table&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Contains...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NTBL&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Label definitions and index registers. Each NTBL entry is shared by the label and index register having the same number. The size of NTBL determines the highest number that can be used. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;QTBL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Statements in internal form. Each file load statement generates one QTBL entry. Entry sizes vary, but most entries are between 12 and 20 bytes long. Important exceptions are the read-and-load-a-field entry, which expands by 4 bytes for each entry in a translation table, and the &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; entry, which starts at 12 bytes and adds 8 bytes for every branch table entry. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;STBL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;All character strings specified for translation tables, &amp;lt;var&amp;gt;CASE&amp;lt;/var&amp;gt; statements, and &amp;lt;var&amp;gt;LDC&amp;lt;/var&amp;gt; statements. Each string is preceded by a 1-byte length. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;VTBL &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Compiler variables. A minimal amount of VTBL space is used if the file load program contains an L statement (locate loop). Entries are variable in length, but most range from 8 to 20 bytes. &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of each table is determined by a parameter that can be set in the File Load job. These parameters are &amp;lt;var&amp;gt;LNTBL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LQTBL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;LSTBL&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;LVTBL&amp;lt;/var&amp;gt;. For more information about these tables, see [[Large request considerations#Description of tables|Description of tables]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FLOD and FILELOAD exits===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; exits pass control from &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; to an Assembler or COBOL program, which allows you more sophisticated data manipulation capabilities. For complete information about  these exits, see [[FLOD exits]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error conditions==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section describes the file load program error conditions that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; can encounter because of preallocated field and field-level security violations. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Errors generated during file load program evaluation are &amp;lt;b&amp;gt;counting errors&amp;lt;/b&amp;gt;, which are described in the &amp;lt;var class=&amp;quot;book&amp;quot;&amp;gt;[[Media:M204_TerminalUserGuide_V75.pdf|Rocket Model 204 Terminal User&#039;s Guide]]&amp;lt;/var&amp;gt;. If the number of errors encountered during evaluation reaches the limit specified in the &amp;lt;var&amp;gt;ERMX&amp;lt;/var&amp;gt; parameter, the file load program is terminated and the user is restarted. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====File load performance====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The order in which fields are loaded affects the speed with which the file load program executes. This is particularly true when the go-faster feature is in effect. Execution speed can be optimized by loading preallocated fields before all other fields.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Preallocated field violations===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you try to load values in a preallocated field that are longer than the length specified in the field&#039;s &amp;lt;var&amp;gt;LENGTH&amp;lt;/var&amp;gt; option or you try to add more occurrences to a preallocated field than are specified in the field&#039;s &amp;lt;var&amp;gt;OCCURS&amp;lt;/var&amp;gt; option, an error is generated during the file load program evaluation. The value lengths specified in file load statements are not checked during compilation. Instead, actual value lengths are checked during evaluation, after blanks have been deleted and leading zeroes have been stripped. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; handles length and occurrence errors by issuing time error messages that specify the relevant field name and the internal record number of the record that &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; was processing when the error was encountered.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Except in the case of the LDRF (load-repeating-field) statement, nothing is stored for the statement that causes the error, and evaluation continues with the next file load statement. For LDRF, the occurrence causing the error is not stored, but &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; attempts to load subsequent values.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Field-level security violations===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All field-level security (FLS) violations, except those occurring in a &amp;lt;var&amp;gt;D&amp;lt;/var&amp;gt; statement used to load field = value pairs from the input data, can be detected during compilation of a file load program. FLS violations detected during compilation result in counting error messages that prevent evaluation of the file load program. An FLS violation that results from the compilation of a &amp;lt;var&amp;gt;D&amp;lt;/var&amp;gt; statement produces error messages that identify the input record number, the relevant field name, and the internal record number of the record that was being built when the error was encountered. The field is not stored in the file.   &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AT-MOST-ONE field violations===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you use &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; to load or modify records that have &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt; fields, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that the new or modified records do not violate &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt; constraints. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; detects and reports all violations of &amp;lt;var&amp;gt;AT-MOST-ONE&amp;lt;/var&amp;gt; in one pass of the input data. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; finds any fields that violate the constraints, the following occurs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Error is reported and the new or duplicate field is rejected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; continues processing the input data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;At the end of the run, the file is marked &amp;quot;logically inconsistent.&amp;quot;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Following error message is issued for each violation:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2119: AT-MOST-ONE CONSTRAINT VIOLATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recordnumber&amp;lt;/var&amp;gt;, FIELD IGNORED: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt;=&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===NUMERIC VALIDATION file violations===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When loading or modifying records in &amp;lt;var&amp;gt;NUMERIC VALIDATION&amp;lt;/var&amp;gt; files using &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ensures that the new or modified &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; fields do not violate &amp;lt;var&amp;gt;NUMERIC VALIDATION&amp;lt;/var&amp;gt; constraints. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; detects and reports all &amp;lt;var&amp;gt;FLOAT&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; violations. If &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; finds any numeric data type violations, the following occurs:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Error is reported with one of the following messages and the field is rejected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; (or &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt;) continues processing the input data.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;At the end of the run, the file is marked &amp;quot;logically inconsistent;&amp;quot; that is, the &amp;lt;var&amp;gt;[[FISTAT parameter|FISTAT]]&amp;lt;/var&amp;gt; parameter is set to X&#039;40&#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;One of the following error messages is issued for each violation:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2123: VALUE SPECIFIED VIOLATES BINARY DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, FIELD IGNORED: &lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
M204.2124: VALUE SPECIFIED VIOLATES FLOAT DATA TYPE VALIDATION IN RECORD &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;recno&amp;lt;/var&amp;gt;, FIELD IGNORED: &lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fieldname&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax of File Load statements==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This section provides the complete syntax of the &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; commands and all the file load statements. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FILELOAD command===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt; command has the following format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FILELOAD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;k,n,m&amp;lt;/span&amp;gt; [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/span&amp;gt;] [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/span&amp;gt;] [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/span&amp;gt;] [,[&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/span&amp;gt;] [,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/span&amp;gt;]]]]]&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt; is the maximum number of records loaded.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt; is the maximum number of passes through the file load procedure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; is the number of input records to skip before starting the load process.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s1&amp;lt;/var&amp;gt; is the amount of memory used for sorting the deferred update index records.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s2&amp;lt;/var&amp;gt; is the amount of memory used for sorting the deferred update &amp;lt;var&amp;gt;FRV&amp;lt;/var&amp;gt; index records.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s3&amp;lt;/var&amp;gt; is the amount of memory allocated for the two buffers used to pass data from &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; to the sorts.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;s4&amp;lt;/var&amp;gt; is the amount of memory allocated for the two buffers used to pass data from the sorts to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; is the maximum sort record length in variable-length record sorts. (&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; corresponds to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;L2&amp;lt;/var&amp;gt; of the &amp;lt;var&amp;gt;RECORD&amp;lt;/var&amp;gt; sort statement.) &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;vl&amp;lt;/var&amp;gt; parameter must be present for one-step File Load runs that update &amp;lt;var&amp;gt;ORDERED&amp;lt;/var&amp;gt; fields. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===FLOD command===&lt;br /&gt;
&lt;br /&gt;
====Syntax====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FLOD &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;k,n,m &amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;k&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;, and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;m&amp;lt;/var&amp;gt; have the same meanings as in &amp;lt;var&amp;gt;FILELOAD&amp;lt;/var&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Abbreviations===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following abbreviations and terms are used:   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Term or abbreviation&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Definition&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;i&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Index register number&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;len&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;n&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;n|sS&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;n|i&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Length, specified as one of:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Number&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Number + length of current contents of string buffers&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Number + contents of index register i&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;mode&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;8000&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;4000&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;2000&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;1000&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;0800&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;0400&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;0200&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;0100&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;0080&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;8000&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;X&#039;4000&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Four-digit hexadecimal number indicating field-loading options:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Begin a new record&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Delete the field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Sort or hash key omitted (specified with X&#039;8000&#039;)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Delete first occurrence of field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Do not strip leading or trailing blanks&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Translation table provided&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Load all-zero field as &#039;0&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Strip leading zeroes&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Floating-point input&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Begin a new record&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Delete the field&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;n,m&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Decimal integers&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;p&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;n&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;n|sS&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;n|i&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Position, specified as one of:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Position in current input record&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Position in string buffer s&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Followed by &amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;: n + contents of index register i is position in current input record &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Followed by &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;: n is position in index register &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;i&amp;lt;/var&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;s&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;String buffer number (0 or 1)&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The statements are listed in alphabetical order. Replace elements in lowercase. Uppercase elements appear as shown.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;File Load statement&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Action &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;field=p,len,mode&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Read-and-load-a-field&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;CASE p,len&lt;br /&gt;
&lt;br /&gt;
 string1=label1&lt;br /&gt;
 string2=label2&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
ENDCASE  &lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Branch based on string value &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;CFB s,p,len&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Convert from binary&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;CFF s,p,len&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Convert from floating point&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;CFP s,p,len,decimal-places&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Convert from packed decimal&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;CFZ s,p,len,decimal-places&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Convert from zoned decimal&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;D p1,len1=p2,len2,mode&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Read and load field name and value&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;DELETE&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Delete current record&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;DOWN&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Go down one locate level&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;END&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;End of file load program&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;ENDF&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;End of F loop&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;ENDL&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;End of L (locate) loop&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;F label,field=i1,i2&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Read field value from current record&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;G&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Get new input record&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;I i1,p,len,n|i2,m|i3&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Set i1 to (value of data in position p for len bytes) + n + i2 + (m * i3)&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;L s,field=i,label&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Locate field = string buffer value&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;LDC field=value=mode&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Load constant field&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;LOADNULLS ON|OFF&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Load null values&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;LDRF field=p1,len1,p2,len2,i,mode &lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Load repeating field&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;M s,p,len&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Append value to string buffer&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;MC s,value&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Append constant to string buffer&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;P p,len&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Print value&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;Q i&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Print value in index register&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;S s,p,len&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Clear string buffer and load value&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;SC s,value&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Clear string buffer and load constant&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;STOP&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Stop file load program &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td nowrap&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;T label,p1,len,p2,condition &amp;lt;/p&amp;gt;&lt;br /&gt;
where condition can be: &lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;2&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Greater than&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;4&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Less than&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;7&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Not equal to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Equal to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;11&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Greater than or equal to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;13&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Less than or equal to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Compare strings and branch conditionally&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;UP&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Go up one locate level &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;XG FLODXTn, c, r, s&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Pass fields to &amp;lt;var&amp;gt;FLOD&amp;lt;/var&amp;gt; exit program control&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;#n&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Define label n&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;=label,p,char&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Branch to label, optional comparison of char to input&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;*&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p&amp;gt;Comment&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt; &amp;lt;!-- end of div for &amp;quot;toclimit-3&amp;quot; --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File loading and reorganization]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Customizing_functions_and_translation_tables&amp;diff=78239</id>
		<title>Customizing functions and translation tables</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Customizing_functions_and_translation_tables&amp;diff=78239"/>
		<updated>2015-07-14T18:56:08Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Forgot the LSTR=YES&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written SOUL functions are stored in the user function module FUNU. The FUNU module is distributed as a skeletal module containing a table for functions and arguments, and the assembler code for one function. You can list the contents of FUNU using the procedures given in the Rocket Model&amp;amp;nbsp;204 Installation Guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Encoding/Decoding facility uses the translation tables contained in the distributed CDTB module. The &amp;lt;var&amp;gt;$Code&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Decode&amp;lt;/var&amp;gt; functions access the translation tables to allow the use of both coded and string values of fields. The contents of the translation tables can be listed by using the procedures listed in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can store messages and return codes for user-written functions in the MSGU module. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This page gives the procedures for adding user-written functions to the FUNU module, customizing the translation tables contained in the CDTB module, and adding messages to MSGU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are migrating to 31-bit or multiprocessing environments, review the conversion considerations summarized in [[#Converting user-written functions|Converting user-written functions]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For general directions on assembly and link-editing, see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Adding functions to the FUNU module==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can add user-written functions to the FUNU module before FUNU is assembled and linked into &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. Reassembly and relinking is required whenever you migrate to another release of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To add functions to the FUNU module:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Label the function table in the FUNU source code FUNUTAB.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;End the function table in the FUNU source code with &amp;lt;code&amp;gt;DC X&#039;FFFF&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The location of the function table in the code is not significant.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Make the new function available to the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SOUL compiler by adding an entry to the function table using the FN macro:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FN &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;function-name&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;R-type&amp;lt;/span&amp;gt;, (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/span&amp;gt; [, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/span&amp;gt;]...),ROUTINE=&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;function-name&amp;lt;/var&amp;gt; specifies a unique 1- to 7-character name of the function without the leading &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;. Spaces or special characters are not allowed.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written functions must not duplicate the name of Rocket Software functions. A list of Rocket Software functions is given in [[SOUL $functions]].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;R-type&amp;lt;/var&amp;gt; represents the type of value returned from the function. Only one value can be returned. &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt; represents a string value. &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; represents a numeric value. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/var&amp;gt; describes the type of argument value. More than one argument can be specified. &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt; represents a string value. &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; represents a numeric value. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, &amp;lt;code&amp;gt;$SEP&amp;lt;/code&amp;gt; receives three string arguments and returns a string value:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FN SEP,S,(S,S,S)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ROUTINE=&amp;lt;/var&amp;gt; identifies the name on the ENTER macro of the routine that actually implements the function.  This allows the name of the $function (the name on the FN macro) to be greater than 7 characters.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;For example, one of the MQ/204 $functions, $MQ_FIND_QUEUE_ENTITY, has these two entries (not in FUNU) for FN and ENTER:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FN    MQ_FIND_QUEUE_ENTITY,S,(S,S),MP=OK,ROUTINE=$MQFNDQ&lt;br /&gt;
...&lt;br /&gt;
$MQFNDQ  ENTER ZMODE=64&lt;br /&gt;
  assembly language code for the function&lt;br /&gt;
         LEAVESTR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code the function (as described in [[#Coding a function|Coding a function]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Coding a function==&lt;br /&gt;
===Coding conventions===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following conventions are required for coding a user-written function:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin the function code with: &lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;$&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;name&amp;lt;/span&amp;gt; ENTER&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;End the function code with:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;POOL&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Observe the following register conventions (correspondence between Rocket Software mnemonic names and IBM general registers is printed at the beginning of the module in the expansion of the STARTS macro):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Registers RC, R6, PD, and RL must not be modified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Registers T1 through T5 and R1 through R5 can be used as work registers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Registers R1 through R5 are somewhat more permanent. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use BUF1 and BUF2 (260 bytes each) as buffers (doubleword aligned). &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use string, numeric, or omitted arguments. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===String arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument is type &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, you can move the argument into a work area by using the following code. Registers R1 through R4 are used by this sequence:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ARG &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
L R2,4(X1)&lt;br /&gt;
CCALL RTSTRL&lt;br /&gt;
EX R2,FOO&lt;br /&gt;
STC R2,BUF1&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
FOO MVC BUF1(0),0(R1)&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;ARG&amp;lt;/code&amp;gt; macro returns the VTBL pointer to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument in X1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;RTSTRL&amp;lt;/code&amp;gt; routine sets &amp;lt;code&amp;gt;R2&amp;lt;/code&amp;gt; to the length of the string, and it sets &amp;lt;code&amp;gt;R1&amp;lt;/code&amp;gt; to address-1 of the string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The length of the string is given by register &amp;lt;code&amp;gt;R2&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The string is moved to &amp;lt;code&amp;gt;BUF1&amp;lt;/code&amp;gt;, starting at location &amp;lt;code&amp;gt;BUF1 + 1&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The string length is moved to location &amp;lt;code&amp;gt;BUF1&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Numeric arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument of a function is type &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, you can obtain the argument in floating-point form or binary integer form (truncated or rounded) using registers R1 through R3, as follows:    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ARG &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
LA R3,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&lt;br /&gt;
CCALL INTEG&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/var&amp;gt; = 0, if a truncated value is required.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value,&amp;lt;/var&amp;gt; if a rounded value is required. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After this sequence, F0 contains the original floating-point value. If the number is valid, R1 contains the integer portion of the number as a binary value and R2 is zero. If the number is invalid, R1 is zero and R2 is nonzero.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Omitted arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing a call to a function, you can omit an argument, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$Read( )&lt;br /&gt;
$Substr(NAME,,5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the omitted argument is type &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the value of the argument defaults to a null string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If the argument is type &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the value defaults to zero. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====NOARG option====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; option on the ARG macro in the event that an argument is omitted. When &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; is used, the code branches to the location indicated by the &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; option. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ARG n,NOARG=ALLDONE&lt;br /&gt;
L R2,4(X1)&lt;br /&gt;
CCALL RTST&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
CCALL DKRL&lt;br /&gt;
ALLDONE DS OH&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
LEAVESTR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can also specify the following, which returns control to the next sequential instruction after the &amp;lt;var&amp;gt;ARG&amp;lt;/var&amp;gt; statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NOARG = *&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Using the ENTER macro to allocate working storage===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use the &amp;lt;var&amp;gt;VARS&amp;lt;/var&amp;gt; argument of the ENTER macro to define stack variables for working storage unique to each user-written function. This method of allocating storage is preferable to STORAGE, GETMAIN, and FREEMAIN instructions. Using the ENTER macro avoids the possibility of causing Online waits or having all users share the same storage.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Syntax for ENTER VARS====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ENTER VARS = (,            X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength1&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname2&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength2&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname3&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength3&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
), AMODE=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must initialize each of these variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Routines available for user written $functions====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are CCALL entry points for: DATE, DATE3, and DATE4. All routines must be called with T1 pointing to a 26-byte answer area. Rocket Software recommends that you allocate the answer area using the &amp;lt;code&amp;gt;VARS=(name, len)&amp;lt;/code&amp;gt; pushdown list variable of the ENTER macro.&lt;br /&gt;
The following table lists how the current date and time is stored in the area with this format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Formats used to store the date routines&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Code entry point&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Format used for storing...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;YY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE3&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;CYY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE4&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;YYYY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All registers are returned intact with the exception of the DATE call. The DATE call changes only the T4 register, returning the number representing the current month (1-12).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that there are double SPACEs before and after the &amp;quot;MON DD&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return values===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Functions can return a string or a numeric value. The following coding considerations apply:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To return a string value, end the function routine by doing the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R1 with a pointer to the location of the result string minus one.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Load R2 with the length of the result string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVESTR macro at the end of the code, just before POOL or LTORG to drop local addressability.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To return a numeric value, end the function routine in one of the following ways, depending on how the result is computed:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For an integer result, end the code end with the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load the binary integer into R1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Zero R2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVENUM macro just before POOL or LTORG.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For a floating-point result, end the code with the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load F0 with the long floating-point number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVEF0 macro just before POOL or LTORG.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To return a longstring value, end the function routine by doing the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code LSTR=YES on the end of the FN macro, along with the S for string output.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R1 with a pointer to the location of the result longstring minus one. If very long it will have to be above the bar.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R2 with the length of the result longstring.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVELST macro at the end of the code, just before POOL or LTORG to drop local addressability.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To avoid affecting the performance of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; multithreading operations, ensure that a SOUL function does not invoke any kind of synchronous operating system service that could result in a wait.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Coding messages===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can add messages and codes specific to user-written functions by adding EDEF message lines to the MSGU module. These are referenced in your functions by invoking the ERROR macro.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To code and activate messages and return codes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add EDEF statements to MSGU as needed in place of the dummy EDEF in the distributed module.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Add ERROR macros to your functions, referring to messages in MSGU by message number as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ERROR &amp;lt;i&amp;gt;errnum&amp;lt;/i&amp;gt;,OPT=USER&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reassemble MSGU and FUNU.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Relink the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; modules (for example BATCH204, ONLINE) in which MSGU and FUNU are included.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====EDEF statements in MSGU====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each EDEF statement defines a message. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====EDEF statement syntax=====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;EDEF &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;msgno&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aaaa&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;batchrc&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ssss&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;text&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;msgno&amp;lt;/var&amp;gt; denotes message number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aaaa&amp;lt;/var&amp;gt; denotes action bits controlling output, snap generation, register pointers, and so on.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;class&amp;lt;/var&amp;gt; (E, I, or P) specifies batch and Online return code requirements.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;batchrc&amp;lt;/var&amp;gt; specifies batch return code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ssss&amp;lt;/var&amp;gt; denotes snap bits controlling contents of snaps and dumps.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;text&amp;lt;/var&amp;gt; contains message text, which can contain %variables passed by invocation of the ERROR macro.&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 complete details on these EDEF arguments, refer to the internal documentation in the MSGU listing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Encoding/Decoding facility==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SOUL &amp;lt;var&amp;gt;[[$Code]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[$Decode]]&amp;lt;/var&amp;gt; functions provide the capacity to operate with both coded and string values of fields.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===CDTB module===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define code tables in the CDTB module, which you must include in any load module needed to support the &amp;lt;var&amp;gt;$Code&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Decode&amp;lt;/var&amp;gt; functions (usually with BATCH204 and ONLINE configurations).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
CDTB is an assembly language program consisting of:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Three macros used to define each table distributed in source code form&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Comments explaining the macros&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CSECT statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Three sample tables&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;END statement &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The macros contained in the CDTB module are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CODETABL&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CODETABL &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;id&amp;lt;/var&amp;gt; is a 1- to 8-character string, not enclosed in quotation marks, used to identify the table.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; is the length of the longest code found in the table. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODETABL macro builds a table header that consists of a pointer to the next table, the table identifier, the number of entries in the table, and the length of the longest code. Each table defined must specify one CODETABL macro.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CODE&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CODE &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;code&amp;lt;/span&amp;gt;, &#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&#039; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;code&amp;lt;/var&amp;gt; is the code not enclosed in quotation marks and not longer than the length specified in the previous CODETABL macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; is the string associated with the code and is enclosed in quotation marks. The string can have up to 255 characters. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODE macro builds one entry that consists of the code, the string length, and the string value. The CODE macro must be used individually for each entry in the table. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;ENDTAB&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ENDTAB&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ENDTAB requires no operands and indicates the end of the current table. One ENDTAB macro is required for each table. ENDTAB completes the definition of the table by: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Returning to the header created by the previous CODETABL macro&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updating the information about the pointer to the next table&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updating the number of entries in the table just defined&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Setting up information to start the next table or to mark the end of all tables &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Customizing the sample translation tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To modify the distributed sample translation tables (refer also to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;List CDTB with its sequence numbers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Replace the sample tables by using an appropriate operating system utility program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Assemble the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Link the object modules into the appropriate &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; load modules.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Modifying translation tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To make additions, deletions, or changes to translation tables (refer also to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Modify the source code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Assemble the source code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Link-edit the new CDTB module into the appropriate &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; load modules.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sizing the CDTB module===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the CDTB module depends on the tables defined. If tables are very large, CDTB might require a significant amount of storage, resulting in an adjustment to the REGION size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each table entry requires:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of bytes in the longest code + 1 (for string length) + the number of bytes in the string + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
32 bytes per table is required overhead for header information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Converting user-written functions==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written $functions may need to be modified if you are migrating to 31-bit or multi-processing environment. While Rocket Software generally discourages customers from coding $functions that have extensive dependencies on &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; internal data structures and algorithms, some customers have found it necessary to do so. These conversion notes describe the changes required for the conversion of most $functions.&amp;lt;/p&amp;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;&lt;br /&gt;
These sections do not provide complete descriptions of all internal data structure and algorithm changes that have been made to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;; nor are they to be construed as official sanction on Rocket Software&#039;s part of the use of any specific interfaces or of the dependency on any specific data structure or algorithm. All such interfaces, data structures, and algorithms remain subject to change without notice.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#Additional requirements for systems using 31-bit architecture|Additional requirements for systems using 31-bit architecture]] applies to all sites that use 31-bit architecture. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;[[#Additional requirements for MP/204 (multiprocessing)|Additional requirements for MP/204 (multiprocessing)]] applies to users of MP/204 (multiprocessing). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Coding requirements for all operating systems===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Observe the following coding requirements for all operating systems:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; runs in 64-bit mode and requires all registers to be saved and restored using the grande versions of the assembly instructions STM (Store Multiple) and LM (Load Multiple). All user-written functions must be reviewed and modified to use STMG and LMG instructions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Change $functions that refer to KX or KY as follows: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remove X,Y arguments from the KOMMS macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code the new FSA macro with the same X,Y arguments that were present on the KOMMS macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Modify references to fields in KX or KY to use a different base register from the KOMM base register as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L      reg,KJFLKX&lt;br /&gt;
USING  KX,reg&lt;br /&gt;
refer to KX or KY fields&lt;br /&gt;
DROP   reg&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;From the CCALL MOVEIN routine, remove CCALL. This places the code inline. By expanding the code, efficiency is improved. The input and output are the same as before. However, you might have to add pool statements to the macro, since the offset points to a pool.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Some KOMM fields have been moved from KA-KD to KZ. While user-written $functions should not generally reference these fields, those that do need to address KZ as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L      reg, KBPKZ&lt;br /&gt;
USING  KZ,reg&lt;br /&gt;
refer to KZ fields&lt;br /&gt;
DROP   reg&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The CSAVE or IOSAVE macros replace the SETAMODE macro in the MACLIB.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The AMODE parameter of the ENTER macro is ignored. The CCALL, ENTER, and KARTN sequences no longer cause switches in addressing mode.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The XAMODE macros are now obsolete and have been deleted from Rocket Software-delivered MACLIBs. Consequently, it is no longer necessary to maintain XAMODE$U. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reassemble FUNU and FUNUUG. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Additional requirements for systems using 31-bit architecture===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All code receives control in 31-bit mode. See IBM z/OS/XA Principles of Operation for differences between 24-bit and 31-bit mode operation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Nearly all &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; data structures (servers and PCBs, for example) are in 31-bit storage. Pointers to such data structures must be 31-bit addresses. Three-byte address constants, for example &amp;lt;code&amp;gt;AL3(xyz)&amp;lt;/code&amp;gt;, cannot be used as pointers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code that explicitly manipulates &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; four-byte string codes must be modified to remove the high-order byte from the string code prior to adding KUPVT or KUPST. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If you invoke a z/OS service that must receive control in 24-bit mode (such as BSAM) use CSAVE or IOSAVE with the &amp;lt;code&amp;gt;AMODE=24&amp;lt;/code&amp;gt; parameter. Code CRSTR or IORSTR with the &amp;lt;code&amp;gt;AMODE=31&amp;lt;/code&amp;gt; parameter. You cannot reference KOMM or the pushdown list between &amp;lt;code&amp;gt;AMODE=24&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AMODE=31&amp;lt;/code&amp;gt; brackets.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; parameter (described in [[#NOARG option|NOARG option]]) is required for &amp;lt;var&amp;gt;ARG&amp;lt;/var&amp;gt; statements in 31-bit mode.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot use the CCALL macro in 24-bit mode. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For users of the multiple KOMM feature: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the $function switches to z/OS register conventions, RC might at some point no longer be equal to KOMM. Use the following code to locate KOMM:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CURROSW REG=x&lt;br /&gt;
LLGF y,OSWPUK-OSW(,x)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;In ESA systems, each user&#039;s KOMM is allocated in 31-bit storage. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
(See the discussion of MP system parameters in [[Performance monitoring and tuning]]). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Additional requirements for MP/204 (multiprocessing)===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The FN macro has an MP argument, which defaults to &amp;lt;code&amp;gt;NO&amp;lt;/code&amp;gt;. Other legal values are &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;YES&amp;lt;/code&amp;gt;. When the FN macro specifies &amp;lt;code&amp;gt;MP=NO&amp;lt;/code&amp;gt;, the $function is guaranteed to execute in the maintask.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a $function is invoked that specifies &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt;, that $function might execute in one of the MP subtasks, depending on whether &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is running in parallel a section of code that contains it. If so, the $function is eligible to execute in a subtask.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a $function is invoked that specifies &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, that $function executes in one of the MP subtasks, regardless of whether the section of code within which it is contained is running in parallel. Usually, only $functions with relatively long pathlength should specify &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, because the cost of switching from the maintask to a subtask can be in the thousands of instructions. Because the exact cost of switching tasks depends on how busy the subtasks and the maintask are, measurements should be made in marginal circumstances.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;$functions that are eligible for subtask execution actually execute on one of the subtasks under either of the following conditions: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;SCHDOPT=X&#039;02&#039;&amp;lt;/code&amp;gt; is specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The section of code in which the $function is coded is executed at a time when other users are on the scheduler&#039;s READY queue. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;$functions that specify &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Are not guaranteed to always execute in the same subtask when &amp;lt;var&amp;gt;[[NMPSUBS parameter|NMPSUBS]]&amp;lt;/var&amp;gt; is greater than 1. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must be re-entrant.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must not use any internal &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; interfaces that require maintask execution, for example, APUT, DKIW, and CENQxxx.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt; have no effect when the MP feature is not in use (&amp;lt;code&amp;gt;NMPSUBS=0&amp;lt;/code&amp;gt;).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Additional requirements for zIIP processing===&lt;br /&gt;
If Model 204 runs with [[Performance monitoring and tuning#Offloading Model 204 work to zIIP processors|zIIP processors]], an &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MP=ZYES&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;MP=ZOK&amp;lt;/code&amp;gt; setting in the FN macro might cause a $function to be executed on the zIIP subtask, which does not allow an SVC instruction. Customers planning to use zIIP processing must do either of these: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Inspect any user-written $functions for non-tolerant code. This is code that uses an explicit SVC instruction or requests system services that might use an SVC, like BSAM, VTAM, or task-mode z/OS macros, or macros that are not allowed to be invoked on an SRB (enclave Service Request Block, the environment when a $function is executed on a zIIP processor). Bracket this code with &amp;lt;code&amp;gt;SRBMODE OFF&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SRBMODE ON&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify &amp;lt;code&amp;gt;MP=NO&amp;lt;/code&amp;gt; (the default) or no &amp;lt;var&amp;gt;MP&amp;lt;/var&amp;gt; setting at all in the FN macro to cause $functions to run on the maintask and not on a zIIP SRB. Any other value for &amp;lt;var&amp;gt;MP&amp;lt;/var&amp;gt; enables $functions to run on zIIP subtasks. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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; It is not always obvious if code may or may not run on a zIIP subtask. Even if all explicit SVCs and non-task-mode system macros issued by Model&amp;amp;nbsp;204 have been identified and bracketed, some may be issued implicitly by z/OS or other services, so user testing is important. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:System management]]&lt;br /&gt;
[[Category:Model 204 operational issues]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Customizing_functions_and_translation_tables&amp;diff=78238</id>
		<title>Customizing functions and translation tables</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Customizing_functions_and_translation_tables&amp;diff=78238"/>
		<updated>2015-07-14T18:46:44Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Oops messed up the li and ol nesting.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written SOUL functions are stored in the user function module FUNU. The FUNU module is distributed as a skeletal module containing a table for functions and arguments, and the assembler code for one function. You can list the contents of FUNU using the procedures given in the Rocket Model&amp;amp;nbsp;204 Installation Guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Encoding/Decoding facility uses the translation tables contained in the distributed CDTB module. The &amp;lt;var&amp;gt;$Code&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Decode&amp;lt;/var&amp;gt; functions access the translation tables to allow the use of both coded and string values of fields. The contents of the translation tables can be listed by using the procedures listed in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can store messages and return codes for user-written functions in the MSGU module. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This page gives the procedures for adding user-written functions to the FUNU module, customizing the translation tables contained in the CDTB module, and adding messages to MSGU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are migrating to 31-bit or multiprocessing environments, review the conversion considerations summarized in [[#Converting user-written functions|Converting user-written functions]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For general directions on assembly and link-editing, see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Adding functions to the FUNU module==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can add user-written functions to the FUNU module before FUNU is assembled and linked into &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. Reassembly and relinking is required whenever you migrate to another release of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To add functions to the FUNU module:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Label the function table in the FUNU source code FUNUTAB.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;End the function table in the FUNU source code with &amp;lt;code&amp;gt;DC X&#039;FFFF&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The location of the function table in the code is not significant.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Make the new function available to the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SOUL compiler by adding an entry to the function table using the FN macro:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FN &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;function-name&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;R-type&amp;lt;/span&amp;gt;, (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/span&amp;gt; [, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/span&amp;gt;]...),ROUTINE=&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;function-name&amp;lt;/var&amp;gt; specifies a unique 1- to 7-character name of the function without the leading &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;. Spaces or special characters are not allowed.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written functions must not duplicate the name of Rocket Software functions. A list of Rocket Software functions is given in [[SOUL $functions]].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;R-type&amp;lt;/var&amp;gt; represents the type of value returned from the function. Only one value can be returned. &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt; represents a string value. &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; represents a numeric value. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/var&amp;gt; describes the type of argument value. More than one argument can be specified. &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt; represents a string value. &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; represents a numeric value. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, &amp;lt;code&amp;gt;$SEP&amp;lt;/code&amp;gt; receives three string arguments and returns a string value:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FN SEP,S,(S,S,S)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ROUTINE=&amp;lt;/var&amp;gt; identifies the name on the ENTER macro of the routine that actually implements the function.  This allows the name of the $function (the name on the FN macro) to be greater than 7 characters.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;For example, one of the MQ/204 $functions, $MQ_FIND_QUEUE_ENTITY, has these two entries (not in FUNU) for FN and ENTER:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FN    MQ_FIND_QUEUE_ENTITY,S,(S,S),MP=OK,ROUTINE=$MQFNDQ&lt;br /&gt;
...&lt;br /&gt;
$MQFNDQ  ENTER ZMODE=64&lt;br /&gt;
  assembly language code for the function&lt;br /&gt;
         LEAVESTR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code the function (as described in [[#Coding a function|Coding a function]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Coding a function==&lt;br /&gt;
===Coding conventions===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following conventions are required for coding a user-written function:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin the function code with: &lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;$&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;name&amp;lt;/span&amp;gt; ENTER&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;End the function code with:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;POOL&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Observe the following register conventions (correspondence between Rocket Software mnemonic names and IBM general registers is printed at the beginning of the module in the expansion of the STARTS macro):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Registers RC, R6, PD, and RL must not be modified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Registers T1 through T5 and R1 through R5 can be used as work registers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Registers R1 through R5 are somewhat more permanent. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use BUF1 and BUF2 (260 bytes each) as buffers (doubleword aligned). &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use string, numeric, or omitted arguments. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===String arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument is type &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, you can move the argument into a work area by using the following code. Registers R1 through R4 are used by this sequence:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ARG &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
L R2,4(X1)&lt;br /&gt;
CCALL RTSTRL&lt;br /&gt;
EX R2,FOO&lt;br /&gt;
STC R2,BUF1&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
FOO MVC BUF1(0),0(R1)&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;ARG&amp;lt;/code&amp;gt; macro returns the VTBL pointer to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument in X1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;RTSTRL&amp;lt;/code&amp;gt; routine sets &amp;lt;code&amp;gt;R2&amp;lt;/code&amp;gt; to the length of the string, and it sets &amp;lt;code&amp;gt;R1&amp;lt;/code&amp;gt; to address-1 of the string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The length of the string is given by register &amp;lt;code&amp;gt;R2&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The string is moved to &amp;lt;code&amp;gt;BUF1&amp;lt;/code&amp;gt;, starting at location &amp;lt;code&amp;gt;BUF1 + 1&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The string length is moved to location &amp;lt;code&amp;gt;BUF1&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Numeric arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument of a function is type &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, you can obtain the argument in floating-point form or binary integer form (truncated or rounded) using registers R1 through R3, as follows:    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ARG &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
LA R3,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&lt;br /&gt;
CCALL INTEG&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/var&amp;gt; = 0, if a truncated value is required.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value,&amp;lt;/var&amp;gt; if a rounded value is required. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After this sequence, F0 contains the original floating-point value. If the number is valid, R1 contains the integer portion of the number as a binary value and R2 is zero. If the number is invalid, R1 is zero and R2 is nonzero.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Omitted arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing a call to a function, you can omit an argument, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$Read( )&lt;br /&gt;
$Substr(NAME,,5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the omitted argument is type &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the value of the argument defaults to a null string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If the argument is type &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the value defaults to zero. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====NOARG option====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; option on the ARG macro in the event that an argument is omitted. When &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; is used, the code branches to the location indicated by the &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; option. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ARG n,NOARG=ALLDONE&lt;br /&gt;
L R2,4(X1)&lt;br /&gt;
CCALL RTST&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
CCALL DKRL&lt;br /&gt;
ALLDONE DS OH&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
LEAVESTR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can also specify the following, which returns control to the next sequential instruction after the &amp;lt;var&amp;gt;ARG&amp;lt;/var&amp;gt; statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NOARG = *&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Using the ENTER macro to allocate working storage===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use the &amp;lt;var&amp;gt;VARS&amp;lt;/var&amp;gt; argument of the ENTER macro to define stack variables for working storage unique to each user-written function. This method of allocating storage is preferable to STORAGE, GETMAIN, and FREEMAIN instructions. Using the ENTER macro avoids the possibility of causing Online waits or having all users share the same storage.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Syntax for ENTER VARS====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ENTER VARS = (,            X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength1&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname2&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength2&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname3&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength3&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
), AMODE=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must initialize each of these variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Routines available for user written $functions====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are CCALL entry points for: DATE, DATE3, and DATE4. All routines must be called with T1 pointing to a 26-byte answer area. Rocket Software recommends that you allocate the answer area using the &amp;lt;code&amp;gt;VARS=(name, len)&amp;lt;/code&amp;gt; pushdown list variable of the ENTER macro.&lt;br /&gt;
The following table lists how the current date and time is stored in the area with this format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Formats used to store the date routines&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Code entry point&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Format used for storing...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;YY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE3&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;CYY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE4&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;YYYY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All registers are returned intact with the exception of the DATE call. The DATE call changes only the T4 register, returning the number representing the current month (1-12).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that there are double SPACEs before and after the &amp;quot;MON DD&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return values===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Functions can return a string or a numeric value. The following coding considerations apply:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To return a string value, end the function routine by doing the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R1 with a pointer to the location of the result string minus one.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Load R2 with the length of the result string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVESTR macro at the end of the code, just before POOL or LTORG to drop local addressability.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To return a numeric value, end the function routine in one of the following ways, depending on how the result is computed:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For an integer result, end the code end with the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load the binary integer into R1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Zero R2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVENUM macro just before POOL or LTORG.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For a floating-point result, end the code with the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load F0 with the long floating-point number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVEF0 macro just before POOL or LTORG.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To return a longstring value, end the function routine by doing the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R1 with a pointer to the location of the result longstring minus one. If very long it will have to be above the bar.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R2 with the length of the result longstring.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVELST macro at the end of the code, just before POOL or LTORG to drop local addressability.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To avoid affecting the performance of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; multithreading operations, ensure that a SOUL function does not invoke any kind of synchronous operating system service that could result in a wait.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Coding messages===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can add messages and codes specific to user-written functions by adding EDEF message lines to the MSGU module. These are referenced in your functions by invoking the ERROR macro.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To code and activate messages and return codes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add EDEF statements to MSGU as needed in place of the dummy EDEF in the distributed module.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Add ERROR macros to your functions, referring to messages in MSGU by message number as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ERROR &amp;lt;i&amp;gt;errnum&amp;lt;/i&amp;gt;,OPT=USER&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reassemble MSGU and FUNU.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Relink the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; modules (for example BATCH204, ONLINE) in which MSGU and FUNU are included.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====EDEF statements in MSGU====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each EDEF statement defines a message. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====EDEF statement syntax=====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;EDEF &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;msgno&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aaaa&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;batchrc&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ssss&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;text&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;msgno&amp;lt;/var&amp;gt; denotes message number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aaaa&amp;lt;/var&amp;gt; denotes action bits controlling output, snap generation, register pointers, and so on.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;class&amp;lt;/var&amp;gt; (E, I, or P) specifies batch and Online return code requirements.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;batchrc&amp;lt;/var&amp;gt; specifies batch return code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ssss&amp;lt;/var&amp;gt; denotes snap bits controlling contents of snaps and dumps.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;text&amp;lt;/var&amp;gt; contains message text, which can contain %variables passed by invocation of the ERROR macro.&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 complete details on these EDEF arguments, refer to the internal documentation in the MSGU listing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Encoding/Decoding facility==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SOUL &amp;lt;var&amp;gt;[[$Code]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[$Decode]]&amp;lt;/var&amp;gt; functions provide the capacity to operate with both coded and string values of fields.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===CDTB module===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define code tables in the CDTB module, which you must include in any load module needed to support the &amp;lt;var&amp;gt;$Code&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Decode&amp;lt;/var&amp;gt; functions (usually with BATCH204 and ONLINE configurations).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
CDTB is an assembly language program consisting of:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Three macros used to define each table distributed in source code form&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Comments explaining the macros&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CSECT statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Three sample tables&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;END statement &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The macros contained in the CDTB module are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CODETABL&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CODETABL &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;id&amp;lt;/var&amp;gt; is a 1- to 8-character string, not enclosed in quotation marks, used to identify the table.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; is the length of the longest code found in the table. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODETABL macro builds a table header that consists of a pointer to the next table, the table identifier, the number of entries in the table, and the length of the longest code. Each table defined must specify one CODETABL macro.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CODE&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CODE &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;code&amp;lt;/span&amp;gt;, &#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&#039; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;code&amp;lt;/var&amp;gt; is the code not enclosed in quotation marks and not longer than the length specified in the previous CODETABL macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; is the string associated with the code and is enclosed in quotation marks. The string can have up to 255 characters. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODE macro builds one entry that consists of the code, the string length, and the string value. The CODE macro must be used individually for each entry in the table. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;ENDTAB&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ENDTAB&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ENDTAB requires no operands and indicates the end of the current table. One ENDTAB macro is required for each table. ENDTAB completes the definition of the table by: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Returning to the header created by the previous CODETABL macro&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updating the information about the pointer to the next table&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updating the number of entries in the table just defined&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Setting up information to start the next table or to mark the end of all tables &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Customizing the sample translation tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To modify the distributed sample translation tables (refer also to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;List CDTB with its sequence numbers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Replace the sample tables by using an appropriate operating system utility program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Assemble the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Link the object modules into the appropriate &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; load modules.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Modifying translation tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To make additions, deletions, or changes to translation tables (refer also to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Modify the source code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Assemble the source code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Link-edit the new CDTB module into the appropriate &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; load modules.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sizing the CDTB module===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the CDTB module depends on the tables defined. If tables are very large, CDTB might require a significant amount of storage, resulting in an adjustment to the REGION size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each table entry requires:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of bytes in the longest code + 1 (for string length) + the number of bytes in the string + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
32 bytes per table is required overhead for header information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Converting user-written functions==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written $functions may need to be modified if you are migrating to 31-bit or multi-processing environment. While Rocket Software generally discourages customers from coding $functions that have extensive dependencies on &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; internal data structures and algorithms, some customers have found it necessary to do so. These conversion notes describe the changes required for the conversion of most $functions.&amp;lt;/p&amp;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;&lt;br /&gt;
These sections do not provide complete descriptions of all internal data structure and algorithm changes that have been made to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;; nor are they to be construed as official sanction on Rocket Software&#039;s part of the use of any specific interfaces or of the dependency on any specific data structure or algorithm. All such interfaces, data structures, and algorithms remain subject to change without notice.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#Additional requirements for systems using 31-bit architecture|Additional requirements for systems using 31-bit architecture]] applies to all sites that use 31-bit architecture. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;[[#Additional requirements for MP/204 (multiprocessing)|Additional requirements for MP/204 (multiprocessing)]] applies to users of MP/204 (multiprocessing). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Coding requirements for all operating systems===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Observe the following coding requirements for all operating systems:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; runs in 64-bit mode and requires all registers to be saved and restored using the grande versions of the assembly instructions STM (Store Multiple) and LM (Load Multiple). All user-written functions must be reviewed and modified to use STMG and LMG instructions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Change $functions that refer to KX or KY as follows: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remove X,Y arguments from the KOMMS macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code the new FSA macro with the same X,Y arguments that were present on the KOMMS macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Modify references to fields in KX or KY to use a different base register from the KOMM base register as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L      reg,KJFLKX&lt;br /&gt;
USING  KX,reg&lt;br /&gt;
refer to KX or KY fields&lt;br /&gt;
DROP   reg&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;From the CCALL MOVEIN routine, remove CCALL. This places the code inline. By expanding the code, efficiency is improved. The input and output are the same as before. However, you might have to add pool statements to the macro, since the offset points to a pool.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Some KOMM fields have been moved from KA-KD to KZ. While user-written $functions should not generally reference these fields, those that do need to address KZ as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L      reg, KBPKZ&lt;br /&gt;
USING  KZ,reg&lt;br /&gt;
refer to KZ fields&lt;br /&gt;
DROP   reg&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The CSAVE or IOSAVE macros replace the SETAMODE macro in the MACLIB.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The AMODE parameter of the ENTER macro is ignored. The CCALL, ENTER, and KARTN sequences no longer cause switches in addressing mode.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The XAMODE macros are now obsolete and have been deleted from Rocket Software-delivered MACLIBs. Consequently, it is no longer necessary to maintain XAMODE$U. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reassemble FUNU and FUNUUG. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Additional requirements for systems using 31-bit architecture===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All code receives control in 31-bit mode. See IBM z/OS/XA Principles of Operation for differences between 24-bit and 31-bit mode operation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Nearly all &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; data structures (servers and PCBs, for example) are in 31-bit storage. Pointers to such data structures must be 31-bit addresses. Three-byte address constants, for example &amp;lt;code&amp;gt;AL3(xyz)&amp;lt;/code&amp;gt;, cannot be used as pointers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code that explicitly manipulates &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; four-byte string codes must be modified to remove the high-order byte from the string code prior to adding KUPVT or KUPST. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If you invoke a z/OS service that must receive control in 24-bit mode (such as BSAM) use CSAVE or IOSAVE with the &amp;lt;code&amp;gt;AMODE=24&amp;lt;/code&amp;gt; parameter. Code CRSTR or IORSTR with the &amp;lt;code&amp;gt;AMODE=31&amp;lt;/code&amp;gt; parameter. You cannot reference KOMM or the pushdown list between &amp;lt;code&amp;gt;AMODE=24&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AMODE=31&amp;lt;/code&amp;gt; brackets.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; parameter (described in [[#NOARG option|NOARG option]]) is required for &amp;lt;var&amp;gt;ARG&amp;lt;/var&amp;gt; statements in 31-bit mode.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot use the CCALL macro in 24-bit mode. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For users of the multiple KOMM feature: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the $function switches to z/OS register conventions, RC might at some point no longer be equal to KOMM. Use the following code to locate KOMM:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CURROSW REG=x&lt;br /&gt;
LLGF y,OSWPUK-OSW(,x)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;In ESA systems, each user&#039;s KOMM is allocated in 31-bit storage. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
(See the discussion of MP system parameters in [[Performance monitoring and tuning]]). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Additional requirements for MP/204 (multiprocessing)===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The FN macro has an MP argument, which defaults to &amp;lt;code&amp;gt;NO&amp;lt;/code&amp;gt;. Other legal values are &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;YES&amp;lt;/code&amp;gt;. When the FN macro specifies &amp;lt;code&amp;gt;MP=NO&amp;lt;/code&amp;gt;, the $function is guaranteed to execute in the maintask.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a $function is invoked that specifies &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt;, that $function might execute in one of the MP subtasks, depending on whether &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is running in parallel a section of code that contains it. If so, the $function is eligible to execute in a subtask.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a $function is invoked that specifies &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, that $function executes in one of the MP subtasks, regardless of whether the section of code within which it is contained is running in parallel. Usually, only $functions with relatively long pathlength should specify &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, because the cost of switching from the maintask to a subtask can be in the thousands of instructions. Because the exact cost of switching tasks depends on how busy the subtasks and the maintask are, measurements should be made in marginal circumstances.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;$functions that are eligible for subtask execution actually execute on one of the subtasks under either of the following conditions: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;SCHDOPT=X&#039;02&#039;&amp;lt;/code&amp;gt; is specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The section of code in which the $function is coded is executed at a time when other users are on the scheduler&#039;s READY queue. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;$functions that specify &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Are not guaranteed to always execute in the same subtask when &amp;lt;var&amp;gt;[[NMPSUBS parameter|NMPSUBS]]&amp;lt;/var&amp;gt; is greater than 1. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must be re-entrant.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must not use any internal &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; interfaces that require maintask execution, for example, APUT, DKIW, and CENQxxx.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt; have no effect when the MP feature is not in use (&amp;lt;code&amp;gt;NMPSUBS=0&amp;lt;/code&amp;gt;).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Additional requirements for zIIP processing===&lt;br /&gt;
If Model 204 runs with [[Performance monitoring and tuning#Offloading Model 204 work to zIIP processors|zIIP processors]], an &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MP=ZYES&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;MP=ZOK&amp;lt;/code&amp;gt; setting in the FN macro might cause a $function to be executed on the zIIP subtask, which does not allow an SVC instruction. Customers planning to use zIIP processing must do either of these: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Inspect any user-written $functions for non-tolerant code. This is code that uses an explicit SVC instruction or requests system services that might use an SVC, like BSAM, VTAM, or task-mode z/OS macros, or macros that are not allowed to be invoked on an SRB (enclave Service Request Block, the environment when a $function is executed on a zIIP processor). Bracket this code with &amp;lt;code&amp;gt;SRBMODE OFF&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SRBMODE ON&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify &amp;lt;code&amp;gt;MP=NO&amp;lt;/code&amp;gt; (the default) or no &amp;lt;var&amp;gt;MP&amp;lt;/var&amp;gt; setting at all in the FN macro to cause $functions to run on the maintask and not on a zIIP SRB. Any other value for &amp;lt;var&amp;gt;MP&amp;lt;/var&amp;gt; enables $functions to run on zIIP subtasks. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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; It is not always obvious if code may or may not run on a zIIP subtask. Even if all explicit SVCs and non-task-mode system macros issued by Model&amp;amp;nbsp;204 have been identified and bracketed, some may be issued implicitly by z/OS or other services, so user testing is important. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:System management]]&lt;br /&gt;
[[Category:Model 204 operational issues]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Customizing_functions_and_translation_tables&amp;diff=78237</id>
		<title>Customizing functions and translation tables</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Customizing_functions_and_translation_tables&amp;diff=78237"/>
		<updated>2015-07-14T18:41:13Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Add longstring - (LTORG is hidden in the POOL macro)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written SOUL functions are stored in the user function module FUNU. The FUNU module is distributed as a skeletal module containing a table for functions and arguments, and the assembler code for one function. You can list the contents of FUNU using the procedures given in the Rocket Model&amp;amp;nbsp;204 Installation Guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The Encoding/Decoding facility uses the translation tables contained in the distributed CDTB module. The &amp;lt;var&amp;gt;$Code&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Decode&amp;lt;/var&amp;gt; functions access the translation tables to allow the use of both coded and string values of fields. The contents of the translation tables can be listed by using the procedures listed in the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can store messages and return codes for user-written functions in the MSGU module. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This page gives the procedures for adding user-written functions to the FUNU module, customizing the translation tables contained in the CDTB module, and adding messages to MSGU.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If you are migrating to 31-bit or multiprocessing environments, review the conversion considerations summarized in [[#Converting user-written functions|Converting user-written functions]]. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For general directions on assembly and link-editing, see the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Adding functions to the FUNU module==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can add user-written functions to the FUNU module before FUNU is assembled and linked into &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;. Reassembly and relinking is required whenever you migrate to another release of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To add functions to the FUNU module:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Label the function table in the FUNU source code FUNUTAB.    &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;End the function table in the FUNU source code with &amp;lt;code&amp;gt;DC X&#039;FFFF&#039;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The location of the function table in the code is not significant.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Make the new function available to the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SOUL compiler by adding an entry to the function table using the FN macro:&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;FN &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;function-name&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;R-type&amp;lt;/span&amp;gt;, (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/span&amp;gt; [, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/span&amp;gt;]...),ROUTINE=&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;function-name&amp;lt;/var&amp;gt; specifies a unique 1- to 7-character name of the function without the leading &amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;. Spaces or special characters are not allowed.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written functions must not duplicate the name of Rocket Software functions. A list of Rocket Software functions is given in [[SOUL $functions]].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;R-type&amp;lt;/var&amp;gt; represents the type of value returned from the function. Only one value can be returned. &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt; represents a string value. &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; represents a numeric value. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;A-type&amp;lt;/var&amp;gt; describes the type of argument value. More than one argument can be specified. &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt; represents a string value. &amp;lt;code&amp;gt;N&amp;lt;/code&amp;gt; represents a numeric value. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, &amp;lt;code&amp;gt;$SEP&amp;lt;/code&amp;gt; receives three string arguments and returns a string value:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FN SEP,S,(S,S,S)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ROUTINE=&amp;lt;/var&amp;gt; identifies the name on the ENTER macro of the routine that actually implements the function.  This allows the name of the $function (the name on the FN macro) to be greater than 7 characters.&amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;For example, one of the MQ/204 $functions, $MQ_FIND_QUEUE_ENTITY, has these two entries (not in FUNU) for FN and ENTER:&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FN    MQ_FIND_QUEUE_ENTITY,S,(S,S),MP=OK,ROUTINE=$MQFNDQ&lt;br /&gt;
...&lt;br /&gt;
$MQFNDQ  ENTER ZMODE=64&lt;br /&gt;
  assembly language code for the function&lt;br /&gt;
         LEAVESTR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code the function (as described in [[#Coding a function|Coding a function]].&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Coding a function==&lt;br /&gt;
===Coding conventions===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following conventions are required for coding a user-written function:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Begin the function code with: &lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;$&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;name&amp;lt;/span&amp;gt; ENTER&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;End the function code with:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;POOL&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Observe the following register conventions (correspondence between Rocket Software mnemonic names and IBM general registers is printed at the beginning of the module in the expansion of the STARTS macro):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Registers RC, R6, PD, and RL must not be modified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Registers T1 through T5 and R1 through R5 can be used as work registers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Registers R1 through R5 are somewhat more permanent. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use BUF1 and BUF2 (260 bytes each) as buffers (doubleword aligned). &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Use string, numeric, or omitted arguments. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===String arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument is type &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, you can move the argument into a work area by using the following code. Registers R1 through R4 are used by this sequence:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ARG &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
L R2,4(X1)&lt;br /&gt;
CCALL RTSTRL&lt;br /&gt;
EX R2,FOO&lt;br /&gt;
STC R2,BUF1&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
FOO MVC BUF1(0),0(R1)&lt;br /&gt;
.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;ARG&amp;lt;/code&amp;gt; macro returns the VTBL pointer to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument in X1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;RTSTRL&amp;lt;/code&amp;gt; routine sets &amp;lt;code&amp;gt;R2&amp;lt;/code&amp;gt; to the length of the string, and it sets &amp;lt;code&amp;gt;R1&amp;lt;/code&amp;gt; to address-1 of the string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The length of the string is given by register &amp;lt;code&amp;gt;R2&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The string is moved to &amp;lt;code&amp;gt;BUF1&amp;lt;/code&amp;gt;, starting at location &amp;lt;code&amp;gt;BUF1 + 1&amp;lt;/code&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The string length is moved to location &amp;lt;code&amp;gt;BUF1&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Numeric arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/var&amp;gt;th argument of a function is type &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, you can obtain the argument in floating-point form or binary integer form (truncated or rounded) using registers R1 through R3, as follows:    &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ARG &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
LA R3,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&lt;br /&gt;
CCALL INTEG&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/var&amp;gt; = 0, if a truncated value is required.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/var&amp;gt; = &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value,&amp;lt;/var&amp;gt; if a rounded value is required. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
After this sequence, F0 contains the original floating-point value. If the number is valid, R1 contains the integer portion of the number as a binary value and R2 is zero. If the number is invalid, R1 is zero and R2 is nonzero.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Omitted arguments===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When writing a call to a function, you can omit an argument, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$Read( )&lt;br /&gt;
$Substr(NAME,,5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the omitted argument is type &amp;lt;var&amp;gt;S&amp;lt;/var&amp;gt;, the value of the argument defaults to a null string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If the argument is type &amp;lt;var&amp;gt;N&amp;lt;/var&amp;gt;, the value defaults to zero. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====NOARG option====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify the &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; option on the ARG macro in the event that an argument is omitted. When &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; is used, the code branches to the location indicated by the &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; option. For example:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ARG n,NOARG=ALLDONE&lt;br /&gt;
L R2,4(X1)&lt;br /&gt;
CCALL RTST&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
CCALL DKRL&lt;br /&gt;
ALLDONE DS OH&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
LEAVESTR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can also specify the following, which returns control to the next sequential instruction after the &amp;lt;var&amp;gt;ARG&amp;lt;/var&amp;gt; statement:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;NOARG = *&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Using the ENTER macro to allocate working storage===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can use the &amp;lt;var&amp;gt;VARS&amp;lt;/var&amp;gt; argument of the ENTER macro to define stack variables for working storage unique to each user-written function. This method of allocating storage is preferable to STORAGE, GETMAIN, and FREEMAIN instructions. Using the ENTER macro avoids the possibility of causing Online waits or having all users share the same storage.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Syntax for ENTER VARS====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ENTER VARS = (,            X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength1&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname2&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength2&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  (&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varname3&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;varlength3&amp;lt;/span&amp;gt;),    &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;comments&amp;lt;/span&amp;gt;  X&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
  .&lt;br /&gt;
), AMODE=&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;n&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You must initialize each of these variables.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====Routines available for user written $functions====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
There are CCALL entry points for: DATE, DATE3, and DATE4. All routines must be called with T1 pointing to a 26-byte answer area. Rocket Software recommends that you allocate the answer area using the &amp;lt;code&amp;gt;VARS=(name, len)&amp;lt;/code&amp;gt; pushdown list variable of the ENTER macro.&lt;br /&gt;
The following table lists how the current date and time is stored in the area with this format:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;caption&amp;gt;Formats used to store the date routines&amp;lt;/caption&amp;gt;&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Code entry point&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Format used for storing...&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;YY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE3&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;CYY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;DATE4&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;codeTable&amp;quot;&amp;gt;&#039;YYYY.DDD  MON DD  HH.MM.SS&#039;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;All registers are returned intact with the exception of the DATE call. The DATE call changes only the T4 register, returning the number representing the current month (1-12).&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;Note that there are double SPACEs before and after the &amp;quot;MON DD&amp;quot;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return values===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Functions can return a string or a numeric value. The following coding considerations apply:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To return a string value, end the function routine by doing the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R1 with a pointer to the location of the result string minus one.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Load R2 with the length of the result string.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVESTR macro at the end of the code, just before POOL or LTORG to drop local addressability.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To return a numeric value, end the function routine in one of the following ways, depending on how the result is computed:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For an integer result, end the code end with the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load the binary integer into R1.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Zero R2.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVENUM macro just before POOL or LTORG.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For a floating-point result, end the code with the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load F0 with the long floating-point number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVEF0 macro just before POOL or LTORG.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To return a longstring value, end the function routine by doing the following:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R1 with a pointer to the location of the result longstring minus one. If very long it will have to be above the bar.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Load R2 with the length of the result longstring.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Issue the LEAVELST macro at the end of the code, just before POOL or LTORG to drop local addressability.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;To avoid affecting the performance of &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; multithreading operations, ensure that a SOUL function does not invoke any kind of synchronous operating system service that could result in a wait.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Coding messages===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can add messages and codes specific to user-written functions by adding EDEF message lines to the MSGU module. These are referenced in your functions by invoking the ERROR macro.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To code and activate messages and return codes:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add EDEF statements to MSGU as needed in place of the dummy EDEF in the distributed module.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Add ERROR macros to your functions, referring to messages in MSGU by message number as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;ERROR &amp;lt;i&amp;gt;errnum&amp;lt;/i&amp;gt;,OPT=USER&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reassemble MSGU and FUNU.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Relink the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; modules (for example BATCH204, ONLINE) in which MSGU and FUNU are included.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
====EDEF statements in MSGU====&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each EDEF statement defines a message. &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
=====EDEF statement syntax=====&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;EDEF &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;msgno&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;aaaa&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;class&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;batchrc&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ssss&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;text&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;msgno&amp;lt;/var&amp;gt; denotes message number.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;aaaa&amp;lt;/var&amp;gt; denotes action bits controlling output, snap generation, register pointers, and so on.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;class&amp;lt;/var&amp;gt; (E, I, or P) specifies batch and Online return code requirements.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;batchrc&amp;lt;/var&amp;gt; specifies batch return code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ssss&amp;lt;/var&amp;gt; denotes snap bits controlling contents of snaps and dumps.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;text&amp;lt;/var&amp;gt; contains message text, which can contain %variables passed by invocation of the ERROR macro.&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 complete details on these EDEF arguments, refer to the internal documentation in the MSGU listing. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Encoding/Decoding facility==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; SOUL &amp;lt;var&amp;gt;[[$Code]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[$Decode]]&amp;lt;/var&amp;gt; functions provide the capacity to operate with both coded and string values of fields.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===CDTB module===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Define code tables in the CDTB module, which you must include in any load module needed to support the &amp;lt;var&amp;gt;$Code&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Decode&amp;lt;/var&amp;gt; functions (usually with BATCH204 and ONLINE configurations).   &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
CDTB is an assembly language program consisting of:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Three macros used to define each table distributed in source code form&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Comments explaining the macros&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CSECT statement&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Three sample tables&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;END statement &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The macros contained in the CDTB module are:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;CODETABL&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CODETABL &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/span&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;id&amp;lt;/var&amp;gt; is a 1- to 8-character string, not enclosed in quotation marks, used to identify the table.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;length&amp;lt;/var&amp;gt; is the length of the longest code found in the table. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODETABL macro builds a table header that consists of a pointer to the next table, the table identifier, the number of entries in the table, and the length of the longest code. Each table defined must specify one CODETABL macro.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;CODE&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;CODE &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;code&amp;lt;/span&amp;gt;, &#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&#039; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
Where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;code&amp;lt;/var&amp;gt; is the code not enclosed in quotation marks and not longer than the length specified in the previous CODETABL macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; is the string associated with the code and is enclosed in quotation marks. The string can have up to 255 characters. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The CODE macro builds one entry that consists of the code, the string length, and the string value. The CODE macro must be used individually for each entry in the table. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;ENDTAB&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;ENDTAB&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ENDTAB requires no operands and indicates the end of the current table. One ENDTAB macro is required for each table. ENDTAB completes the definition of the table by: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Returning to the header created by the previous CODETABL macro&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updating the information about the pointer to the next table&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Updating the number of entries in the table just defined&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Setting up information to start the next table or to mark the end of all tables &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Customizing the sample translation tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To modify the distributed sample translation tables (refer also to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;List CDTB with its sequence numbers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Replace the sample tables by using an appropriate operating system utility program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Assemble the program.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Link the object modules into the appropriate &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; load modules.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Modifying translation tables===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
To make additions, deletions, or changes to translation tables (refer also to the Rocket &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; Installation Guide for your operating system): &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Modify the source code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Assemble the source code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Link-edit the new CDTB module into the appropriate &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; load modules.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Sizing the CDTB module===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The size of the CDTB module depends on the tables defined. If tables are very large, CDTB might require a significant amount of storage, resulting in an adjustment to the REGION size.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each table entry requires:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Number of bytes in the longest code + 1 (for string length) + the number of bytes in the string + 1&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
32 bytes per table is required overhead for header information.&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Converting user-written functions==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
User-written $functions may need to be modified if you are migrating to 31-bit or multi-processing environment. While Rocket Software generally discourages customers from coding $functions that have extensive dependencies on &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; internal data structures and algorithms, some customers have found it necessary to do so. These conversion notes describe the changes required for the conversion of most $functions.&amp;lt;/p&amp;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;&lt;br /&gt;
These sections do not provide complete descriptions of all internal data structure and algorithm changes that have been made to &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt;; nor are they to be construed as official sanction on Rocket Software&#039;s part of the use of any specific interfaces or of the dependency on any specific data structure or algorithm. All such interfaces, data structures, and algorithms remain subject to change without notice.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[#Additional requirements for systems using 31-bit architecture|Additional requirements for systems using 31-bit architecture]] applies to all sites that use 31-bit architecture. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;[[#Additional requirements for MP/204 (multiprocessing)|Additional requirements for MP/204 (multiprocessing)]] applies to users of MP/204 (multiprocessing). &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Coding requirements for all operating systems===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Observe the following coding requirements for all operating systems:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; runs in 64-bit mode and requires all registers to be saved and restored using the grande versions of the assembly instructions STM (Store Multiple) and LM (Load Multiple). All user-written functions must be reviewed and modified to use STMG and LMG instructions. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Change $functions that refer to KX or KY as follows: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Remove X,Y arguments from the KOMMS macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code the new FSA macro with the same X,Y arguments that were present on the KOMMS macro.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Modify references to fields in KX or KY to use a different base register from the KOMM base register as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L      reg,KJFLKX&lt;br /&gt;
USING  KX,reg&lt;br /&gt;
refer to KX or KY fields&lt;br /&gt;
DROP   reg&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;From the CCALL MOVEIN routine, remove CCALL. This places the code inline. By expanding the code, efficiency is improved. The input and output are the same as before. However, you might have to add pool statements to the macro, since the offset points to a pool.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Some KOMM fields have been moved from KA-KD to KZ. While user-written $functions should not generally reference these fields, those that do need to address KZ as follows:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;L      reg, KBPKZ&lt;br /&gt;
USING  KZ,reg&lt;br /&gt;
refer to KZ fields&lt;br /&gt;
DROP   reg&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The CSAVE or IOSAVE macros replace the SETAMODE macro in the MACLIB.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The AMODE parameter of the ENTER macro is ignored. The CCALL, ENTER, and KARTN sequences no longer cause switches in addressing mode.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The XAMODE macros are now obsolete and have been deleted from Rocket Software-delivered MACLIBs. Consequently, it is no longer necessary to maintain XAMODE$U. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Reassemble FUNU and FUNUUG. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Additional requirements for systems using 31-bit architecture===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
All code receives control in 31-bit mode. See IBM z/OS/XA Principles of Operation for differences between 24-bit and 31-bit mode operation:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Nearly all &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; data structures (servers and PCBs, for example) are in 31-bit storage. Pointers to such data structures must be 31-bit addresses. Three-byte address constants, for example &amp;lt;code&amp;gt;AL3(xyz)&amp;lt;/code&amp;gt;, cannot be used as pointers.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Code that explicitly manipulates &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; four-byte string codes must be modified to remove the high-order byte from the string code prior to adding KUPVT or KUPST. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If you invoke a z/OS service that must receive control in 24-bit mode (such as BSAM) use CSAVE or IOSAVE with the &amp;lt;code&amp;gt;AMODE=24&amp;lt;/code&amp;gt; parameter. Code CRSTR or IORSTR with the &amp;lt;code&amp;gt;AMODE=31&amp;lt;/code&amp;gt; parameter. You cannot reference KOMM or the pushdown list between &amp;lt;code&amp;gt;AMODE=24&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AMODE=31&amp;lt;/code&amp;gt; brackets.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;NOARG&amp;lt;/var&amp;gt; parameter (described in [[#NOARG option|NOARG option]]) is required for &amp;lt;var&amp;gt;ARG&amp;lt;/var&amp;gt; statements in 31-bit mode.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You cannot use the CCALL macro in 24-bit mode. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;For users of the multiple KOMM feature: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the $function switches to z/OS register conventions, RC might at some point no longer be equal to KOMM. Use the following code to locate KOMM:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;CURROSW REG=x&lt;br /&gt;
LLGF y,OSWPUK-OSW(,x)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;In ESA systems, each user&#039;s KOMM is allocated in 31-bit storage. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
(See the discussion of MP system parameters in [[Performance monitoring and tuning]]). &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
===Additional requirements for MP/204 (multiprocessing)===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The FN macro has an MP argument, which defaults to &amp;lt;code&amp;gt;NO&amp;lt;/code&amp;gt;. Other legal values are &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;YES&amp;lt;/code&amp;gt;. When the FN macro specifies &amp;lt;code&amp;gt;MP=NO&amp;lt;/code&amp;gt;, the $function is guaranteed to execute in the maintask.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a $function is invoked that specifies &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt;, that $function might execute in one of the MP subtasks, depending on whether &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; is running in parallel a section of code that contains it. If so, the $function is eligible to execute in a subtask.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a $function is invoked that specifies &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, that $function executes in one of the MP subtasks, regardless of whether the section of code within which it is contained is running in parallel. Usually, only $functions with relatively long pathlength should specify &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, because the cost of switching from the maintask to a subtask can be in the thousands of instructions. Because the exact cost of switching tasks depends on how busy the subtasks and the maintask are, measurements should be made in marginal circumstances.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;$functions that are eligible for subtask execution actually execute on one of the subtasks under either of the following conditions: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;SCHDOPT=X&#039;02&#039;&amp;lt;/code&amp;gt; is specified.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The section of code in which the $function is coded is executed at a time when other users are on the scheduler&#039;s READY queue. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;$functions that specify &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Are not guaranteed to always execute in the same subtask when &amp;lt;var&amp;gt;[[NMPSUBS parameter|NMPSUBS]]&amp;lt;/var&amp;gt; is greater than 1. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must be re-entrant.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Must not use any internal &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; interfaces that require maintask execution, for example, APUT, DKIW, and CENQxxx.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt; have no effect when the MP feature is not in use (&amp;lt;code&amp;gt;NMPSUBS=0&amp;lt;/code&amp;gt;).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Additional requirements for zIIP processing===&lt;br /&gt;
If Model 204 runs with [[Performance monitoring and tuning#Offloading Model 204 work to zIIP processors|zIIP processors]], an &amp;lt;code&amp;gt;MP=YES&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MP=OK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MP=ZYES&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;MP=ZOK&amp;lt;/code&amp;gt; setting in the FN macro might cause a $function to be executed on the zIIP subtask, which does not allow an SVC instruction. Customers planning to use zIIP processing must do either of these: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Inspect any user-written $functions for non-tolerant code. This is code that uses an explicit SVC instruction or requests system services that might use an SVC, like BSAM, VTAM, or task-mode z/OS macros, or macros that are not allowed to be invoked on an SRB (enclave Service Request Block, the environment when a $function is executed on a zIIP processor). Bracket this code with &amp;lt;code&amp;gt;SRBMODE OFF&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;SRBMODE ON&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Specify &amp;lt;code&amp;gt;MP=NO&amp;lt;/code&amp;gt; (the default) or no &amp;lt;var&amp;gt;MP&amp;lt;/var&amp;gt; setting at all in the FN macro to cause $functions to run on the maintask and not on a zIIP SRB. Any other value for &amp;lt;var&amp;gt;MP&amp;lt;/var&amp;gt; enables $functions to run on zIIP subtasks. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;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; It is not always obvious if code may or may not run on a zIIP subtask. Even if all explicit SVCs and non-task-mode system macros issued by Model&amp;amp;nbsp;204 have been identified and bracketed, some may be issued implicitly by z/OS or other services, so user testing is important. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:System management]]&lt;br /&gt;
[[Category:Model 204 operational issues]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Talk:$FlsAcc&amp;diff=77890</id>
		<title>Talk:$FlsAcc</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Talk:$FlsAcc&amp;diff=77890"/>
		<updated>2015-06-05T23:46:12Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: To many $$&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Wiki won&#039;t let me update the initial part of this page.&lt;br /&gt;
There are too many $$ in $$FlsChk   In two places.&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Dsn&amp;diff=77884</id>
		<title>$Dsn</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Dsn&amp;diff=77884"/>
		<updated>2015-06-05T22:18:00Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: 44 bytes in z/OS anyway, I don&amp;#039;t know about CMS or VSE...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;$DSN is useful with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; files that are comprised of multiple data sets. You specify the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file&#039;s DD name and the ordinal number (first, second, third, and so on) of one of the file&#039;s data sets, and $DSN returns the data set&#039;s name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The $DSN syntax is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;$DSN(&#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/span&amp;gt;&#039;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsnnum&amp;lt;/span&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; is a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file&#039;s DD or file name. The file that you specify must be OPEN by you while you are using $DSN. This ensures reliable output.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsnnum&amp;lt;/var&amp;gt; is a positive integer that represents the ordinal number of a data set. For example, specify 3 for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsnnum&amp;lt;/var&amp;gt; if you want the name of the third of the multiple data sets that comprise the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If no file or DD name is specified, if the data set number is too large, and if &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot find the data set name, the system returns a counting error message.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The output string is right-filled with SPACEs to 44 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Examples&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An example using $DSN follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FOR %I FROM 1 TO $DSNNUM(&#039;FU&#039;) BY 1&lt;br /&gt;
  PRINT %I AND $DSN(&#039;FU&#039;,%I)&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The next example does a straight $DSN call for a file mapped to one data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%FILENAME IS STRING LEN 8&lt;br /&gt;
%FILENAME = &#039;VEHICLES&#039;&lt;br /&gt;
PRINT &#039;FILE &#039; WITH %FILENAME WITH &#039; IS CONTAINED IN -&lt;br /&gt;
DATASET &#039; WITH $DSN(%FILENAME,1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:SOUL $functions]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Dsn&amp;diff=77864</id>
		<title>$Dsn</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Dsn&amp;diff=77864"/>
		<updated>2015-06-04T18:24:08Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: $DSNNUM only takes one parameter, not two.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;$DSN is useful with &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; files that are comprised of multiple data sets. You specify the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file&#039;s DD name and the ordinal number (first, second, third, and so on) of one of the file&#039;s data sets, and $DSN returns the data set&#039;s name. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The $DSN syntax is:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;$DSN(&#039;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/span&amp;gt;&#039;,&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;dsnnum&amp;lt;/span&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;where:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; is a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file&#039;s DD or file name. The file that you specify must be OPEN by you while you are using $DSN. This ensures reliable output.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsnnum&amp;lt;/var&amp;gt; is a positive integer that represents the ordinal number of a data set. For example, specify 3 for &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;dsnnum&amp;lt;/var&amp;gt; if you want the name of the third of the multiple data sets that comprise the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;If no file or DD name is specified, if the data set number is too large, and if &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; cannot find the data set name, the system returns a counting error message.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Examples&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;An example using $DSN follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;FOR %I FROM 1 TO $DSNNUM(&#039;FU&#039;) BY 1&lt;br /&gt;
  PRINT $DSN(&#039;FU&#039;,%I)&lt;br /&gt;
END FOR&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The next example does a straight $DSN call for a file mapped to one data set.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%FILENAME IS STRING LEN 8&lt;br /&gt;
%FILENAME = &#039;VEHICLES&#039;&lt;br /&gt;
PRINT &#039;FILE &#039; WITH %FILENAME WITH &#039; IS CONTAINED IN -&lt;br /&gt;
DATASET &#039; WITH $DSN(%FILENAME,1)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category:SOUL $functions]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=File_Control_Table_(File_architecture)&amp;diff=76453</id>
		<title>File Control Table (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=File_Control_Table_(File_architecture)&amp;diff=76453"/>
		<updated>2015-03-06T19:22:02Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Mention the majority 7/8ths of the FCT.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p&amp;gt;The File Control Table contains the file parameter settings, data set or file definition names of all data sets in the file, the status of the file, and other control information.&amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The FCT is 8 pages.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The first page of the FCT is the File Parameter List (FPL) page, which contains:&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The File Parameter List holding the current parameter settings for the file &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The Logical Page Map (LPM) which shows the distribution of the pages within the file &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The data sets list (DSL) comprising the name and number of pages in each data set &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The shared DASD enqueue list, which: &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Controls access to the file by multiple jobs, potentially running on different processors that share the DASD device upon which the file data sets reside &amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;Contains the enqueue level of each of those jobs. The  &amp;lt;var&amp;gt;[[ENQCTL command|ENQCTL]]&amp;lt;/var&amp;gt; command enables you to display the enqueue list. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The current file [[BROADCAST command: Sending a file message|broadcast]] message (if any), displayed when the file is [[OPEN FILE command|opened]].  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;The remaining seven pages of the FCT are empty. They were used in very early versions of M204, but are now &#039;Reserved for Future Use&#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SYSDATE_parameter&amp;diff=76429</id>
		<title>SYSDATE parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SYSDATE_parameter&amp;diff=76429"/>
		<updated>2015-03-05T18:09:21Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Add the syntax.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:SYSDATE parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;Current operating system time&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;System&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;user 0 CCAIN parameter list only&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V6.1&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
The SYSDATE parameter lets you set the initial system date to a given value. The SYSDATE and SYSTIME parameters must both be specified together, unless SYSDATE=+DDD is specified.  The format for the parameter value is: SYSDATE=yyyy/mm/dd or SYSDATE=+ddd&amp;lt;br&amp;gt;&lt;br /&gt;
SYSDATE may not be in the past, and may not be after 2042/09/17 when the old-style 8-byte hardware Time Of Day clock value wraps to zero.&lt;br /&gt;
[[Category:System parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=SYSTIME_parameter&amp;diff=76428</id>
		<title>SYSTIME parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=SYSTIME_parameter&amp;diff=76428"/>
		<updated>2015-03-05T18:00:50Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Actually say what the format is...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:SYSTIME parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;Current operating system time&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;System&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;User 0 CCAIN parameter list only&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V6.1&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
==Description==&lt;br /&gt;
The SYSTIME parameter lets you set the initial system time to a given value. The SYSDATE and SYSTIME parameters must both be specified together, unless SYSDATE=+DDD is specified. The format for the parameter value is: SYSTIME=hh:mm:ss&lt;br /&gt;
[[Category:System parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=Page_(File_architecture)&amp;diff=76412</id>
		<title>Page (File architecture)</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Page_(File_architecture)&amp;diff=76412"/>
		<updated>2015-03-04T01:01:01Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Deleted the link; it is not that kind of initialize.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A page is the underlying structure applied to the data sets that comprise a Model 204 file.&lt;br /&gt;
&lt;br /&gt;
All pages are 6184 bytes.&lt;br /&gt;
&lt;br /&gt;
When a file is [[Creating a file|created]], the pages in the file are formatted into:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;6144 bytes of &amp;quot;usable&amp;quot; space (how the space is used depends on the table where the page resides) &lt;br /&gt;
&amp;lt;li&amp;gt;A 40 byte page trailer&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The page trailer==&lt;br /&gt;
The page trailer contains the following:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The file name, which is the name used in the [[CREATE command: File|create]] process.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The date/time when the individual page was last initialized.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The date/time when the page was last written to the file.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Data used in the [[CHECKPOINT command|checkpoint]] process.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The table that this page is part of, the numeric representation for which is as follows:&lt;br /&gt;
&amp;lt;p&amp;gt;FCT = 00, Table A = 01, Table B = 02, Table C = 03, Table D = 04, Table E = 40, and Table X = 20.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The sequential page number within the table.  Three byte binary integer.&lt;br /&gt;
&amp;lt;p&amp;gt;Because of &amp;lt;var&amp;gt;[[INCREASE command|INCREASE]]&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[DECREASE command|DECREASE]]&amp;lt;/var&amp;gt; commands after the initial &amp;lt;var&amp;gt;CREATE&amp;lt;/var&amp;gt;, the pages for a table might not be contiguous.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:File architecture]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=RESTORE_command&amp;diff=76404</id>
		<title>RESTORE command</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=RESTORE_command&amp;diff=76404"/>
		<updated>2015-03-03T18:44:36Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Spell BRAODCAST more gooder.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Privileges&lt;br /&gt;
&amp;lt;dd&amp;gt;File manager plus ad hoc updates&lt;br /&gt;
&amp;lt;dt&amp;gt;Function&lt;br /&gt;
&amp;lt;dd&amp;gt;Restores a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file from a dumped version of that file&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;RESTORE [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;option&amp;lt;/span&amp;gt;] FROM &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Where:&lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;option&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A decimal value. Options can be summed. The options are:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt; &amp;lt;th&amp;gt;Option&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;th&amp;gt;Meaning&amp;lt;/th&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;128&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The size of a file data set or the number of data sets in a file is being changed. &amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;var&amp;gt;64&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The name of a file is being changed.&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;ddname&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The name of the data set from which the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file is being restored. If the &amp;lt;var&amp;gt;FROM&amp;lt;/var&amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; clause points to a data set that was not created by the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;DUMP&amp;lt;/var&amp;gt; command, the following error messages is issued: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.2711: &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname&amp;lt;/var&amp;gt; IS NOT A DUMP DATASET, CANNOT RESTORE INTO &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ddname2&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;&amp;lt;b&amp;gt;OPEN CEN&amp;lt;/b&amp;gt; &lt;br /&gt;
M204.0620: FILE CEN OPENED&lt;br /&gt;
M204.1203: FILE CEN WAS LAST UPDATED ON hh:mm:ss&lt;br /&gt;
&amp;lt;b&amp;gt;RESTORE 192 FROM DUMPCEN &amp;lt;/b&amp;gt;&lt;br /&gt;
M204.0500: FILE CEN: RESTORING FROM DUMP OF 88.262 SEP 19 14.24.29&lt;br /&gt;
M204.1760: FILE CEN: RESTORE BEGINNING AT 14.29.06&lt;br /&gt;
M204.1761: FILE CEN: RESTORE COMPLETED AT 14.29.24&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; command restores a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file from a dumped version of that file. &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; takes a sequential data set produced by a &amp;lt;var&amp;gt;[[DUMP command|DUMP]]&amp;lt;/var&amp;gt; command and turns it into a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; file again.&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; Before using the &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; (or &amp;lt;var&amp;gt;[[REGENERATE command|REGENERATE]]&amp;lt;/var&amp;gt;) command, you need to have &amp;lt;var&amp;gt;DUMP&amp;lt;/var&amp;gt; copies of the files. &amp;lt;var&amp;gt;DUMP&amp;lt;/var&amp;gt; processing updates the file while making a backup copy (to a target media). Otherwise, when you do a media recovery using either &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; (which does not include journals) or &amp;lt;var&amp;gt;REGENERATE&amp;lt;/var&amp;gt; (to include journals), the backup copy does not incorporate all updates, and you cannot detect this.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; command can be issued only in file context. (That is, the current default must be a file, not a group.) The file must be opened with file manager privileges and privileges to update with ad hoc requests.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If an external security interface is active, the user ID issuing the command is checked for the proper data set usage authorization. If the authorization check fails, the attempt is logged as a security violation and the command is not executed. Under a security interface, you must have READ privileges to read a file specified by this command. For more information, refer to the [[:Category:Security interfaces|Security interfaces]] pages.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If a file is skewed, the file can only be transferred from one device type to another through the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; DUMP/RESTORE facility. File skewing is an obsolete feature.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; has finished processing, it automatically closes all private or semi-public files. Public files remain open.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When it processes &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt;, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; ends any [[File integrity and recovery#Update units and transactions|update unit]] in progress and begins a non-backoutable update unit. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;After &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model&amp;amp;nbsp;204&amp;lt;/var&amp;gt; starts to restore a file, it displays a message showing the date and time the file was dumped. [[File dumping and restoring]] discusses the &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; options, along with a full presentation of &amp;lt;var&amp;gt;DUMP&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt;, and their use in moving, renaming, and changing the size of files.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Although the &amp;lt;var&amp;gt;DUMP&amp;lt;/var&amp;gt; command copies the &amp;lt;code&amp;gt;FILE BROADCAST&amp;lt;/code&amp;gt; message with the FPL, the &amp;lt;var&amp;gt;RESTORE&amp;lt;/var&amp;gt; command leaves the current &amp;lt;var&amp;gt;[[BROADCAST command|BROADCAST]]&amp;lt;/var&amp;gt; message in the file. For example:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN FPLJUNK&lt;br /&gt;
BROADCAST FILE BROADCAST MESSAGE NUMBER ONE&lt;br /&gt;
DUMP TO DUMPFPL&lt;br /&gt;
OPEN FPLJUNK&lt;br /&gt;
BROADCAST FILE BROADCAST MESSAGE NUMBER TWO&lt;br /&gt;
RESTORE FROM DUMPFPL&lt;br /&gt;
OPEN FPLJUNK&lt;br /&gt;
&amp;amp;lt;broadcast message number two&amp;gt; is displayed.&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: File manager commands]]&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=LITBL_parameter&amp;diff=76166</id>
		<title>LITBL parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=LITBL_parameter&amp;diff=76166"/>
		<updated>2015-02-19T23:45:44Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Clean up and add class=&amp;quot;code&amp;quot; to messages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:LITBL parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;0&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;Utable&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;On user&#039;s parameter line or reset by &amp;lt;var&amp;gt;[[UTABLE_command|UTABLE]]&amp;lt;/var&amp;gt; command&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V2.2&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; specifies the size of ITBL in bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; is used to store dummy string and &amp;lt;var&amp;gt;[[$Read]]&amp;lt;/var&amp;gt; responses entered on &amp;lt;var&amp;gt;[[INCLUDE command|INCLUDE]]&amp;lt;/var&amp;gt; lines.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; can range from 0 to 32760 and will be rounded up to a multiple of 8.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Verification messages may be issued:&amp;lt;/P&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;M204.0102: LITBL reset clears stacked arguments&amp;lt;br&amp;gt;M204.1076: Do you really want to CONTINUE&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Utable parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=LGTBL_parameter&amp;diff=76165</id>
		<title>LGTBL parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=LGTBL_parameter&amp;diff=76165"/>
		<updated>2015-02-19T23:32:38Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Rounds up to 8.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:LGTBL parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;288&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;Utable&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;On user&#039;s parameter line or reset by &amp;lt;var&amp;gt;[[UTABLE command|UTABLE]]&amp;lt;/var&amp;gt; command&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V2.1&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;p&amp;gt;The size of GTBL in bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;GTBL contains global variables. The value of LGTBL can range from 40, the minimum, to 2 billion. It will be rounded up to a multiple of 8. For an application subsystem user, (LGTBL - (&amp;lt;var&amp;gt;[[GTBLHASH parameter|GTBLHASH]]&amp;lt;/var&amp;gt;*10) must not be less than 288.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Refer to [[UTABLE command]] for a discussion of changing the size of LGTBL.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Utable parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=LITBL_parameter&amp;diff=75202</id>
		<title>LITBL parameter</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=LITBL_parameter&amp;diff=75202"/>
		<updated>2015-02-19T00:48:00Z</updated>

		<summary type="html">&lt;p&gt;Tbullock: Add rounding to 8.  Add the message you will sometimes get when changing from 0 to a larger number.   (But why does that only seem to happen when increasing and not decreasing?)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:LITBL parameter subtitle}}&lt;br /&gt;
==Summary==&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;Default value&lt;br /&gt;
&amp;lt;dd&amp;gt;0&lt;br /&gt;
&amp;lt;dt&amp;gt;Parameter type&lt;br /&gt;
&amp;lt;dd&amp;gt;Utable&lt;br /&gt;
&amp;lt;dt&amp;gt;Where set&lt;br /&gt;
&amp;lt;dd&amp;gt;On user&#039;s parameter line or reset by &amp;lt;var&amp;gt;[[UTABLE_command|UTABLE]]&amp;lt;/var&amp;gt; command&lt;br /&gt;
&amp;lt;dt&amp;gt;Related products&lt;br /&gt;
&amp;lt;dd&amp;gt;All&lt;br /&gt;
&amp;lt;dt&amp;gt;Introduced&lt;br /&gt;
&amp;lt;dd&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204 V2.2&amp;lt;/var&amp;gt; or earlier&lt;br /&gt;
&amp;lt;/dl&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; specifies the size of ITBL in bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; is used to store dummy string and &amp;lt;var&amp;gt;[[$Read]]&amp;lt;/var&amp;gt; responses entered on &amp;lt;var&amp;gt;[[INCLUDE command|INCLUDE]]&amp;lt;/var&amp;gt; lines. &amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; can range from 0 to 32760.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;var&amp;gt;LITBL&amp;lt;/var&amp;gt; will be rounded up to a multiple of 8 bytes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Messages:&lt;br /&gt;
M204.0102: LITBL reset clears stacked arguments&amp;lt;br&amp;gt;&lt;br /&gt;
M204.1076: Do you really want to CONTINUE&amp;lt;br&amp;gt;&lt;br /&gt;
may be issued.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Utable parameters]]&lt;br /&gt;
[[Category:Parameters]]&lt;/div&gt;</summary>
		<author><name>Tbullock</name></author>
	</entry>
</feed>