<?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=Sir2000_User_Language_Tools_%24functions</id>
	<title>Sir2000 User Language Tools $functions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://m204wiki.rocketsoftware.com/index.php?action=history&amp;feed=atom&amp;title=Sir2000_User_Language_Tools_%24functions"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Sir2000_User_Language_Tools_$functions&amp;action=history"/>
	<updated>2026-05-10T18:23:05Z</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=Sir2000_User_Language_Tools_$functions&amp;diff=105104&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Sir2000_User_Language_Tools_$functions&amp;diff=105104&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=Sir2000_User_Language_Tools_$functions&amp;diff=105103&amp;oldid=prev</id>
		<title>JAL: remove detailed function descriptions</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Sir2000_User_Language_Tools_$functions&amp;diff=105103&amp;oldid=prev"/>
		<updated>2018-02-08T21:51:53Z</updated>

		<summary type="html">&lt;p&gt;remove detailed function descriptions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This section lists the $functions that are only available with the Sir2000 User Language Tools, as well as related $functions that are not exclusive to Sir2000 User Language Tools. In addition to a link to each $function&amp;#039;s description page, the listing includes a brief phrase denoting its use.&lt;br /&gt;
&lt;br /&gt;
The $function list is followed by a discussion of datetime error handling.&lt;br /&gt;
&lt;br /&gt;
==Sir2000 UL Tools $functions==&lt;br /&gt;
The following $functions are provided with Sir2000 User Language Tools, some of which are also available to other Model&amp;amp;nbsp;204 products. Those $functions that are available only to the Sir2000 User Language Tools product are indicated as &amp;quot;exclusive.&amp;quot;&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;$Function&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Exclusive to &amp;lt;br&amp;gt;Sir2000 UL Tools?&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[$Sir_Date_Err]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set and query default error handling at request level &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes&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;[[$Sir_DateChg]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Add some days to datetime &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes&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;[[$Sir_DateChk]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Check if datetime matches format &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes&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;[[$Sir_DateCnv]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Convert datetime to different format &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes&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;[[$Sir_DateDif]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Calculate difference between two dates &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Yes&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr class=&amp;quot;head&amp;quot;&amp;gt;&amp;lt;th colspan=&amp;quot;3&amp;quot;&amp;gt;&amp;quot;Sir_Date&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt;&amp;quot; functions&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[$Sir_Date]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Get current datetime &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No&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;[[$Sir_DateFmt]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Validate datetime format &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No&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;[[$Sir_DateN|$Sir_DateN/ND/NM/NS]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Current date and time as integer &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No&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;[[$Sir_Date2N|$Sir_Date2N/ND/NM/NS]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Convert datetime string to integer &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td nowrap&amp;gt;[[$Sir_ND2Date|$Sir_ND2Date/NM2Date/NS2Date/N2Date]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Convert datetime integer to string &amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;No&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Errors in datetime $functions==&lt;br /&gt;
Sir2000 User Language Tools provides you with several ways to detect datetime related errors and control the action taken by the system when these errors occur. &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;On a system-wide or thread-only basis, by using an [[The Sir2000 APPDATE command#Error handling control with DATE_ERR|APPDATE DATE_ERR command]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;On a request level, by using the &amp;lt;var&amp;gt;[[$Sir_Date_Err]]&amp;lt;/var&amp;gt; function &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;In The $Sir_Date&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt; and Sir2000 $function calls, by coding a special argument &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can also control error handling in some standard SOUL date $functions by using &lt;br /&gt;
&amp;lt;code&amp;gt;APPDATE DATE_ERR&amp;lt;/code&amp;gt; or &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you intend to use the $function error handling features of Sir2000 User Language&lt;br /&gt;
Tools, you should also be sure to use the [[The Sir2000 APPDATE command#Setting default error handling with the APPDATE command|DEBUG feature of APPDATE]]. The &amp;lt;var&amp;gt;DEBUG&amp;lt;/var&amp;gt; feature saves line number, procedure, and file information for date-related $functions.&lt;br /&gt;
This information, along with argument values, is then displayed and reported to greatly simplify debugging.&lt;br /&gt;
&lt;br /&gt;
The $Sir_Date&amp;lt;i&amp;gt;xxx&amp;lt;/i&amp;gt; and Sir2000 $functions provide an optional error control argument for some datetime $functions. If you omit the error control argument and an error is detected in the $function, the action taken depends upon the latest invocation of &amp;lt;var&amp;gt;$Sir_Date_Err&amp;lt;/var&amp;gt;, if any, or the switches established by the relevant &amp;lt;var&amp;gt;APPDATE&amp;lt;/var&amp;gt; command with &amp;lt;var&amp;gt;DATE_ERR&amp;lt;/var&amp;gt; clause.&lt;br /&gt;
&lt;br /&gt;
See [[The Sir2000 APPDATE command#Error handling control with DATE ERR|Error handling control with DATE_ERR]] for a complete description of&lt;br /&gt;
the type of errors encountered by date $functions, and for the control and detection approaches available to you with the Sir2000 User Language Tools.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, since the input date doesn&amp;#039;t match the provided format, the following&lt;br /&gt;
fragment prints &amp;lt;code&amp;gt;Error incrementing date&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%NEW_DT = $SIR_DATECHG(&amp;#039;MM/DD/YY&amp;#039;, &amp;#039;96/01/01&amp;#039;, 7,, &amp;#039;IGNORE&amp;#039;)&lt;br /&gt;
IF %NEW_DT EQ &amp;amp;apos;&amp;amp;apos; OR $SUBSTR(%NEW_DT, 1, 1) = &amp;#039;*&amp;#039; THEN&lt;br /&gt;
PRINT &amp;#039;Error incrementing date&amp;#039;&lt;br /&gt;
END IF &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The following fragment causes the request to be cancelled: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%NEW_DT = $SIR_DATECHG(&amp;#039;MM/DD/YY&amp;#039;, &amp;#039;96/01/01&amp;#039;,7,, &amp;#039;CANCEL&amp;#039;) &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The cancellation comes with an error message: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt; I DATERR&lt;br /&gt;
 *** 1 MSIR.0323: Error in $SIR_DATECHG call, no Sirius debug info&lt;br /&gt;
 - Invalid date&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 1 = &amp;#039;MM/DD/YY&amp;#039;&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 2 = &amp;#039;96/01/01&amp;#039;&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 3 = &amp;#039;7&amp;#039;&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 5 = &amp;#039;CANCEL&amp;#039;&lt;br /&gt;
 *** 2 CANCELLING REQUEST: MSIR.0324: Cancelling request because of&lt;br /&gt;
$SIR_DATECHG error &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If the &amp;lt;code&amp;gt;APPDATE DATE_ERR DEBUG&amp;lt;/code&amp;gt; option is in effect, the SOUL procedure&lt;br /&gt;
name and line number will be reported, along with more detail about the error: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt; APPDATE USER DATE_ERR DEBUG&lt;br /&gt;
 I DATERR&lt;br /&gt;
 *** 1 MSIR.0321: Error in $SIR_DATECHG call in line 523, procedure&lt;br /&gt;
DATERR, file PROCFILE - Invalid date&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 1 = &amp;#039;MM/DD/YY&amp;#039;&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 2 = &amp;#039;96/01/01&amp;#039;&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 3 = &amp;#039;7&amp;#039;&lt;br /&gt;
 *** MSIR.0326: $SIR_DATECHG - argument 5 = &amp;#039;CANCEL&amp;#039;&lt;br /&gt;
 *** 2 CANCELLING REQUEST: MSIR.0324: Cancelling request because of&lt;br /&gt;
$SIR_DATECHG error &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Each $function description on this page includes: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The error conditions detected by the $function &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The value returned by the $function in case of an error with &amp;lt;code&amp;gt;IGNORE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;REPORT&amp;lt;/code&amp;gt; specified or defaulted. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Template: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>