<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=The_Sir2000_APPDATE_command</id>
	<title>The Sir2000 APPDATE command - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=The_Sir2000_APPDATE_command"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;action=history"/>
	<updated>2026-05-10T18:23:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;diff=119160&amp;oldid=prev</id>
		<title>Goff: Remover spurious line feed</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;diff=119160&amp;oldid=prev"/>
		<updated>2022-11-14T20:42:33Z</updated>

		<summary type="html">&lt;p&gt;Remover spurious line feed&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:42, 14 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l117&quot;&gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tr&amp;gt;&amp;lt;th nowrap&amp;gt;&amp;lt;i&amp;gt;targdate&amp;lt;/i&amp;gt; [&amp;lt;i&amp;gt;targtime&amp;lt;/i&amp;gt;] &amp;lt;br&amp;gt;[AT &amp;lt;i&amp;gt;refdate&amp;lt;/i&amp;gt; [&amp;lt;i&amp;gt;reftime&amp;lt;/i&amp;gt;]]&amp;lt;/th&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;tr&amp;gt;&amp;lt;th nowrap&amp;gt;&amp;lt;i&amp;gt;targdate&amp;lt;/i&amp;gt; [&amp;lt;i&amp;gt;targtime&amp;lt;/i&amp;gt;] &amp;lt;br&amp;gt;[AT &amp;lt;i&amp;gt;refdate&amp;lt;/i&amp;gt; [&amp;lt;i&amp;gt;reftime&amp;lt;/i&amp;gt;]]&amp;lt;/th&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; is required;, the rest are optional. These phrases allow you to specify the date and time of the application clock. The dates are specified in YYYY/MM/DD format, and the times are specified in HH:MI:SS format. &amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; is required;, the rest are optional. These phrases allow you to specify the date and time of the application clock. The dates are specified in YYYY/MM/DD format, and the times are specified in HH:MI:SS format. &amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The application clocks continue to run so that they are a constant difference from&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The application clocks continue to run so that they are a constant difference from the internal date and time. This difference is the difference between the target datetime, as specified by &amp;lt;var class=&quot;term&quot;&amp;gt;targdate&amp;lt;/var&amp;gt; and the optional &amp;lt;var class=&quot;term&quot;&amp;gt;targtime&amp;lt;/var&amp;gt;, and the reference datetime. The reference datetime can be omitted, in which case the reference datetime is the datetime when the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is issued. &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;the internal date and time. This difference is the difference between the target datetime, as specified by &amp;lt;var class=&quot;term&quot;&amp;gt;targdate&amp;lt;/var&amp;gt; and the optional &amp;lt;var class=&quot;term&quot;&amp;gt;targtime&amp;lt;/var&amp;gt;, and the reference datetime. The reference datetime can be omitted, in which case the reference datetime is the datetime when the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is issued. &amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/var&amp;gt; is specified, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; must also be. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; is specified, then either &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt; must be omitted or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/var&amp;gt; must be specified. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; is omitted, the clock is shifted the number of days between &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/var&amp;gt; is specified, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; must also be. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; is specified, then either &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt; must be omitted or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/var&amp;gt; must be specified. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; is omitted, the clock is shifted the number of days between &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Goff</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;diff=105108&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;diff=105108&amp;oldid=prev"/>
		<updated>2018-02-08T22:00:52Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:00, 8 February 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;diff=105107&amp;oldid=prev</id>
		<title>JAL: /* Error handling control with DATE_ERR */ add link</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=The_Sir2000_APPDATE_command&amp;diff=105107&amp;oldid=prev"/>
		<updated>2018-02-08T21:19:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Error handling control with DATE_ERR: &lt;/span&gt; add link&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Overview==&lt;br /&gt;
The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command provides control over the operation of date and time oriented SOUL $functions. It supports a system-wide or user-level clock that is used to obtain date and time values. It can be used to control the default handling of errors detected by datetime $functions, allowing the logging of error messages and request cancellation. The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command allows you to control these defaults at a user and system level, significantly reducing your effort to detect some date errors.&lt;br /&gt;
&lt;br /&gt;
For application testing, the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clocks are preferred to the Model&amp;amp;nbsp;204 &amp;lt;var&amp;gt;[[SYSDATE parameter|SYSDATE]]&amp;lt;/var&amp;gt; parameter, which is much less flexible and which greatly complicates the ability to do things such as share procedure files or read-only data files in the testing environment.&lt;br /&gt;
&lt;br /&gt;
See [[#Values affected by the APPDATE clocks|Values affected by the APPDATE clocks]] for a list of the values that are affected by the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command. See [[#APPDATE command usage notes|APPDATE command usage notes]] for descriptions of several common testing scenarios and how to use &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; to handle them, including testing the effect of changing the date into the future for any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A single user&amp;#039;s session &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All users&amp;#039; sessions &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All users&amp;#039; sessions except selected ones &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All users of a given [[APSY]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;All users of all APSYs, except selected APSYs &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In most contexts when describing &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt;, these Sir2000 User Language Tools pages speak of a &amp;quot;date and time&amp;quot; or simply of a &amp;quot;time&amp;quot; (which is the same thing). Generally, for Y2K testing, you are only concerned about setting a &amp;quot;date,&amp;quot; that is, setting the clock to a particular day.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; addresses many of the needs to test a SOUL application at some&lt;br /&gt;
date in the future, notably beyond the end of the 1900s. &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; lets you make these tests with your current version of Model&amp;amp;nbsp;204, and without modifying the Model&amp;amp;nbsp;204 internal date-related data structures, such as the File Parameter List, page trailers, and the Procedure Dictionary. &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; does not affect any file level operations such as recovery or DUMP, or the ability to open a file with different application date settings.&lt;br /&gt;
&lt;br /&gt;
The system-wide and user-level clocks specified by the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command are called &amp;lt;b&amp;gt;APPDATE clocks&amp;lt;/b&amp;gt;. In order to use these clocks, you must set the date (and optionally the time) of the system level or the user level clock. The syntax associated with setting these APPDATE clocks is described in [[#Setting the clocks with the APPDATE command|Setting the clocks with the APPDATE command]].&lt;br /&gt;
&lt;br /&gt;
Another important component in a testing environment, or indeed in a production&lt;br /&gt;
environment, is the ability to detect unanticipated errors. The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command with a &amp;lt;var&amp;gt;DATE_ERR&amp;lt;/var&amp;gt; clause and the &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; function allow you to change the default error handling of arguments to date and time oriented $functions. The syntax associated with &amp;lt;var&amp;gt;DATE_ERR&amp;lt;/var&amp;gt; is described in [[#Error handling control with DATE_ERR|Error handling control with DATE_ERR]].&lt;br /&gt;
&lt;br /&gt;
A single invocation of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command can set &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; values or display &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; values. If you want to examine the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; values in effect, use the syntax described in [[#Examining the APPDATE information|Examining the APPDATE information]]. The detailed explanation of setting &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; values is described separately for clock values&lt;br /&gt;
and datetime argument error handling, but for a single level you can specify both clock values and error handling, in that order, in a single command. &lt;br /&gt;
&lt;br /&gt;
The complete syntax of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is shown in [[#Complete syntax of the APPDATE command|Complete syntax of the APPDATE command]].&lt;br /&gt;
&lt;br /&gt;
==Setting clocks with the APPDATE command==&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The two &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clocks (user and system) effectively run in parallel with the internal clock, that is, the time that Model&amp;amp;nbsp;204 obtains from the CPU. &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 &amp;lt;var&amp;gt;SYSDATE&amp;lt;/var&amp;gt; parameter cannot be specified if the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is used. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When you set either of the clocks, you are actually setting the amount that the clock runs ahead of the internal clock. You do that by specifying 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 current time of the clock being set &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The time that would be current when the internal clock is at some specific reference time &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 addition to the time setting of the clocks, you control which clock an application uses. This is determined primarily by the &amp;quot;state&amp;quot; of the &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; clock: &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;State&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&amp;gt;INTERNAL&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Applications use the &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt; clock. &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;ON&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Applications use the &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; clock. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th nowrap&amp;gt;OFF (the default) &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Applications use the &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt; clock unless the&lt;br /&gt;
&amp;lt;var&amp;gt;SYSTEM&amp;lt;/var&amp;gt; clock is on (the default &amp;lt;var&amp;gt;SYSTEM&amp;lt;/var&amp;gt; clock is off). &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;
The clock used to satisfy an application request for date or time is determined as shown in the following figure: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;caption&amp;quot; style=&amp;quot;margin-right:12em&amp;quot;&amp;gt;Source of date returned to $function&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; *----------------------------------------------------------*&lt;br /&gt;
 *     Application code requests date                       *&lt;br /&gt;
 *         (datetime $functions)                            *&lt;br /&gt;
 *----------------------------------------------------------*&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; Gets date/time from the USER clock if it is ON &lt;br /&gt;
 | (example: APPDATE USER ON 2001/01/01)&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; Else from SYSTEM clock if it is ON and USER clock is OFF&lt;br /&gt;
 |    example: APPDATE USER OFF (default)&lt;br /&gt;
 |    and APPDATE SYSTEM ON 1999/12/31&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; Else from INTERNAL clock:&lt;br /&gt;
      example: APPDATE USER INTERNAL&lt;br /&gt;
                     or&lt;br /&gt;
               APPDATE USER OFF&lt;br /&gt;
           and APPDATE SYSTEM OFF&lt;br /&gt;
                     or&lt;br /&gt;
               APPDATE USER OFF&lt;br /&gt;
           and APPDATE SYSTEM INTERNAL &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===APPDATE syntax to set USER or SYSTEM clock===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The time of the &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;SYSTEM&amp;lt;/var&amp;gt; clock may be set by the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;APPDATE [USER|SYSTEM] [ON|OFF|INTERNAL] -&lt;br /&gt;
&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/span&amp;gt; [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/span&amp;gt;] -&lt;br /&gt;
[AT &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/span&amp;gt; [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/span&amp;gt;]] &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===APPDATE syntax to change state of USER or SYSTEM clock===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Whether or not a particular clock is used can be controlled by the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command, without changing the time of the &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;SYSTEM&amp;lt;/var&amp;gt; clock: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;USER&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;SYSTEM&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;{&amp;lt;/span&amp;gt; ON&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;OFF&amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;INTERNAL &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;}&amp;lt;/span&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table class=&amp;quot;thJustBold&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;USER | SYSTEM&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Optional specification of which clock is being modified. Defaults to &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt;. The &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; clock specifies the running user&amp;#039;s &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock. The &amp;lt;var&amp;gt;SYSTEM&amp;lt;/var&amp;gt; clock specifies the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock used for any user with an &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; clock that is &amp;lt;var&amp;gt;OFF&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;ON | OFF | INTERNAL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Optional. &amp;lt;code&amp;gt;APPDATE USER ON&amp;lt;/code&amp;gt; indicates that the user clock is used by the current user. &amp;lt;code&amp;gt;APPDATE SYSTEM ON&amp;lt;/code&amp;gt; indicates that the system clock is used by all users whose user clock is &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt;. &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt; both indicate that the specified clock is not visible. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the user-level clock is set to &amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt;, SOUL $function values are obtained from the user-level clock. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the user-level clock is set to &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt;, SOUL $function values are obtained from the internal clock. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the user-level clock is set to &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt;, SOUL $function values depend on the setting of the system-wide clock: if it is &amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt;, they are obtained from the system-wide clock; otherwise (it is &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt;) they are obtained from the internal clock. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this phrase is omitted in an &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command that sets the time of a&lt;br /&gt;
clock, the state of that clock is set to &amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can specify &amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt; without a date, in which case the date/time in a clock is not changed, but the visibility of the corresponding clock is affected. &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 nowrap&amp;gt;&amp;lt;i&amp;gt;targdate&amp;lt;/i&amp;gt; [&amp;lt;i&amp;gt;targtime&amp;lt;/i&amp;gt;] &amp;lt;br&amp;gt;[AT &amp;lt;i&amp;gt;refdate&amp;lt;/i&amp;gt; [&amp;lt;i&amp;gt;reftime&amp;lt;/i&amp;gt;]]&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; is required;, the rest are optional. These phrases allow you to specify the date and time of the application clock. The dates are specified in YYYY/MM/DD format, and the times are specified in HH:MI:SS format. &amp;lt;p&amp;gt;&lt;br /&gt;
The application clocks continue to run so that they are a constant difference from&lt;br /&gt;
the internal date and time. This difference is the difference between the target datetime, as specified by &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; and the optional &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt;, and the reference datetime. The reference datetime can be omitted, in which case the reference datetime is the datetime when the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is issued. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/var&amp;gt; is specified, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; must also be. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; is specified, then either &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt; must be omitted or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;reftime&amp;lt;/var&amp;gt; must be specified. If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targtime&amp;lt;/var&amp;gt; is omitted, the clock is shifted the number of days between &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;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;
A successful &amp;lt;code&amp;gt;APPDATE SYSTEM&amp;lt;/code&amp;gt; command has an immediate effect upon the date/time returned by SOUL $functions for all threads that have user-level clocks set or defaulted to the &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; state. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default value of the system-wide clock and all user-level clocks is &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt;, with the same datetime as the internal clock. Hence, if the only command you issue is &amp;lt;code&amp;gt;APPDATE SYSTEM yyyy/mm/dd&amp;lt;/code&amp;gt;, you will immediately shift the value returned as the current date by SOUL $functions. The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;USER&amp;lt;/var&amp;gt; clock is reset to &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt;, with the same time as the &amp;lt;var&amp;gt;INTERNAL&amp;lt;/var&amp;gt; clock, when a user logs off. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Error handling control with DATE_ERR==&lt;br /&gt;
The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command with the &amp;lt;var&amp;gt;DATE_ERR&amp;lt;/var&amp;gt; keyword and the &amp;lt;var&amp;gt;[[$Sir_Date_Err]]&amp;lt;/var&amp;gt; function let you decide what default action the system takes if an error is detected by a datetime $function. This lets you control validation of dates in your applications, significantly reducing your effort to detect and correct date errors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;APPDATE DATE_ERR&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;var&amp;gt; detect the following errors:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Invalid datetime format specification &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Datetime string not matching format &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Datetime out of range for the format &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Invalid CENTSPAN value &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Datetime out of range for CENTSPAN/SPANSIZE combination &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can set the default error handling for all $functions in the system with an &amp;lt;code&amp;gt;APPDATE SYSTEM DATE_ERR&amp;lt;/code&amp;gt; command. You can override this setting for an individual user with&lt;br /&gt;
an &amp;lt;code&amp;gt;APPDATE USER DATE_ERR&amp;lt;/code&amp;gt; command. You can override both settings for the duration of a SOUL request with the &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; function. If you are using the Sirius datetime $functions, you can also supply a parameter on the individual&lt;br /&gt;
function call to control error handling, overriding the default set by &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt;. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The processing performed when a datetime function encounters an error is determined&lt;br /&gt;
using the precedence indicated in the following figure: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;caption&amp;quot; style=&amp;quot;margin-right:12em&amp;quot;&amp;gt;Datetime $function argument error handling &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; *----------------------------------------*&lt;br /&gt;
 * Datetime $function argument error *&lt;br /&gt;
 *----------------------------------------*&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; IGNORE is error handling handling arg:&lt;br /&gt;
 | return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; REPORT is error handling arg:&lt;br /&gt;
 | issue message, return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; Error handling supplied, and not OFF:&lt;br /&gt;
 | issue message, cancel request&lt;br /&gt;
 |&lt;br /&gt;
 ++ Else OFF is error handling arg, or none:&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; $SIR_DATE_ERR(&amp;#039;REPORT&amp;#039;) last invoked:&lt;br /&gt;
 | issue message, return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; $SIR_DATE_ERR(&amp;#039;IGNORE&amp;#039;) last invoked:&lt;br /&gt;
 | return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; $SIR_DATE_ERR(&amp;#039;CANCEL&amp;#039;) last invoked:&lt;br /&gt;
 | issue message, cancel request&lt;br /&gt;
 |&lt;br /&gt;
 ++ Else error handling controlled by APPDATE:&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; USER DATE_ERR REPORT:&lt;br /&gt;
 | issue message, return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; USER DATE_ERR IGNORE:&lt;br /&gt;
 | return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; USER DATE_ERR CANCEL:&lt;br /&gt;
 | issue message, cancel request&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; USER DATE_ERR OFF (default) and&lt;br /&gt;
 | SYSTEM DATE_ERR REPORT&lt;br /&gt;
 | issue message, return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; USER DATE_ERR OFF (default) and&lt;br /&gt;
 | SYSTEM DATE_ERR IGNORE&lt;br /&gt;
 | return error value&lt;br /&gt;
 |&lt;br /&gt;
 |-&amp;gt; USER DATE_ERR OFF (default) and&lt;br /&gt;
 | SYSTEM DATE_ERR CANCEL&lt;br /&gt;
 | issue message, cancel request&lt;br /&gt;
 |&lt;br /&gt;
 ++ Else error handling not affected&lt;br /&gt;
 | by Sir2000 User Language Tools:&lt;br /&gt;
 |&lt;br /&gt;
 +---&amp;gt; return error value  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting default error handling with the APPDATE command===&lt;br /&gt;
The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command may be used to set and change the default for processing performed when a datetime $function detects an error.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE [USER|SYSTEM] DATE_ERR -&lt;br /&gt;
[OFF | CANCEL | REPORT | IGNORE] -&lt;br /&gt;
[DEBUG | NODEBUG] &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&amp;gt;&amp;lt;th&amp;gt;USER | SYSTEM&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Optional specification of the scope for the current command, defaults to USER. The USER error handling overrides the SYSTEM error handling. Both USER and SYSTEM error handling are initially OFF. &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;OFF | CANCEL | REPORT | IGNORE&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This is optional. OFF indicates that there is no default error handling at the&lt;br /&gt;
given level. CANCEL indicates that the default error handling at the given level is issuing an error message describing the error and cancelling the User Language request. REPORT indicates that the default error handling at the given level is issuing an error message describing the error and returning an error indicator. IGNORE indicates that the default error handling at the given level is returning an error indicator. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th nowrap&amp;gt;DEBUG | NODEBUG&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;If DEBUG is specified, any datetime error message produced at the given level (user or system) will include the name of the procedure file, the procedure name, and the line number within the procedure for the affected $function invocation. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If neither DEBUG nor NODEBUG is specified, then OFF, CANCEL, REPORT, or IGNORE must be specified, in which case the default DEBUG/NODEBUG setting is determined from the following table: &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&amp;gt;&amp;lt;th&amp;gt;CANCEL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEBUG &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;REPORT&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;DEBUG&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;IGNORE&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;NODEBUG&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;OFF&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;There is no DEBUG/NODEBUG setting at the level.&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;
Since the initial DATE_ERR setting is OFF, there is no DEBUG/NODEBUG&lt;br /&gt;
setting, at both SYSTEM and USER levels. &amp;lt;/p&amp;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;
Both the USER and SYSTEM level defaults can be overridden by the setting of the&lt;br /&gt;
&amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; function, which in turn is overridden by supplying a non-default value&lt;br /&gt;
for the error handling argument, if a $Sir_Date&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt; $function is in use. The&lt;br /&gt;
&amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; error handling is initially OFF. If  &amp;lt;code&amp;gt;$Sir_Date_Err(&amp;#039;OFF&amp;#039;)&amp;lt;/code&amp;gt; is in effect,&lt;br /&gt;
the USER level handling controls default error handling, unless it is OFF, in which case the SYSTEM level controls 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; The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command and &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; set only the default datetime argument error handling. This will affect the standard SOUL date $functions, and it will affect the $Sir_Date&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt; and Sir2000 $functions if they are coded without the error handling argument. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Setting default error handling with the $Sir_Date_Err function===&lt;br /&gt;
&amp;lt;var&amp;gt;[[$Sir_Date_Err]]&amp;lt;/var&amp;gt; provides the ability to set or override default datetime $function error handling at the request level:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%s string len 8&lt;br /&gt;
%s = $sir_date_er(&amp;#039;REPORT&amp;#039;) &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The effect of a &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; invocation persists until the end of the SOUL request, at which time its setting is reset to &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt;. Note that &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; only sets&lt;br /&gt;
the default datetime argument error handling. It will affect the standard SOUL date $functions, and&lt;br /&gt;
it will affect the $Sir_Date&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt; $functions if they are coded without the error handling argument. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examining the APPDATE information==&lt;br /&gt;
The Sir2000 User Language Tools provide mechanisms for displaying and saving the&lt;br /&gt;
state of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clocks and various DATE_ERR switches. Thus, it is possible for applications to retrieve the current states, temporarily change the states and then restore the previous states.&lt;br /&gt;
&lt;br /&gt;
===APPDATE DISPLAY command===&lt;br /&gt;
The following form of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command allows you to view the setting of either the USER or SYSTEM clock, and to view the error handling setting:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE DISPLAY [ALL|USER|SYSTEM] &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;thJustBold&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th nowrap&amp;gt;ALL | USER | SYSTEM&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This is optional. It specifies to display the current time and error handling setting for all levels, or to display either the USER or SYSTEM level in a form that is equivalent to the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command which set it.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
ALL is the default and prints the current internal time, the&lt;br /&gt;
clock ON|OFF|INTERNAL settings for both USER and&lt;br /&gt;
SYSTEM, the DATE_ERR settings of both USER and&lt;br /&gt;
SYSTEM, what the current times would be for the clocks if&lt;br /&gt;
they were in effect, and an indication of which clock and&lt;br /&gt;
which error handling setting is active for the current user.&lt;br /&gt;
Following this is the display of the USER and SYSTEM levels&lt;br /&gt;
in the &amp;quot;command setting&amp;quot; form, that is, the command that was&lt;br /&gt;
issued to set the level. &amp;lt;/p&amp;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;
&amp;lt;code&amp;gt;APPDATE DISPLAY ALL&amp;lt;/code&amp;gt; is not suitable for placing in a global and re-invoking; you should use &amp;lt;code&amp;gt;APPDATE DISPLAY {USER | SYSTEM}&amp;lt;/code&amp;gt; for that purpose. The display&lt;br /&gt;
format of &amp;lt;code&amp;gt;APPDATE DISPLAY ALL&amp;lt;/code&amp;gt; is shown in the following example: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; LEVEL CLOCK STATE/DATE_ERR CURRENT CLOCK&lt;br /&gt;
 -------- ----------------------- ------------------------&lt;br /&gt;
 INTERNAL 1997/05/14 11:27:51&lt;br /&gt;
 SYSTEM ON/OFF 2000/01/02 11:27:51 (@)&lt;br /&gt;
 USER OFF/CANCEL DEBUG 1997/05/14 11:27:51 (*)&lt;br /&gt;
 SYSTEM CLOCK ACTIVE (@); USER LEVEL IS ERROR HANDLING DEFAULT (*)&lt;br /&gt;
 COMMAND SETTINGS:&lt;br /&gt;
 APPDATE SYSTEM ON 2000/01/01 AT 1997/05/13 DATE_ERR OFF&lt;br /&gt;
 APPDATE USER OFF 1997/05/13 AT 1997/05/13 DATE_ERR CANCEL DEBUG &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;APPDATE DISPLAY {USER | SYSTEM}&amp;lt;/code&amp;gt; forms of the command produce results in the form of a legal &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command that would set the levels to their current&lt;br /&gt;
values. For example, the following lines would result from invocations of the &amp;lt;code&amp;gt;APPDATE DISPLAY USER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;APPDATE DISPLAY SYSTEM&amp;lt;/code&amp;gt; commands in the same context as above: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE SYSTEM ON 2000/01/01 AT 1997/05/13 DATE_ERR OFF&lt;br /&gt;
APPDATE USER OFF 1997/05/13 AT 1997/05/13 DATE_ERR CANCEL DEBUG &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Retrieving last non-null $Sir_Date_Err setting===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can call &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; with no argument or with the null string, and it will return a character string indicating the most recent valid and non-null value specified in a call to &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt; during the current request. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example: &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%s string len 8&lt;br /&gt;
%s = $sir_date_err( &amp;lt;no argument&amp;gt; | &amp;amp;apos;&amp;amp;apos; ) &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Such a call will return one of the following strings: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;OFF&amp;#039; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;CANCEL&amp;#039; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;REPORT&amp;#039; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;#039;IGNORE&amp;#039; &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Privileges, disabling, and pre-User 0 APPDATE command==&lt;br /&gt;
The &amp;lt;code&amp;gt;APPDATE SYSTEM&amp;lt;/code&amp;gt; form of the command can be issued only by User&amp;amp;nbsp;0 (user zero, that is, in the CCAIN input stream) or by a user with system manager privileges;&lt;br /&gt;
&amp;lt;code&amp;gt;APPDATE USER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;APPDATE DISPLAY&amp;lt;/code&amp;gt; can be issued by any user. &amp;lt;code&amp;gt;APPDATE SYSTEM&amp;lt;/code&amp;gt; can also be used in the CCAIN input stream before the User&amp;amp;nbsp;0 parameter line,&lt;br /&gt;
so that the system-wide &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock and error handling can be set prior to any calculations performed by an IODEV 3 thread. Neither &amp;lt;code&amp;gt;APPDATE USER&amp;lt;/code&amp;gt; nor &amp;lt;code&amp;gt;APPDATE DISPLAY&amp;lt;/code&amp;gt; may be used before the User&amp;amp;nbsp;0 parameter line.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
An &amp;lt;code&amp;gt;APPDATE RESTRICT&amp;lt;/code&amp;gt; command can be used to prohibit any issuance of the&lt;br /&gt;
&amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command except prior to the User&amp;amp;nbsp;0 parameter line. This could be used if you do not want anyone to change the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; settings after initialization of the Model&amp;amp;nbsp;204 run. The &amp;lt;code&amp;gt;APPDATE RESTRICT&amp;lt;/code&amp;gt; command itself can only be issued before the User&amp;amp;nbsp;0 parameter line. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
You can also disable or restrict the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command by applying a customization zap. You might use a customization zap like the following if, for example, you wanted to disallow the use of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command in a production load module: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; * If you apply the following zap, any APPDATE&lt;br /&gt;
 * command will cause an error message to be&lt;br /&gt;
 * issued and the command otherwise is ignored.&lt;br /&gt;
 *&lt;br /&gt;
 * Note: this example assumes you have no other&lt;br /&gt;
 * customization zaps; if you do, include those&lt;br /&gt;
 * bits in the VER and REP data.&lt;br /&gt;
 *&lt;br /&gt;
 NAME ONLINE SIRK$&lt;br /&gt;
 VER 070E 00&lt;br /&gt;
 REP 070E 80&lt;br /&gt;
 * -------------  End of zap -------------------- &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Or a zap like the following, if you want to only allow one system-wide &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; setting for the entire Model&amp;amp;nbsp;204 run: &lt;br /&gt;
&amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; * If you apply the following zap, the APPDATE&lt;br /&gt;
 * command is only allowed prior to the user zero&lt;br /&gt;
 * parameter line, and any other use of APPDATE&lt;br /&gt;
 * will cause an error message to be issued and&lt;br /&gt;
 * the command otherwise is ignored.&lt;br /&gt;
 *&lt;br /&gt;
 * Note: this example assumes you have no other&lt;br /&gt;
 * customization zaps; if you do, include those&lt;br /&gt;
 * bits in the VER and REP data.&lt;br /&gt;
 *&lt;br /&gt;
 NAME ONLINE SIRK$&lt;br /&gt;
 VER 070E 00&lt;br /&gt;
 REP 070E 40&lt;br /&gt;
 * -------------  End of zap --------------------&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; Lines are not sent to the Model&amp;amp;nbsp;204 audit trail for commands (and subsequent error messages) issued prior to the User&amp;amp;nbsp;0 parameter line. Output &amp;lt;i&amp;gt;is&amp;lt;/i&amp;gt; sent to CCAPRINT for such commands, however. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Complete syntax of the APPDATE command==&lt;br /&gt;
The detailed explanation of setting &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; values is described separately for clock values (see [[#Setting clocks with the APPDATE command|Setting clocks with the APPDATE comman]]) and&lt;br /&gt;
datetime argument error handling (see [[#Error handling control with DATE_ERR|Error handling control with DATE_ERR]]). However, for the USER or SYSTEM level you can specify both clock values and error handling, in that order, in a single command. &lt;br /&gt;
&lt;br /&gt;
===Syntax===&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The complete syntax of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is shown below: &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;syntax&amp;quot;&amp;gt;APPDATE &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;Level&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;Clock_set&amp;lt;/span&amp;gt; [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;Err_set&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;Level Err_set&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;Display&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; RESTRICT &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;}&amp;lt;/span&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Syntax terms===&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;p&amp;gt;Level&amp;lt;/p&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;USER | SYSTEM &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;p&amp;gt;Clock_set&amp;lt;/p&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;Clock_state&amp;lt;/var&amp;gt; | [&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;Clock_state&amp;lt;/var&amp;gt;] &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;Date_times&amp;lt;/var&amp;gt; &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;p&amp;gt;Clock_state&amp;lt;/p&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;ON | OFF | INTERNAL &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;p&amp;gt;Date_times&amp;lt;/p&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;{ &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate&amp;lt;/var&amp;gt; [AT &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate&amp;lt;/var&amp;gt;] &lt;br /&gt;
| &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targdate targtime&amp;lt;/var&amp;gt; [AT &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;refdate reftime&amp;lt;/var&amp;gt;] } &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;p&amp;gt;Err_set&amp;lt;/p&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;DATE_ERR &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;{&amp;lt;/span&amp;gt; [OFF|CANCEL|REPORT|IGNORE]  &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;  [DEBUG|NODEBUG] &amp;lt;span class=&amp;quot;squareb&amp;quot;&amp;gt;}&amp;lt;/span&amp;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; {&amp;lt;var&amp;gt;OFF|CANCEL|REPORT|IGNORE&amp;lt;/var&amp;gt;} or {&amp;lt;var&amp;gt;DEBUG|NODEBUG&amp;lt;/var&amp;gt;} must be specified with &amp;lt;var&amp;gt;DATE_ERR&amp;lt;/var&amp;gt;.&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;p&amp;gt;Display &amp;lt;/p&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;p class=&amp;quot;codeInTable&amp;quot;&amp;gt;DISPLAY [ALL | USER | SYSTEM] &amp;lt;/p&amp;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;
As discussed in [[#Privileges, disabling, and pre-User 0 APPDATE command|Privileges, disabling, and pre-User 0 APPDATE command]]: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;An &amp;lt;code&amp;gt;APPDATE SYSTEM&amp;lt;/code&amp;gt; command must be issued in the User&amp;amp;nbsp;0 input stream or by a system manager; an error message is produced if &amp;lt;code&amp;gt;APPDATE SYSTEM&amp;lt;/code&amp;gt; is processed in other contexts. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;An &amp;lt;code&amp;gt;APPDATE RESTRICT&amp;lt;/code&amp;gt; command must be issued in the User&amp;amp;nbsp;0 input stream; an error message is produced if &amp;lt;code&amp;gt;APPDATE RESTRICT&amp;lt;/code&amp;gt; is processed in other contexts. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command can also be completely disabled, or restricted to the User&amp;amp;nbsp;0 input stream before the User&amp;amp;nbsp;0 parameter line, by using a customization zap. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Issuing an &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command in a disabled or restricted context produces an error message but does no checking or processing of the command. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Values affected by the APPDATE clocks==&lt;br /&gt;
The active &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock affects the value returned by the following SOUL $functions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Date&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$DateJ&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$DateP&amp;lt;/var&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$DateDif&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$DateCnv&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$DayI&amp;lt;/var&amp;gt; (when obtaining the year for handling the &amp;lt;var&amp;gt;CENTSPLT&amp;lt;/var&amp;gt; argument) &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Time&amp;lt;/var&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sir_Date&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateN&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateND&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateNM&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateS&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$SirTime&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$Web_Date&amp;lt;/var&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Web_Last_Modified&amp;lt;/var&amp;gt; (when ensuring last-modified date isn&amp;#039;t future) &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sir_DateChg&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateChk&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateCnv&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_DateDif&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_Date2N&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_Date2ND&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_Date2NM&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Sir_Date2NS&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Db_RpcParam&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$Srv_Bind&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$Srv_Parmset&amp;lt;/var&amp;gt; (when obtaining the year for relative &amp;lt;var&amp;gt;CENTSPAN&amp;lt;/var&amp;gt; handling) &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 only Model&amp;amp;nbsp;204 command affected by the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock is the &amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; command for changing the &amp;lt;var&amp;gt;CENTSPLT&amp;lt;/var&amp;gt; user parameter. In this case, the &amp;lt;var&amp;gt;BASECENT&amp;lt;/var&amp;gt; parameter, which is calculated using the current time, obtains the current time from the active&lt;br /&gt;
&amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock. The resulting value of &amp;lt;var&amp;gt;BASECENT&amp;lt;/var&amp;gt; can be used to interpret 2-digit years passed to the following SOUL $functions: &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;$DateDif&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$DateCnv&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$DayI&amp;lt;/var&amp;gt;, if neither the &amp;lt;var&amp;gt;CENTSPLT&amp;lt;/var&amp;gt; nor &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt; arguments are provided &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$DateChg&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$DateChk&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;
Finally, the default value of &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt; is taken from the active &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock if the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is issued before the User&amp;amp;nbsp;0 parameter line.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==APPDATE command usage notes==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One kind of application testing is simply to see what happens when dates into the&lt;br /&gt;
21st century are returned by SOUL $functions. This can be done in&lt;br /&gt;
isolation by issuing a command such as the following:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE USER 2000/01/01 &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This can be simply issued by the user before entering the application, or it can be&lt;br /&gt;
issued in the startup or logon proc of the application.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If your application stores results that are retrieved later by the application, you should probably put a command such as the following into the startup proc:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE USER 2000/01/01 AT 1997/05/01 &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This indicates that the application clock will run ahead of the internal date and time so that on the 1st of May, 1997, the application clock will show the 1st of January, 2000. Your application can thus run as if it were &amp;quot;shifted&amp;quot; ahead in time, and the shift amount will be consistent, even if you bring down the online and bring it up again. It is recommended that you place it in the startup procedure in case any dates are referenced in it.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If you want all applications (except those &amp;quot;shielded&amp;quot; as in item 5, below) to use the same clock, you need not change any applications but simply code before the User&amp;amp;nbsp;0 parameter line:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE SYSTEM 2000/01/01 AT 1997/05/01 &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Note that this also changes the default &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt;; see item 6, below. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If you have an application that must use the internal date and time, even if the system-wide application clock is ON, you should enter a command such as the&lt;br /&gt;
following in the startup procedure:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;APPDATE USER INTERNAL &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
This could be needed by an application that examines internal datetime values,&lt;br /&gt;
such as those found in the audit trail. A robust application will preserve the&lt;br /&gt;
&amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; value and can do this using the &amp;lt;var&amp;gt;[[$CommndL]]&amp;lt;/var&amp;gt; function, since an [[Sdaemons|sdaemon]] thread initiated with $COMM&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt; copies the application clock of its invoker. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;A good date for &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; testing might be &amp;lt;code&amp;gt;2000/02/29&amp;lt;/code&amp;gt;, since that is a valid date, but &amp;lt;code&amp;gt;1900/02/29&amp;lt;/code&amp;gt; is &amp;lt;em&amp;gt;not&amp;lt;/em&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The use of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command is to establish a clock for all application-level operations. It does not affect static values that had been established prior to the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command. This is relevant to the value of the &amp;lt;var&amp;gt;BASECENT&amp;lt;/var&amp;gt; parameter and the default value of the &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt; user parameter, as follows:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt; parameter has not been set, its value is the first two digits of the year during Model&amp;amp;nbsp;204 initialization. An &amp;lt;code&amp;gt;APPDATE SYSTEM ON ...&amp;lt;/code&amp;gt; command issued before the User&amp;amp;nbsp;0 parameter line affects the default value of &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt;. All other invocations of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command leave &amp;lt;var&amp;gt;DEFCENT&amp;lt;/var&amp;gt; unaffected. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;BASECENT&amp;lt;/var&amp;gt; parameter is calculated based on the current time whenever the &amp;lt;var&amp;gt;CENTSPLT&amp;lt;/var&amp;gt; parameer is set. This current time is taken from the active &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock, but subsequent invocations of the &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command do not affect the &amp;lt;var&amp;gt;BASECENT&amp;lt;/var&amp;gt; parameter. &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 &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command does not affect the date and time printed on header 0 of each output page. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command and the use of the Model&amp;amp;nbsp;204 &amp;lt;var&amp;gt;SYSDATE&amp;lt;/var&amp;gt; parameter are mutually exclusive. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Command&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$CommBg&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$CommndL&amp;lt;/var&amp;gt; (see [[List_of_$functions]]) provide a mechanism for passing a unit of work to an sdaemon or background thread that is different from the thread that issues the request. &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the requested unit of work receives control, the &amp;lt;code&amp;gt;APPDATE USER&amp;lt;/code&amp;gt; settings from the thread that invoked the $function will be in effect. If an &amp;lt;code&amp;gt;APPDATE USER&amp;lt;/code&amp;gt; command is issued in the sdaemon thread, its effect is not reflected back to the invoking thread. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The current application date used by &amp;lt;var&amp;gt;#DATE&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt;&amp;lt;/var&amp;gt; functions in [[FUEL]] is set to the active &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; clock when the &amp;lt;var&amp;gt;$FunLoad&amp;lt;/var&amp;gt; function is used. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template:Sir2000 topic list}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Sir2000 User Language Tools]]&lt;/div&gt;</summary>
		<author><name>JAL</name></author>
	</entry>
</feed>