<?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=JALWiccan</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=JALWiccan"/>
	<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=Special:Contributions/JALWiccan"/>
	<updated>2026-04-17T13:31:16Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$SinH&amp;diff=116988</id>
		<title>$SinH</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$SinH&amp;diff=116988"/>
		<updated>2018-09-21T00:03:56Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Hyperbolic sine&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $SinH function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$SinH&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the hyperbolic sine of an argument that is given in radians.&lt;br /&gt;
If the magnitude of the argument exceeds 175.366, an error message is&lt;br /&gt;
printed and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $SinH(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sin&amp;diff=116987</id>
		<title>$Sin</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sin&amp;diff=116987"/>
		<updated>2018-09-21T00:03:55Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Sine&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $Sin function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Sin&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the sine of an argument that is given in radians.&lt;br /&gt;
If the magnitude of the argument exceeds 10&amp;lt;sup&amp;gt;15&amp;lt;/sup&amp;gt; radians, an error&lt;br /&gt;
message is printed and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sin(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Pi&amp;diff=116986</id>
		<title>$Pi</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Pi&amp;diff=116986"/>
		<updated>2018-09-21T00:03:55Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Value of pi&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $Pi function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Pi&amp;lt;/var&amp;gt; function returns the value of pi (&amp;lt;code&amp;gt;&amp;amp;pi;&amp;lt;/code&amp;gt;) to 15 significant&lt;br /&gt;
digits (3.14159265358979).&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Pi&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Exp2_or_$Exp_2&amp;diff=116985</id>
		<title>$Exp2 or $Exp 2</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Exp2_or_$Exp_2&amp;diff=116985"/>
		<updated>2018-09-21T00:03:53Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Two&#039;s exponent function&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods.&lt;br /&gt;
The OO equivalent for the&lt;br /&gt;
&amp;lt;var&amp;gt;$Exp2&amp;lt;/var&amp;gt;&lt;br /&gt;
function is the &amp;lt;var&amp;gt;[[Antilog2 (Float function)|Antilog2]]&amp;lt;/var&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Exp2&amp;lt;/var&amp;gt; function (or its alias, &amp;lt;var&amp;gt;$Exp_2&amp;lt;/var&amp;gt;) returns the&lt;br /&gt;
value &amp;lt;code&amp;gt;2&amp;lt;sup&amp;gt;x&amp;lt;/sup&amp;gt;&amp;lt;/code&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Exp2(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Exp_2(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;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;If &#039;&#039;x&#039;&#039; exceeds 251.99, an error message is printed and the request is cancelled.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Exp10_or_$Exp_10&amp;diff=116984</id>
		<title>$Exp10 or $Exp 10</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Exp10_or_$Exp_10&amp;diff=116984"/>
		<updated>2018-09-21T00:03:52Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Ten&#039;s exponent function&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods.&lt;br /&gt;
The OO equivalent for the&lt;br /&gt;
&amp;lt;var&amp;gt;$Exp10&amp;lt;/var&amp;gt;&lt;br /&gt;
function is the &amp;lt;var&amp;gt;[[Antilog10 (Float function)|Antilog10]]&amp;lt;/var&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Exp10&amp;lt;/var&amp;gt; function (or its alias, &amp;lt;var&amp;gt;$Exp_10&amp;lt;/var&amp;gt;) returns the&lt;br /&gt;
value &amp;lt;code&amp;gt;10&amp;lt;sup&amp;gt;x&amp;lt;/sup&amp;gt;&amp;lt;/code&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Exp10(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Exp_10(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;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;If &#039;&#039;x&#039;&#039; exceeds 75.85, an error message is printed and the request is cancelled.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Exp_or_$Exp_e&amp;diff=116983</id>
		<title>$Exp or $Exp e</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Exp_or_$Exp_e&amp;diff=116983"/>
		<updated>2018-09-21T00:03:52Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Exponential function&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods.&lt;br /&gt;
The OO equivalent for the $Exp&lt;br /&gt;
function is the &amp;lt;var&amp;gt;[[AntilogE (Float function)|AntilogE]]&amp;lt;/var&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Exp&amp;lt;/var&amp;gt; function (or its alias, &amp;lt;var&amp;gt;$Exp_e&amp;lt;/var&amp;gt;) returns the&lt;br /&gt;
value &amp;lt;code&amp;gt;e&amp;lt;sup&amp;gt;x&amp;lt;/sup&amp;gt;&amp;lt;/code&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Exp(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Exp_e(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;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;If &#039;&#039;x&#039;&#039; exceeds 174.63, an error message is printed and the request is cancelled.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Erf&amp;diff=116982</id>
		<title>$Erf</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Erf&amp;diff=116982"/>
		<updated>2018-09-21T00:03:51Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Error function&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $Erf function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Erf&amp;lt;/var&amp;gt; function returns the value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;2/&amp;amp;radic;&amp;amp;pi;  &amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&amp;amp;int;&amp;lt;sup&amp;gt;x&amp;lt;/sup&amp;gt; e&amp;lt;sup&amp;gt;-z&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&amp;lt;/sup&amp;gt; dz&lt;br /&gt;
&lt;br /&gt;
&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Erf(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Cotan&amp;diff=116981</id>
		<title>$Cotan</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Cotan&amp;diff=116981"/>
		<updated>2018-09-21T00:03:51Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Cotangent&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $Cotan function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Cotan&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the cotangent of an argument that is given in radians.&lt;br /&gt;
If the&lt;br /&gt;
magnitude of the argument exceeds 10&amp;lt;sup&amp;gt;15&amp;lt;/sup&amp;gt; radians, an error message is&lt;br /&gt;
printed and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Cotan(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$CosH&amp;diff=116980</id>
		<title>$CosH</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$CosH&amp;diff=116980"/>
		<updated>2018-09-21T00:03:50Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Hyperbolic cosine&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $CosH function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$CosH&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the hyperbolic cosine of an argument that is given in radians.&lt;br /&gt;
If the magnitude of the argument exceeds 175.366, an error message is printed&lt;br /&gt;
and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $CosH(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Cos&amp;diff=116979</id>
		<title>$Cos</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Cos&amp;diff=116979"/>
		<updated>2018-09-21T00:03:49Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Cosine&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $Cos function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Cos&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the cosine of an argument that is given in radians.&lt;br /&gt;
If the&lt;br /&gt;
magnitude of the argument exceeds 10&amp;lt;sup&amp;gt;15&amp;lt;/sup&amp;gt; radians, an error message is&lt;br /&gt;
printed and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Cos(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$ArcTan2&amp;diff=116978</id>
		<title>$ArcTan2</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$ArcTan2&amp;diff=116978"/>
		<updated>2018-09-21T00:03:49Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Inverse tangent of ratio of arguments&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $ArcTan2 function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$ArcTan2&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the arctangent (in radians) of the ratio of two arguments&lt;br /&gt;
&amp;amp;mdash; &#039;&#039;x&#039;&#039; divided by &#039;&#039;y&#039;&#039;.&lt;br /&gt;
If the second&lt;br /&gt;
argument is 0 (or omitted), an error message is printed and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $ArcTan2(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;term&amp;gt;y&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$ArcTan&amp;diff=116977</id>
		<title>$ArcTan</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$ArcTan&amp;diff=116977"/>
		<updated>2018-09-21T00:03:48Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Inverse tangent&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $ArcTan function.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$ArcTan&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the arctangent (in radians) of a given argument.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $ArcTan(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$ArcSin&amp;diff=116976</id>
		<title>$ArcSin</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$ArcSin&amp;diff=116976"/>
		<updated>2018-09-21T00:03:48Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Inverse sine&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $ArcSin function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$ArcSin&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the arcsine (in radians) of a given argument.&lt;br /&gt;
If the magnitude of the argument exceeds 1, an error message is printed&lt;br /&gt;
and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $ArcSin(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$ArcCos&amp;diff=116975</id>
		<title>$ArcCos</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$ArcCos&amp;diff=116975"/>
		<updated>2018-09-21T00:03:48Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Inverse cosine&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. There is currently no direct OO equivalent for the $ArcCos function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$ArcCos&amp;lt;/var&amp;gt; function returns&lt;br /&gt;
the arccosine (in radians) of a given argument.&lt;br /&gt;
If the magnitude of the argument exceeds 1, an error message is printed&lt;br /&gt;
and a 0 is returned.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $ArcCos(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Abs&amp;diff=116974</id>
		<title>$Abs</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Abs&amp;diff=116974"/>
		<updated>2018-09-21T00:03:47Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Absolute value&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods.&lt;br /&gt;
The OO equivalent for the $Abs function is the &amp;lt;var&amp;gt;[[Absolute (Float function)|Absolute]]&amp;lt;/var&amp;gt; function.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Abs&amp;lt;/var&amp;gt; function returns the absolute value of its given argument.&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;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Abs(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;x&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$ABS(-50) = 50&lt;br /&gt;
&lt;br /&gt;
$ABS(6) = 6&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Mathematical $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_URL_Encode&amp;diff=116973</id>
		<title>$Sock URL Encode</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_URL_Encode&amp;diff=116973"/>
		<updated>2018-09-21T00:00:38Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_URL_Encode}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Encode into URL &amp;quot;% hex hex&amp;quot; format&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_URL_Encode&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[URLEncode (Socket function)|URLEncode]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_URL_Encode&amp;lt;/var&amp;gt; encodes special characters into the URL &amp;quot;% hex hex&amp;quot;&lt;br /&gt;
format, which has particular use constructing URLs, especially those&lt;br /&gt;
containing query strings for HTTP connections.&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_URL_Encode&amp;lt;/var&amp;gt; is also useful for encoding form post data for HTTP connections.&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;%longStr&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_URL_Encode(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%longStr&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt; to contain the encoding of the input string. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;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 string to be translated. If this string is omitted, a null string is returned. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number, which has associated with it the translation table used for encoding special characters. &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 translation table associated with the socket number is necessary because special characters are converted&lt;br /&gt;
to the hexadecimal representations of their &#039;&#039;&#039;ASCII&#039;&#039;&#039; values, even though the input and output strings are both in EBCDIC.&lt;br /&gt;
So any data that must be encoded as hexadecimal must be translated to ASCII&lt;br /&gt;
first, which means that the appropriate ASCII-to-EBCDIC translation table&lt;br /&gt;
must be indicated to &amp;lt;var&amp;gt;$Sock_URL_Encode&amp;lt;/var&amp;gt; via the socket number.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_URL_Encode&amp;lt;/var&amp;gt; is useful when composing the query string portion of a URL&lt;br /&gt;
(&amp;lt;code&amp;gt;HTTP://host/path?query&amp;lt;/code&amp;gt;), or when composing form data for a post request over HTTP:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;* Use $Sock_URL_Encode to create % hex hex&lt;br /&gt;
&lt;br /&gt;
%r = $Sock_Send(%x, &#039;GET /&#039;)&lt;br /&gt;
%r = $Sock_Send(%x, %URL)&lt;br /&gt;
%r = $Sock_Send(%x, &#039;?info=&#039;)&lt;br /&gt;
%r = $Sock_Send(%x, $Sock_URL_Encode(%info))&lt;br /&gt;
%r = $Sock_SendLn(%x, &#039; HTTP/1.0&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
For example, if &amp;lt;code&amp;gt;%info&amp;lt;/code&amp;gt; contained:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;10 + 3.14 * R*R*R * 2/3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
The following value would be sent to the web server after the &amp;lt;code&amp;gt;info=&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;10+%2B+3.14+*+R*R*R+*+2%2F3&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; is used to stand for a blank, &amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; introduces a hex encoding,&lt;br /&gt;
&amp;lt;code&amp;gt;2B&amp;lt;/code&amp;gt; is the ASCII code for a plus sign (+), and &amp;lt;code&amp;gt;2F&amp;lt;/code&amp;gt; is the ASCII code for a slash (/).&lt;br /&gt;
&lt;br /&gt;
The non-alphanumeric characters that &amp;lt;var&amp;gt;$Sock_URL_Encode&amp;lt;/var&amp;gt; does not encode are:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;. ( ) ! $ * - _&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Tran_Out&amp;diff=116972</id>
		<title>$Sock Tran Out</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Tran_Out&amp;diff=116972"/>
		<updated>2018-09-21T00:00:38Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Tran_Out}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Translate string to remote&#039;s character set&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Tran_Out&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[TranOut (Socket function)|TranOut]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Tran_Out&amp;lt;/var&amp;gt; translates a string,&lt;br /&gt;
from the local internal character set (&amp;quot;EBCDIC&amp;quot;),&lt;br /&gt;
to the character set of the remote.&lt;br /&gt;
It is a bit different from other $Sock functions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The socket number is the second argument, not the first.&lt;br /&gt;
&amp;lt;li&amp;gt;Although it references a socket number, and it can cause a jump to&lt;br /&gt;
the &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label or request cancellation and can set the last error information,&lt;br /&gt;
it does not return any error indication.&lt;br /&gt;
&amp;lt;/ul&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;%string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_Tran_Out(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;, &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;syntaxTable&amp;quot;&amp;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;A string that is to contain the translation of the input string into the local character set. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;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 string to be translated. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number, which has associated with it the translation table used by &amp;lt;var&amp;gt;$Sock_Tran_Out&amp;lt;/var&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;&amp;lt;var&amp;gt;$Sock_Tran_Out&amp;lt;/var&amp;gt; continues with the next statement if&lt;br /&gt;
&amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CANCELC&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;LABELC&amp;lt;/var&amp;gt; is in effect for the socket.&lt;br /&gt;
It always returns the translated string, it never returns an&lt;br /&gt;
error indicator.&lt;br /&gt;
&amp;lt;li&amp;gt;Typically, &amp;lt;var&amp;gt;$Sock_Tran_Out&amp;lt;/var&amp;gt; is used to translate into ASCII strings from mainframe sources.&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;In the following example, database fields are translated and sent to the remote:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%old = $Sock_Set(%socket, &#039;BINARY&#039;)&lt;br /&gt;
For Each record&lt;br /&gt;
   %xlate = $Sock_Tran_Out(DATA_FIELD, %socket)&lt;br /&gt;
   %rc    = $Sock_SendLn(%socket, %xlate)&lt;br /&gt;
End For&lt;br /&gt;
%old = $Sock_Set(%socket, &#039;BINARY&#039;, %old)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_Tran_Out&amp;lt;/var&amp;gt; can be useful if you wish to use a &amp;quot;normal&amp;quot; character&lt;br /&gt;
in either the &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; or&lt;br /&gt;
&amp;lt;var&amp;gt;PRSTOK&amp;lt;/var&amp;gt; parameter, since you must specify it in the character set used to&lt;br /&gt;
communicate with the remote.&lt;br /&gt;
For example, the following sets &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; to a pair of plus sign (&amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt;) characters:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Begin&lt;br /&gt;
   %socket = $Sock_Conn(&#039;SOCKEM&#039;)&lt;br /&gt;
   %s = $Sock_Tran_Out(&#039;++&#039;, %socket)&lt;br /&gt;
   %t = %SOCK_SET(%socket, &#039;LINEND&#039;, %s)&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The translate table used is the output table&lt;br /&gt;
defined by the XTAB parameter of the socket.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Tran_In&amp;diff=116971</id>
		<title>$Sock Tran In</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Tran_In&amp;diff=116971"/>
		<updated>2018-09-21T00:00:37Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Tran_In}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Translate string from remote&#039;s character set&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Tran_In&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[TranIn (Socket function)|TranIn]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Tran_In&amp;lt;/var&amp;gt; translates a string,&lt;br /&gt;
from the character set of the remote, to the local internal character set (EBCDIC).&lt;br /&gt;
It is a bit different from other $Sock functions:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The socket number is the second argument, not the first.&lt;br /&gt;
&amp;lt;li&amp;gt;Although it references a socket number, and it can cause a jump to&lt;br /&gt;
the &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label or request cancellation and can set the last error information,&lt;br /&gt;
it does not return any error indication.&lt;br /&gt;
&amp;lt;/ul&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;%string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_Tran_In(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;, &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;syntaxTable&amp;quot;&amp;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;A string that is to contain the translation of the input string into the local character set. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;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 string to be translated. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number, which has associated with it the translation table used by &amp;lt;var&amp;gt;$Sock_Tran_In&amp;lt;/var&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;&amp;lt;var&amp;gt;$Sock_Tran_In&amp;lt;/var&amp;gt; continues with the next statement if&lt;br /&gt;
&amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CANCELC&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;LABELC&amp;lt;/var&amp;gt; is in effect for the socket.&lt;br /&gt;
It always returns the translated string; it never returns an error indicator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Typically the &amp;lt;var&amp;gt;$Sock_Tran_In&amp;lt;/var&amp;gt; function is used to translate into EBCDIC&lt;br /&gt;
strings that are received from non-mainframe sources that use other&lt;br /&gt;
character mapping schemes, like ASCII or non-English character sets.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
==Example==&lt;br /&gt;
In the following example, parsed lines are received into the &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt; variable,&lt;br /&gt;
then translated, and printed in EBCDIC.&lt;br /&gt;
The translate table used is the input table&lt;br /&gt;
defined by the &amp;lt;var&amp;gt;[[XTAB (JANUS DEFINE parameter)|XTAB]]&amp;lt;/var&amp;gt; parameter of the socket.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%old = $Sock_Set(%socket, &#039;BINARY&#039;)&lt;br /&gt;
Repeat&lt;br /&gt;
   %len   = $Sock_RecvPrs(%socket, %s)&lt;br /&gt;
   If %len Le 0 Then&lt;br /&gt;
      Loop End&lt;br /&gt;
   End If&lt;br /&gt;
   %xlate = $Sock_Tran_In(%s, %socket)&lt;br /&gt;
   Print %xlate&lt;br /&gt;
End Repeat&lt;br /&gt;
%old = $Sock_Set(%socket, &#039;BINARY&#039;, %old)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_SSL_On&amp;diff=116970</id>
		<title>$Sock SSL On</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_SSL_On&amp;diff=116970"/>
		<updated>2018-09-21T00:00:37Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_SSL_On}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Switch to SSL processing&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[SSLOn (Socket function)|SSLOn]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_SSL&amp;lt;/var&amp;gt; turns on SSL processing, that is, starts an SSL handshake as a client on a connection.&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_SSL_On(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%rc&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A numeric return code: 0 if successful, otherwise a negative value, as described [[#$Sock_SSL_On return codes|below]]. &amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number, or it is -1, which indicates that the change affects all relevant sockets. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===$Sock_SSL_On return codes=== &lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt; return codes are: &lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Successfully switched to SSL. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;-110&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Attempted on non-SSL port. &amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt; can only be attempted on a port with &amp;lt;var&amp;gt;SSL&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;SSLOPT&amp;lt;/var&amp;gt; on the &amp;lt;var&amp;gt;[[JANUS DEFINE]]&amp;lt;/var&amp;gt; command. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;-111&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;SSL handshake error. Likely result of trying to use &amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt; against a non-SSL port. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;-112&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Have pending incoming data. &amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt; is invalid until all incoming (presumably) non-SSL data has been received. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;-149&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Other error during connection. &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;
This function makes it possible to make an initial connection from a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; client application to a proxy server, use the CONNECT method to connect to a server through the proxy, and then communicate via SSL with the back end server, simply having the proxy server act as a &amp;quot;tunnel&amp;quot; for the SSL data.&lt;br /&gt;
Basically, &amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt; should be used after a positive response has been received for a CONNECT method request on a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; client socket. &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
The following code illustrates the use of &amp;lt;var&amp;gt;$Sock_SSL_On&amp;lt;/var&amp;gt;: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%x = $Sock_Conn(&#039;WEBDROPS&#039;, &#039;proxy&#039;)&lt;br /&gt;
%r = $Sock_Set(%x, &#039;LINEND&#039;, &#039;0D0A&#039;) &lt;br /&gt;
%r = $Sock_Set(%x, &#039;PRSTOK&#039;, &#039;0D0A&#039;)&lt;br /&gt;
%r = $Sock_Send(%x, &#039;CONNECT &#039;) &lt;br /&gt;
%r = $Sock_Send(%x, &#039;sirius-software.com:443&#039;) &lt;br /&gt;
%r = $Sock_SendLn(%x, &#039; HTTP/1.0&#039;) &lt;br /&gt;
%r = $Sock_SendLn(%x, &#039;&#039;)&lt;br /&gt;
%r = $Sock_RecvPrs(%x, %s)&lt;br /&gt;
 If $WORD(%s, , 2) Ne &#039;200&#039; Then&lt;br /&gt;
    Call CONNECT_ERROR &lt;br /&gt;
 End If&lt;br /&gt;
Repeat Forever&lt;br /&gt;
    %r = $Sock_RecvPrs(%x, %s)&lt;br /&gt;
    If $lstr_len(%s) Eq 0 Then&lt;br /&gt;
       Loop End&lt;br /&gt;
    End If&lt;br /&gt;
  End Repeat&lt;br /&gt;
%r = $Sock_SSL_On(%x)&lt;br /&gt;
 If %r Then&lt;br /&gt;
    Call SSL_ERROR&lt;br /&gt;
 End If&lt;br /&gt;
%r = $Sock_Send(%x, &#039;GET &#039;) &lt;br /&gt;
%r = $Sock_Send(%x, %URL) &lt;br /&gt;
%r = $Sock_SendLn(%x, &#039; HTTP/1.0&#039;) &lt;br /&gt;
%r = $Sock_SendLn(%x, &#039;&#039;)&lt;br /&gt;
  ... &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information about HTTP tunneling and the CONNECT method, see &amp;lt;code&amp;gt;http://www.ietf.org/rfc/rfc2817.txt&amp;lt;/code&amp;gt;. Many other references are also available on the web.&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Set&amp;diff=116969</id>
		<title>$Sock Set</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Set&amp;diff=116969"/>
		<updated>2018-09-21T00:00:36Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Set}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Change parameter or setting on one or all sockets&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Set (Socket function)|Set]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; changes the value of a parameter or setting on one or all relevant sockets.&lt;br /&gt;
&lt;br /&gt;
It is also a [[Notation conventions for methods#Callable functions|callable]] function.&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%old&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_Set(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;keyword&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;value&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;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%old&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string containing either a previous value of parameter or setting, or, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; argument is -1, count of sockets changed. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number; or it is -1, which indicates that the change affects all relevant sockets. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;keyword&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Any of the keywords from the parameter and settings list provided [[#Eligible keyword and value settings for $Sock_Set|below]]. Some of these keywords require that the socket be &amp;lt;var&amp;gt;[[Janus Sockets User Language coding considerations#Socket states: OPEN, RESET, FIN indicator|OPEN]]&amp;lt;/var&amp;gt; for the setting to take effect; for these, if the socket is not &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt;, the operation is ignored.  &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;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;The value to which the parameter or setting should be changed. If the keyword is self-defining, this argument may be omitted or left null. Valid values are explained in the keyword list provided [[#Eligible keyword and value settings for $Sock_Set|below]]. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Eligible keyword and value settings for $Sock_Set===                              &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;i&amp;gt;Keyword&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt;                                                            &lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;i&amp;gt;Meaning&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;                                                          &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;BINARY&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Do not translate bytes sent and received.                                   &lt;br /&gt;
&amp;lt;p&amp;gt;                                                                                &lt;br /&gt;
The default is taken from the socket&#039;s port definition. For more information about this setting, see [[BINARY (JANUS DEFINE parameter)]]. &amp;lt;/p&amp;gt;                                                                  &lt;br /&gt;
&amp;lt;p&amp;gt;                                                                                &lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;[[Janus Sockets User Language coding considerations#Socket states: OPEN, RESET, FIN indicator|OPEN]]&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;tr&amp;gt;&amp;lt;th&amp;gt;CHAR&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Translate strings sent and received with $Sock_ functions between the internal representation within &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; (EBCDIC) and the character representation used by the remote end of the connection. &lt;br /&gt;
                                                                                &lt;br /&gt;
The default is taken from the socket&#039;s port definition. For more information about this setting, see [[CHAR (JANUS DEFINE parameter)]]. &lt;br /&gt;
&lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;OPEN&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;CLOSE&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Close socket at end of request; this is the default for &amp;lt;var&amp;gt;[[JANUS DEFINE#type|CLSOCK]]&amp;lt;/var&amp;gt; sockets. &lt;br /&gt;
&lt;br /&gt;
This applies to any in-use socket. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;NOCLOSE&amp;lt;/th&amp;gt;             &lt;br /&gt;
&amp;lt;td&amp;gt;Close socket at &amp;lt;var&amp;gt;LOGOUT&amp;lt;/var&amp;gt;, not at end of request. This is the default for &amp;lt;var&amp;gt;[[JANUS DEFINE#type|SRVSOCK]]&amp;lt;/var&amp;gt; sockets. &lt;br /&gt;
&lt;br /&gt;
This applies to any in-use socket.  &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;LINEND&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This parameter must have a value specified as &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;hexchars&amp;gt;&amp;lt;/code&amp;gt; as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt; argument. &lt;br /&gt;
&amp;lt;var&amp;gt;NONE&amp;lt;/var&amp;gt; indicates that a linend string is not set, and one must be provided before or with the next &amp;lt;var&amp;gt;[[$Sock_SendLn]]&amp;lt;/var&amp;gt; call. &lt;br /&gt;
Follow each &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt; call with the indicated string of bytes; no translation is done on these hex bytes, whether &amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt; is set. The special value &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; disables any previously defined &lt;br /&gt;
&amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string.&lt;br /&gt;
&lt;br /&gt;
The default is taken from the socket&#039;s port definition. For more information about this setting, see [[LINEND (JANUS DEFINE parameter)]].&lt;br /&gt;
&lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;OPEN&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;ONRESET&amp;lt;/th&amp;gt;                                                            &lt;br /&gt;
&amp;lt;td&amp;gt;This setting must have one of the following values specified as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt; argument:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CANCEL&amp;lt;/var&amp;gt;, to indicate that socket reset conditions are handled by cancelling the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; request. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CANCELC&amp;lt;/var&amp;gt;, to indicate that socket reset conditions are handled depending &lt;br /&gt;
on whether the given operation can complete. &lt;br /&gt;
Those which cannot complete are handled by cancelling the &amp;lt;var                  &lt;br /&gt;
class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; request. &lt;br /&gt;
For those that can complete, the request continues as usual to the next statement, &lt;br /&gt;
and an error indicator is returned by the $function encountering the condition. &lt;br /&gt;
The last error indication can also be retrieved using the &amp;lt;var&amp;gt;[[$Sock_ErrInfo]]&amp;lt;/var&amp;gt; function. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;CONTINUE&amp;lt;/var&amp;gt;, to indicate that when a socket reset condition is found, the request continues as usual to the next statement, and an error indicator is returned by the $function encountering the condition. The last error indication can also be retrieved using the &amp;lt;var&amp;gt;$Sock_ErrInfo&amp;lt;/var&amp;gt; function.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;LABEL&amp;lt;/var&amp;gt;, to indicate that all socket reset conditions are handled by the label established by the most recent &amp;lt;var&amp;gt;[[$Sock_OnReset]]&amp;lt;/var&amp;gt; call, or that the request is cancelled if there is no &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;LABELC&amp;lt;/var&amp;gt;, to indicate that socket reset conditions are handled depending on whether the given operation can complete. &lt;br /&gt;
Those which cannot complete are handled by the label established by the most recent &amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; call, or that the&lt;br /&gt;
request is cancelled if there is no &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label. For those that can complete, the request continues as usual to the next statement, and an error indicator is returned by the $function encountering the condition. &lt;br /&gt;
The last error indication can also be retrieved using the &amp;lt;var&amp;gt;[[$Sock_ErrInfo]]&amp;lt;/var&amp;gt; function. &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The default is &amp;lt;var&amp;gt;LABEL&amp;lt;/var&amp;gt;. See [[Janus Sockets User Language coding considerations#Handling connection errors and RESET sockets|&amp;quot;Handling connection errors and RESET sockets&amp;quot;]]. &lt;br /&gt;
&lt;br /&gt;
This applies to any in-use socket.   &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;PRSTOK&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This parameter must have a value specified as either &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;[AMBIG|]&amp;lt;hexchars&amp;gt;[|&amp;lt;hexchars&amp;gt;]...&amp;lt;/code&amp;gt; as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt; argument. &amp;lt;var&amp;gt;NONE&amp;lt;/var&amp;gt; indicates that a separator string is not set, and one must be provided before or with the next &amp;lt;var&amp;gt;[[$Sock_RecvPrs]]&amp;lt;/var&amp;gt; call.&lt;br /&gt;
The specified set of hexadecimal strings are used as &amp;quot;break&amp;quot; strings for returning subsequent strings with the &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; function. If and only if one string is a prefix of another, &amp;lt;code&amp;gt;AMBIG|&amp;lt;/code&amp;gt; must be used at the start. &lt;br /&gt;
&lt;br /&gt;
The default is taken from the socket&#039;s port definition. For more information about this setting, see [[PRSTOK (JANUS DEFINE parameter)]].&lt;br /&gt;
&lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;OPEN&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;RECVLIM&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A number ranging from 0 to 2,147,483,647, specifying the limit on total bytes of data plus &amp;quot;parse tokens&amp;quot; scanned by subsequent receive operations. The default is 0, indicating no limit. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; is discussed in [[$Sock_Recv#Lengths: maximum, minimum, truncation, RECVLIM|&amp;quot;Lengths: maximum,  &lt;br /&gt;
minimum, truncation, RECVLIM&amp;quot;]] and [[$Sock_RecvPrs#Lengths: maximum, minimum, truncation, RECVLIM|&amp;quot;Lengths: maximum, truncation, RECVLIM&amp;quot;]]. &lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;OPEN&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;TIMEOUT&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Number indicating the port &amp;lt;var&amp;gt;[[TIMEOUT (JANUS DEFINE parameter)|TIMEOUT]]&amp;lt;/var&amp;gt; time, in seconds. &lt;br /&gt;
&lt;br /&gt;
The default is taken from the socket&#039;s port definition.&lt;br /&gt;
&lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;OPEN&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;XTAB&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The EBCDIC-to-ASCII, ASCII-to-EBCDIC, and character-entity translation tables to be used for the socket. &lt;br /&gt;
&lt;br /&gt;
The default is taken from the socket&#039;s port definition For more information about this setting, see [[XTAB (JANUS DEFINE parameter)]]. &lt;br /&gt;
&lt;br /&gt;
This requires that the socket be &amp;lt;var&amp;gt;OPEN&amp;lt;/var&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;If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; argument is -1, indicating that all relevant sockets are affected by the &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; call, the return string will be the number of sockets affected by the change.&lt;br /&gt;
If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; is the number of an in-use socket, the returned string contains the previous value of the parameter or setting or the string &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; if the socket must be &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; and it is not.&lt;br /&gt;
If &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; is invoked with a single socket (that is, not -1) as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; argument, and that socket is &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;, the results depend on several factors: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;keyword&amp;lt;/var&amp;gt; argument is &amp;lt;code&amp;gt;ONRESET&amp;lt;/code&amp;gt;, the operation is performed normally, and there is no indication of the fact that the socket is &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;. &lt;br /&gt;
&amp;lt;li&amp;gt;Otherwise, if the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;keyword&amp;lt;/var&amp;gt; argument is a keyword that does not require an &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; socket, and &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CANCELC&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;LABELC&amp;lt;/var&amp;gt; is in effect for the socket, the string &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; is returned and the last error information is set. &lt;br /&gt;
&amp;lt;li&amp;gt;Otherwise, if &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt; is in effect for the socket, the string &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; is returned and the last error information is set. &amp;lt;li&amp;gt;Otherwise the request is canceled or the &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label is jumped to, as explained in [[Janus Sockets User Language coding considerations#Handling connection errors and RESET sockets|&amp;quot;Handling connection errors and RESET sockets&amp;quot;]]. &lt;br /&gt;
&amp;lt;/ul&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;value&amp;lt;/var&amp;gt; argument can be omitted for keywords that are self-defining: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%t = $Sock_Set(%sockno, &#039;BINARY&#039;) &amp;lt;/p&amp;gt; &lt;br /&gt;
This sets the socket to binary mode, in which bytes sent over the connection are not translated in any way. &amp;quot;Self-defining&amp;quot; keywords can also be given a &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt; argument, which allows you to restore a previous value: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Foo: Subroutine &lt;br /&gt;
%t = $Sock_Set(%sockno, &#039;BINARY&#039;) &lt;br /&gt;
 ... &lt;br /&gt;
%t = $Sock_Set(%sockno, &#039;BINARY&#039;, %t) &lt;br /&gt;
Return &amp;lt;/p&amp;gt;&lt;br /&gt;
The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt; argument is required for keywords that need a value: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%t = $Sock_Set(%sockno, &#039;LINEND&#039;, &#039;NONE&#039;) &amp;lt;/p&amp;gt; &lt;br /&gt;
This disables the sending of the line-end string. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;You can use &amp;lt;var&amp;gt;[[$Sock_Info]]&amp;lt;/var&amp;gt; to obtain the current value of the setting of any of the keywords that can be specified as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;keyword&amp;lt;/var&amp;gt; argument of &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_SendLn&amp;diff=116968</id>
		<title>$Sock SendLn</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_SendLn&amp;diff=116968"/>
		<updated>2018-09-21T00:00:36Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_SendLn}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Send string followed by LINEND&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[SendWithLineEnd (Socket function)|SendWithLineEnd]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt; sends an argument string and the untranslated &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string&lt;br /&gt;
over a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
It is also a [[Notation conventions for methods#Callable functions|callable]] function.&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_SendLn(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;, &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;opts&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;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%rc&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A numeric error code (described further [[#$Sock_Send return codes|below]]), or if the operation could not be performed as requested, a 0 value. For more details, see [[#$Sock_RecvPrs return values|&amp;quot;$Sock_RecvPrs return values&amp;quot;]]. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;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 string to send. &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; limits this to a length of 255 bytes. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;opts&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument is an option string, which can contain any of the following: &lt;br /&gt;
&amp;lt;table class=&amp;quot;syntaxTable&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;[[BINARY (JANUS DEFINE parameter)|BINARY]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[CHAR (JANUS DEFINE parameter)|CHAR]]&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is not translated&#039;&#039;&#039; when sent. The argument can be the result of a previous translation using &amp;lt;var&amp;gt;[[$Sock_Tran_Out]]&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&amp;gt;CHAR&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is translated&#039;&#039;&#039; when sent. The translation is specified by the output table defined by the socket&#039;s &amp;lt;var&amp;gt;[[XTAB (JANUS DEFINE parameter)|XTAB]]&amp;lt;/var&amp;gt; parameter. &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;FIN&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Indicates that after the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; argument and the &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string are sent, no more data will be sent on the socket. This transmits the &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; indication to the remote partner. See [[Janus Sockets User Language coding considerations#Socket states: OPEN, RESET, FIN indicator|&amp;quot;Socket states: OPEN, RESET, FIN indicator&amp;quot;]] for a discussion of the &amp;lt;var&amp;gt;FIN&amp;lt;/var&amp;gt; indicator. &lt;br /&gt;
&amp;lt;p&amp;gt; Note that when &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; is sent, print capturing is automatically turned &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; for the socket.  &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;PUSH&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ensures that the data being sent on the socket is immediately sent to the receiver. Normally, data to be sent is buffered and may not be sent immediately. &lt;br /&gt;
&amp;lt;p&amp;gt; Using &amp;lt;var&amp;gt;PUSH&amp;lt;/var&amp;gt; is &#039;&#039;&#039;not&#039;&#039;&#039; necessary if: &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;You are specifying &amp;lt;var&amp;gt;FIN&amp;lt;/var&amp;gt;, since a push operation is implied by &amp;lt;var&amp;gt;FIN&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;li&amp;gt;You are alternating sends and receives on a socket, since receive-processing functions (&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;) always do a push before receiving. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th nowrap&amp;gt;&amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; &amp;lt;i&amp;gt;hexstr&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The string whose hexadecimal representation is &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;hexstr&amp;lt;/var&amp;gt; is used rather than the current &amp;lt;var&amp;gt;[[LINEND (JANUS DEFINE parameter)|LINEND]]&amp;lt;/var&amp;gt; parameter of the socket. &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;&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;Whether it is set on the port definition, via &amp;lt;var&amp;gt;[[$Sock_Set]]&amp;lt;/var&amp;gt;, or as an argument on the &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt; function, &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; must not be &amp;lt;var&amp;gt;NONE&amp;lt;/var&amp;gt; when using &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;li&amp;gt;These are the &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt; return codes: &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;0, if the function completes successfully. &lt;br /&gt;
&amp;lt;li&amp;gt;-1, if the socket is not open and &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt; is in effect for the socket. &lt;br /&gt;
&amp;lt;/ul&amp;gt; &amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
The following example uses a combination of &amp;lt;var&amp;gt;$Sock_Send&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%domain = &#039;www.sirius-software.com&#039; &lt;br /&gt;
%page   = &#039;main.html&#039; &lt;br /&gt;
%socket = $Sock_Conn(&#039;TEST&#039;, %domain) &lt;br /&gt;
%s      = $Sock_Set(%socket, &#039;LINEND&#039;, &#039;0D0A&#039;) &lt;br /&gt;
%rc     = $Sock_Send(%socket, &#039;GET /&#039;) &lt;br /&gt;
%rc     = $Sock_Send(%socket, %page) &lt;br /&gt;
%rc     = $Sock_SendLn(%socket, &#039; HTTP/1.0&#039;) &lt;br /&gt;
%rc     = $Sock_SendLn(%socket, &#039;&#039;) &lt;br /&gt;
&amp;lt;/p&amp;gt; &lt;br /&gt;
In this example, &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; is used to specify a line-end string of hexadecimal &#039;0D0A&#039;. Then, a few lines are sent for which the protocol does not require line-end delimiters: the &amp;lt;code&amp;gt;GET /&amp;lt;/code&amp;gt; and the name of the HTML page defined in &amp;lt;code&amp;gt;%page&amp;lt;/code&amp;gt;. Then the HTTP specification is sent with a line-delimiter via the &amp;lt;var&amp;gt;$Sock_SendLn&amp;lt;/var&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
This example highlights the fact that the programmer needs to know the requirements of the communication protocol they are using before they know the appropriate function to use in sending strings to the socket.&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Send&amp;diff=116967</id>
		<title>$Sock Send</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Send&amp;diff=116967"/>
		<updated>2018-09-21T00:00:35Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Send}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Send string&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Send&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Send (Socket function)|Send]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Send&amp;lt;/var&amp;gt; sends a string over a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection.&lt;br /&gt;
&lt;br /&gt;
It is also a [[Notation conventions for methods#Callable functions|callable]] function.&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; $Sock_Send(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;, &amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;opts&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;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%rc&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A numeric value that is a numeric error code (described further [[#$Sock_Send return codes|below]]), or if the operation could not be performed as requested, a 0 value. For more details, see [[#$Sock_RecvPrs return values|&amp;quot;$Sock_RecvPrs return values&amp;quot;]]. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;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 string to send. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;opts&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument is an option string, which can contain any of the following: &lt;br /&gt;
&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&amp;gt;BINARY&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;[[BINARY (JANUS DEFINE parameter)|BINARY]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[CHAR (JANUS DEFINE parameter)|CHAR]]&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is not translated&#039;&#039;&#039; when sent. The argument can be the result of a previous translation using &amp;lt;var&amp;gt;[[$Sock_Tran_Out]]&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&amp;gt;CHAR&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is translated&#039;&#039;&#039; when sent. The translation is specified by the output table defined in the socket&#039;s &amp;lt;var&amp;gt;[[XTAB (JANUS DEFINE parameter)|XTAB]]&amp;lt;/var&amp;gt; parameter. &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;FIN&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Indicates that after the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; argument is sent, no more data will be sent on the socket. This transmits the &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; indication to the remote partner.&lt;br /&gt;
Note that when &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; is sent, print capturing is automatically turned &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; for the socket. &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;PUSH&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Ensures that the data being sent on the socket is immediately sent to the receiver. Normally, data to be sent is buffered and may not be sent immediately. &lt;br /&gt;
&amp;lt;p&amp;gt; Using &amp;lt;var&amp;gt;PUSH&amp;lt;/var&amp;gt; is &#039;&#039;&#039;not&#039;&#039;&#039; necessary if: &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;You are specifying &amp;lt;var&amp;gt;FIN&amp;lt;/var&amp;gt;, since a push operation is implied by &amp;lt;var&amp;gt;FIN&amp;lt;/var&amp;gt;. &lt;br /&gt;
&amp;lt;li&amp;gt;You are alternating sends and receives on a socket, since receive-processing functions (&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;) always do a push before receiving. &lt;br /&gt;
&amp;lt;/ul&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;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===$Sock_Send return codes===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;0, if the function completes successfully.&lt;br /&gt;
&amp;lt;li&amp;gt;-1, if the socket is not open and ONRESET CONTINUE is in effect for the socket.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need to send line-end delimited information, use &amp;lt;var&amp;gt;[[$Sock_SendLn]]&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_RecvPrs&amp;diff=116966</id>
		<title>$Sock RecvPrs</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_RecvPrs&amp;diff=116966"/>
		<updated>2018-09-21T00:00:35Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_RecvPrs}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Receive parsed string&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[ReceiveAndParse (Socket function)|ReceiveAndParse]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; receives, over a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection, a string whose length&lt;br /&gt;
is not known beforehand but which is terminated by a known string or by&lt;br /&gt;
one of a known set of strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; is also [[Notation conventions for methods#Callable functions|callable]].&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_RecvPrs(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%recv_targ&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&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;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;prsindx&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;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;opts&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;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%num&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A numeric value that is the number of bytes received, or, if the operation could not be performed as requested, a 0 value. For more details, see [[#$Sock_RecvPrs return values|$Sock_RecvPrs return values]].  &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;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number. &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;%recv_targ&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A %variable or an &amp;lt;var&amp;gt;IMAGE&amp;lt;/var&amp;gt; item (and &#039;&#039;&#039;never&#039;&#039;&#039; a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; class variable). This argument is the target of the receive operation, and is referred to as the &amp;quot;receive target.&amp;quot; You may request that some bytes from the socket stream can be discarded, so the length of the string stored in this target may be less than the value returned by &amp;lt;var&amp;gt;$Sock_RecvPrs&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;maxrecvp&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument, the maximum number of bytes of data to receive, &#039;&#039;&#039;less&#039;&#039;&#039; the &#039;&#039;&#039;length of the separator&#039;&#039;&#039; string, must be from 0 to 2,147,483,647, or must be the special value -1, which indicates there is no limit to the number of bytes received.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default is 0, which means limit the received data (less separator) to to the declared length of the receive target.&lt;br /&gt;
If this argument is 0 and the receive argument is a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;, the received data is limited to 2,147,483,647 bytes. &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;prsindx&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument is is a %variable or &amp;lt;var&amp;gt;IMAGE&amp;lt;/var&amp;gt; item in which the index number (&amp;gt; 0) of the parse token found is stored. This variable is set to 0 if no token is found &#039;&#039;&#039;within&#039;&#039;&#039; &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; bytes or if it is not found &#039;&#039;&#039;after&#039;&#039;&#039; more than the number of data bytes specified by the effective value of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&amp;lt;/var&amp;gt; argument. &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;opts&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument is an option string which can contain any of the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;thJustBold&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;BINARY &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;[[BINARY (JANUS DEFINE parameter)|BINARY]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[CHAR (JANUS DEFINE parameter)|CHAR]]&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is not translated&#039;&#039;&#039; when saved in the receive target. The received string can be translated later in the program using the &amp;lt;var&amp;gt;[[$Sock_Tran_In]]&amp;lt;/var&amp;gt; function. &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;CHAR &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;[[BINARY (JANUS DEFINE parameter)|BINARY]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[CHAR (JANUS DEFINE parameter)|CHAR]]&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is translated&#039;&#039;&#039; when saved in the receive target. The translation is specified by the input table defined by the socket&#039;s &amp;lt;var&amp;gt;[[XTAB (JANUS DEFINE parameter)|XTAB]]&amp;lt;/var&amp;gt; parameter. &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;PRSTOK [AMBIG&amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;]&amp;lt;i&amp;gt;hexstr&amp;lt;/i&amp;gt;[&amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;&amp;lt;i&amp;gt;hexstr&amp;lt;/i&amp;gt;]...   &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This is a set of parse tokens which override the parse tokens set on the socket.&lt;br /&gt;
Whether it is set on the port definition, via &amp;lt;var&amp;gt;[[$Sock_Set]]&amp;lt;/var&amp;gt;, or as an argument on the &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; function, &amp;lt;var&amp;gt;PRSTOK&amp;lt;/var&amp;gt; must not be &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; when using &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===$Sock_RecvPrs return values=== &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; returns the value -1 if the socket is not open and &amp;lt;code&amp;gt;ONRESET CONTINUE&amp;lt;/code&amp;gt; is in effect for the socket. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; returns a number greater than 0 which is the number of bytes received from of the socket stream. [[#Lengths: maximum, truncation, RECVLIM|Lengths: maximum, truncation, RECVLIM]] explains how the term &#039;&#039;&#039;number of bytes received&#039;&#039;&#039; is used, and discusses the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&amp;lt;/var&amp;gt; argument and other values affecting the received string. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; returns zero to indicate there is no data remaining to be received on the connection, that is, if &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; has been received or the &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; has been reached. &lt;br /&gt;
&amp;lt;/ul&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;You use &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; for a data item whose length is unknown beforehand, but rather is terminated by a known string (or one of a known set of strings). In general, you use the alternate receive operation, &amp;lt;var&amp;gt;[[$Sock_Recv]]&amp;lt;/var&amp;gt;, when the protocol in use establishes the length of a data item before it appears in the socket stream. &lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;prsindx&amp;lt;/var&amp;gt; argument is used in case there is more than one alternative in the &amp;lt;var&amp;gt;PRSTOK&amp;lt;/var&amp;gt; setting, and you need to distinguish which one of them terminated the received value. For example, with the input stream of &amp;lt;code&amp;gt;X&#039;36370D38390D&#039;&amp;lt;/code&amp;gt;, the following expression will store the value 2 in the variable &amp;lt;code&amp;gt;%prs&amp;lt;/code&amp;gt;. &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;$Sock_RecvPrs(%sk, %str, , %prs, &#039;PRSTOK AMBIG|0D0A|0D|0A&#039;) &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this example uses ambiguous &amp;lt;var&amp;gt;PRSTOK&amp;lt;/var&amp;gt; strings (&amp;lt;code&amp;gt;0D&amp;lt;/code&amp;gt; is a prefix of &amp;lt;code&amp;gt;0D0A&amp;lt;/code&amp;gt;). Considerations for this are discussed in [[Sample Janus Sockets programs#Ambiguous PRSTOK strings|Ambiguous PRSTOK strings]].&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The &amp;lt;var&amp;gt;PRSTOK&amp;lt;/var&amp;gt; separators are chosen to match the protocol and data streams that are used with your application. One of the considerations, of course, is that a separator should not occur in the &amp;quot;normal&amp;quot; data received by your application. If that is unavoidable, you will need to use an &amp;quot;escaping&amp;quot; mechanism; for example, you could use the ASCII &amp;lt;code&amp;gt;ESC&amp;lt;/code&amp;gt; character (hexadecimal &amp;lt;code&amp;gt;1B&amp;lt;/code&amp;gt;) to indicate that it precedes a character that is to be taken literally. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, if the data contains non-separator instances of &amp;lt;code&amp;gt;CR&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ESC&amp;lt;/code&amp;gt;: &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%junk String Len 1 &lt;br /&gt;
%r = $Sock_Set(%sok, &#039;PRSTOK&#039;, &#039;0D|1B&#039;) &lt;br /&gt;
Repeat    &lt;br /&gt;
   %r = $Sock_RecvPrs(%sok, %targ, %sep)    &lt;br /&gt;
      If %sep Eq 2 Then       &lt;br /&gt;
         %r = $Sock_Recv(%sok, %junk)       &lt;br /&gt;
         %targ = %targ With %junk    &lt;br /&gt;
      End If  &lt;br /&gt;
  ... &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples== &lt;br /&gt;
The following example shows part of a program that communicates with a remote web server and which parses and prints the &lt;br /&gt;
returned HTML stream. Note that the third argument to &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; is -1, which means that there is no limit to the length of each line parsed, hence no limit to the number of bytes discarded at the end of the line; only the first 78 bytes (the size of &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;) of each line of HTML is examined by the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; program.&lt;br /&gt;
&lt;br /&gt;
A complete version of this program is shown in [[Sample Janus Sockets programs#Simple echo of HTTP/HTML|Simple echo of &lt;br /&gt;
HTTP/HTML]]. See [[Sample Janus Sockets programs#Simple echo of HTTP/HTML|Simple echo of HTTP/HTML]] for another complete &lt;br /&gt;
program, which does not discard any received data. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%s = $Sock_Set(%socket, &#039;PRSTOK&#039;, &#039;0D0A|0A|0D&#039;) &lt;br /&gt;
Repeat &lt;br /&gt;
   %rc = $Sock_RecvPrs(%socket, %s, -1) &lt;br /&gt;
   Print %s &lt;br /&gt;
   If %rc LE 0 Then  &lt;br /&gt;
     Loop End  &lt;br /&gt;
   End If &lt;br /&gt;
End Repeat &lt;br /&gt;
%rc = $Sock_Close(%socket) &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Lengths: maximum, truncation, RECVLIM== &lt;br /&gt;
The &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; function allows you to locate a separator string, and to store all or part of the string before &lt;br /&gt;
the separator into the receive target. It is important to understand that when we say &amp;quot;the string that is received in a call to &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;&amp;quot;, it may be more than the string that &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; stores in the receive target. This is for the following two reasons: &lt;br /&gt;
&amp;lt;ol&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;The separator string is part of the string received, but it is not stored in the receive target. &lt;br /&gt;
&amp;lt;li&amp;gt;The string before the separator may exceed the size of the target, and thus can be partially discarded (or &amp;quot;truncated&amp;quot;). &lt;br /&gt;
&amp;lt;/ol&amp;gt; &lt;br /&gt;
References to the string received by $Sock_RecvPrs are to the string stored in the target plus any subsequent bytes that are &lt;br /&gt;
discarded, plus the separator string.&lt;br /&gt;
Several of the values that control the length of the string received are discussed in this section, using the following terms: &lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This specifies the number of bytes remaining in the &amp;quot;receive window.&amp;quot; A value of zero means there is no limit to the window. The purpose of this window is to allow you to limit a series of receive operations (using, if you want, a mixture of &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;) to a predetermined total number of bytes. &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; can be set in a &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; call, and subsequent receive operations decrement from &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; the number of bytes received, until it reaches zero (at which point a&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; call will return a 0, just as if a &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; had been received.&lt;br /&gt;
When &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; is greater than zero, no receive operation will use any bytes beyond the window.&lt;br /&gt;
A good example of the use of &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; is obtaining a web page, whose length is (usually) specified in the &amp;quot;Content-length&amp;quot; field of the HTTP response header. &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;len_to_end&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;When a receive operation is performed, the received string is of course limited to the total remaining bytes in the stream that the remote end sent before issuing a close operation. Although this value is not known ahead of time, when describing the operation of receive, this term is used to indicate various cases. &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;max_recvp&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This corresponds to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&amp;lt;/var&amp;gt; argument of the &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; function call. It needs to be specified only if you want to allow truncation, or if you want to limit the received string to a length less than the declared size of the target.&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
You can specify that an unlimited number of bytes can be discarded by specifying -1 as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&amp;lt;/var&amp;gt; argument of &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;, making the effective value &amp;quot;infinite.&amp;quot; The number of bytes received by &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; will not exceed the effective value of this argument plus the length of the separator string. The effective value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recvp&amp;lt;/var&amp;gt; if the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&amp;lt;/var&amp;gt; argument of &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt; is 0 (its default), is discussed below. &amp;lt;/p&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;targ_size &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The size of the target is used in calculating various defaults of the other values here, and it also obviously limits the &lt;br /&gt;
number of bytes stored in the target and so affects the number of bytes discarded. &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;discard_len &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This is the number of bytes received minus the length of the separator string, minus &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&amp;gt;. It will always be zero, unless &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recvp&amp;lt;/var&amp;gt; is greater than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&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;
Argument &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recvp&amp;lt;/var&amp;gt; defaults to 0; if they are omitted, or if it is coded as 0, its effective value is shown here:&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;Item&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Value when argument is 0&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;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxrecvp&amp;lt;/var&amp;gt; argument of &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&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;
&#039;&#039;&#039;Truncation&#039;&#039;&#039; can only occur if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recvp&amp;lt;/var&amp;gt; &amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&amp;gt;, which cannot happen if the target is a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If a separator string is not found due to a limit imposed by &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt;,&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;len_to_end&amp;lt;/var&amp;gt;, or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recvp&amp;lt;/var&amp;gt;, then zero is stored in the parse index target (the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%prsindx&amp;lt;/var&amp;gt; argument).&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Recv&amp;diff=116965</id>
		<title>$Sock Recv</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Recv&amp;diff=116965"/>
		<updated>2018-09-21T00:00:34Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Recv}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Receive string based on count&amp;lt;/span&amp;gt;                            &lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented &lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Receive (Socket function)|Receive]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;                &lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; receives a string of bytes on a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection, typically&lt;br /&gt;
to obtain a fixed-length string, and also to allow receipt of additional &amp;quot;already-buffered&amp;quot; bytes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; is also a [[Notation conventions for methods#Callable functions|callable]] function.&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; $Sock_Recv(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%recv_targ&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;opts&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;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%num&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A numeric value that is the number of bytes received, or, if the operation could not be performed as requested, a 0 value. For more details, see [[#$Sock_Recv return values]]. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number. &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;%recv_targ&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A %variable or an &amp;lt;var&amp;gt;IMAGE&amp;lt;/var&amp;gt; item (and &#039;&#039;&#039;never&#039;&#039;&#039; a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; class variable). This argument is the target of the receive operation, and is referred to as the &amp;quot;receive target.&amp;quot; You may request that some bytes from the socket stream can be discarded, so the length of the string stored in this target may be less than the value returned by &amp;lt;var&amp;gt;$Sock_Recv&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;maxbytes&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument, the maximum number of bytes of data to receive, must be from 0 to 2,147,483,647. The default is 0, which means limit the received data to the larger of the value of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; argument and the declared length of the receive target.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
If this argument is 0 and the receive argument is a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;, the received data is limited to 2,147,483,647 bytes. &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;minbytes&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument is the minimum number of bytes of data to receive before the operation completes, unless the input stream ends (a close operation by the remote) or &amp;lt;code&amp;gt;RECVLIM&amp;lt;/code&amp;gt; is encountered. The argument only needs to be specified for a variable length receive, which is fairly unusual.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The default is 0, which means use the effective value of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxbytes&amp;lt;/var&amp;gt; argument. Valid values must be from 0 to 2,147,483,647, and must not exceed the effective value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxbytes&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;opts&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This optional argument is an option string which can contain any of the following: &lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;[[BINARY (JANUS DEFINE parameter)|BINARY]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[CHAR (JANUS DEFINE parameter)|CHAR]]&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is not translated&#039;&#039;&#039; when saved in the receive target. The received string can be translated later in the program using the &amp;lt;var&amp;gt;[[$Sock_Tran_In]]&amp;lt;/var&amp;gt; function. &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;CHAR&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;This indicates that regardless of the socket&#039;s &amp;lt;var&amp;gt;[[BINARY (JANUS DEFINE parameter)|BINARY]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[CHAR (JANUS DEFINE parameter)|CHAR]]&amp;lt;/var&amp;gt; parameter, data &#039;&#039;&#039;is translated&#039;&#039;&#039; when saved in the receive target. The translation is specified by the input table defined by the socket&#039;s &amp;lt;var&amp;gt;[[XTAB (JANUS DEFINE parameter)|XTAB]]&amp;lt;/var&amp;gt; parameter. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&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;
&lt;br /&gt;
===$Sock_Recv return values===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; returns the value -1 if the socket is not &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt;&lt;br /&gt;
and &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt; is in effect for the socket.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; returns a number greater than 0&lt;br /&gt;
(which is the number of bytes received from the socket stream)&lt;br /&gt;
if at least &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; are stored in the target.&lt;br /&gt;
[[#Lengths: maximum, minimum, truncation, RECVLIM|Lengths: maximum, minimum, truncation, RECVLIM]] explains how the term&lt;br /&gt;
&#039;&#039;&#039;number of bytes received&#039;&#039;&#039; is used, and it discusses the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxbytes&amp;lt;/var&amp;gt;&lt;br /&gt;
and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; arguments and other values affecting the received string.&lt;br /&gt;
&lt;br /&gt;
The return value from &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt;&lt;br /&gt;
can be less than the value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;Formerly, &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; would return 0 to indicate that the length of the received&lt;br /&gt;
string is less than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt;. [[#Less than minbytes available|Less than minbytes available]] explains the 0 return code.&lt;br /&gt;
One case of this is if there is no data remaining to be received on&lt;br /&gt;
the connection, that is, if &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; has been received.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; now returns 0 to indicate&lt;br /&gt;
that there is no more data to be received.&lt;br /&gt;
Calling &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; (or &amp;lt;var&amp;gt;[[$Sock_RecvPrs]]&amp;lt;/var&amp;gt;) again in this situation, without&lt;br /&gt;
at the very least setting &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; to a new value, will result in request cancellation.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
In general, you use &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; when the protocol in use establishes the&lt;br /&gt;
length of a data item before it appears in the socket stream.&lt;br /&gt;
The simplest case is receiving the next &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;n&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; bytes, where &amp;lt;i&amp;gt;&amp;lt;b&amp;gt;n&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;br /&gt;
is the size of the target, as shown in the following example to receive 5 strings of 100 bytes each.&lt;br /&gt;
You use the alternate receive operation,&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;, for a data item whose length is unknown beforehand,&lt;br /&gt;
but rather is terminated by a known string (or one of a known set of strings).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%GRABIT IS STRING LEN 100 ARRAY(5)&lt;br /&gt;
For %x From 1 To 5&lt;br /&gt;
   %len = $Sock_Recv(%socket, %grabit(%x))&lt;br /&gt;
   If %len Ne 100 Then&lt;br /&gt;
      Print &#039;Invalid number of bytes received.&#039;&lt;br /&gt;
      Print &#039;Last string received=&#039; %grabit(%x)&lt;br /&gt;
      Print &#039;Partial length=&#039; With $Len(%grabit(%x))&lt;br /&gt;
   End If&lt;br /&gt;
End For&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Lengths: maximum, minimum, truncation, RECVLIM==&lt;br /&gt;
The &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; function allows you to receive either a fixed length&lt;br /&gt;
string of bytes, or to receive some minimum length&lt;br /&gt;
and also any additional bytes that may already be available in the&lt;br /&gt;
socket&#039;s TCP/IP input buffer; this latter capability is called a &amp;quot;variable length receive.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
It is important to understand that a string referred to as&lt;br /&gt;
&amp;quot;the string that is received in a call to &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt;&amp;quot;&lt;br /&gt;
may be more than the string that &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; stores in the receive target.&lt;br /&gt;
Therefore, data in the input stream that exceeds the size&lt;br /&gt;
of the target can be discarded (or &amp;quot;truncated&amp;quot;).&lt;br /&gt;
The &amp;quot;string received by &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt;,&amp;quot; is a reference to the&lt;br /&gt;
string stored in the target plus any subsequent bytes that are discarded.&lt;br /&gt;
If the target is a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;, no bytes&lt;br /&gt;
would ever be discarded, since the maximum size of a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt; is the&lt;br /&gt;
same as the greatest number of bytes &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; will ever receive.&lt;br /&gt;
&lt;br /&gt;
The several values that control the length of the string received&lt;br /&gt;
are discussed in this section, using the following terms:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This specifies the number of bytes remaining in the &amp;quot;receive window.&amp;quot; A value of zero means there is no limit to the window. The purpose of this window is to allow you to limit a series of receive operations (using, if you want, a mixture of &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;$Sock_RecvPrs&amp;lt;/var&amp;gt;) to a predetermined total number of bytes.  &lt;br /&gt;
&amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; can be set in a &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; call, and subsequent receive operations decrement from &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; the number of bytes received, until it reaches zero (at which point a&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; call will return a 0, just as i&lt;br /&gt;
When &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; has been set, no receive operation will use any bytes beyond the window.&lt;br /&gt;
A good example of the use of &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; is obtaining a web page, whose length is (usually) specified in the &amp;quot;Content-length&amp;quot; field of the HTTP response header.&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;len_to_end &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;When a receive operation is performed, the received string is of course limited to the total remaining bytes in the stream that the remote end sent before issuing a close operation. Although this value is not known ahead of time, when describing the operation of receive, the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;len_to_end&amp;lt;/var&amp;gt; term is used to indicate various cases.&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;max_recv &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This corresponds to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;maxbytes&amp;lt;/var&amp;gt; argument of the &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; function call. It needs to be specified only if you want to allow truncation, or if you want to limit the received string to a length shorter than the size of the receive target. The number of bytes received by &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; will not exceed the effective value of this argument. The effective value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recv&amp;lt;/var&amp;gt; if argument 3 is 0 (its default), is discussed [[#maxmin|below]].&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;min_recv &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This corresponds to the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; argument of the &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; function call. You only need to provide this argument for a variable length receive. The receive initiated by &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; will only complete if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min_recv&amp;lt;/var&amp;gt; bytes are received, or if the limit to the stream (&amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; or &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;len_to_end&amp;lt;/var&amp;gt;) is reached. The effective value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min_recv&amp;lt;/var&amp;gt;, if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; is 0 (its default), is discussed [[#maxmin|below]]. &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;targ_size &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The size of the target is used in calculating various defaults of the other values here, and it also obviously limits the number of bytes stored in the target and so affects the number of bytes discarded. &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;discard_len &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This is the number of bytes received minus &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&amp;gt;. It will always be zero, unless &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recv&amp;lt;/var&amp;gt; is greater than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&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;
&amp;lt;div id=&amp;quot;maxmin&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Arguments &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recv&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min_recv&amp;lt;/var&amp;gt; both default to 0; if they are omitted, or if&lt;br /&gt;
they are coded as 0, their effective values are shown here:&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;&amp;lt;th&amp;gt;Item&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;Value when argument is 0&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;max_recv&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;larger of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min_recv&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&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;min_recv&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;the effective value of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recv&amp;lt;/var&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;
&#039;&#039;&#039;Truncation&#039;&#039;&#039; can only occur if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recv&amp;lt;/var&amp;gt; &amp;gt; &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;targ_size&amp;lt;/var&amp;gt;, which&lt;br /&gt;
cannot happen if the target is a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;variable length&#039;&#039;&#039; receive, which is a fairly unusual operation,&lt;br /&gt;
is only possible if &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;min_recv&amp;lt;/var&amp;gt; differs from &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;max_recv&amp;lt;/var&amp;gt;; therefore, you will&lt;br /&gt;
generally not code the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; argument of &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Less than minbytes available===&lt;br /&gt;
Formerly, if &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; was called and the number of bytes&lt;br /&gt;
remaining on the connection within the remaining &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; was&lt;br /&gt;
less than the effective value of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; argument,&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; returned 0 to indicate this, but the receive target&lt;br /&gt;
was set to any partial string remaining, or to the null string if there&lt;br /&gt;
were none remaining (that is, &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; has been received).&lt;br /&gt;
&lt;br /&gt;
The 0 return code indicated unsuccessful completion because the&lt;br /&gt;
function wasn&#039;t able to do all it was asked to do (that is, return a&lt;br /&gt;
fixed number of bytes or a specified minimum number of bytes).&lt;br /&gt;
Depending on your application, this may be an error or the partial&lt;br /&gt;
string may be valid data.&lt;br /&gt;
If no bytes were discarded, you could determine the number of&lt;br /&gt;
bytes received by the length of the string stored in the receive target.&lt;br /&gt;
&lt;br /&gt;
It is now the case that if &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; is called and the number of&lt;br /&gt;
bytes remaining on the connection within the remaining &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; is&lt;br /&gt;
less than the effective value of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt; argument,&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; returns the number of bytes read.&lt;br /&gt;
&lt;br /&gt;
In such a case, if the application determines that the number of bytes&lt;br /&gt;
returned is less than &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;minbytes&amp;lt;/var&amp;gt;,&lt;br /&gt;
it knows that either &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt;&lt;br /&gt;
must have been hit or a &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; must have been received.&lt;br /&gt;
Alternatively, the application can forego checking for this case and&lt;br /&gt;
simply wait until &amp;lt;var&amp;gt;$Sock_Recv&amp;lt;/var&amp;gt; returns a zero.&lt;br /&gt;
&lt;br /&gt;
This allows a simple receive loop structure like:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Do While $Sock_Recv(%sock, %str)&lt;br /&gt;
   ...&lt;br /&gt;
End Do&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
However, with the use of &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;s, an application can simply receive&lt;br /&gt;
everything up to &amp;lt;var&amp;gt;RECVLIM&amp;lt;/var&amp;gt; or the end of a stream with a simple call like:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%rc = $Sock_Recv(%sock, %longstr)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_OnReset&amp;diff=116964</id>
		<title>$Sock OnReset</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_OnReset&amp;diff=116964"/>
		<updated>2018-09-21T00:00:34Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_OnReset}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Set label to handle RESET conditions&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[OnReset (Socket function)|OnReset]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; specifies a label in the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; sockets program to&lt;br /&gt;
jump to when a &amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; socket is encountered in the current or lower scope.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; is also [[Notation conventions for methods#Callable functions|callable]].&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_OnReset(&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;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Janus Sockets $functions]]&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;%rc&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A numeric value that indicates whether the program jump is successful. 0 means success.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;label&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies the label that is to handle &amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; conditions. &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;&amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; does not have a socket number argument, thus it is not affected by any &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; setting.&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;label&amp;lt;/var&amp;gt; is the null string or all blanks, any existing &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label in the current scope is cleared, and &amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; returns: &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;-3, if $SOCK_ONRESET is issued from an ON unit &lt;br /&gt;
&amp;lt;li&amp;gt;-1, otherwise &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Otherwise, if the argument is a valid label and the function call is successful, it replaces any existing &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label definition in the current scope and returns a 0.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If the function call fails to clear or set the &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label, the request is cancelled. The function can fail for the following reasons: &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;The label is not found in the current scope. &lt;br /&gt;
&amp;lt;li&amp;gt;The label is a subroutine. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; is invoked from an &amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt; unit, and the argument is neither the null string nor all blank. &amp;lt;li&amp;gt;Label is in a loop, &amp;lt;var&amp;gt;ON&amp;lt;/var&amp;gt; unit, or simple subroutine. &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;A request may have multiple &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; labels set, up to one for each scope (the outer level of a request is a scope, as is each complex subroutine). A jump to an &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label is attempted when a &amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; socket is encountered during a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; operation and the socket&#039;s &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; setting is &amp;lt;code&amp;gt;LABEL&amp;lt;/code&amp;gt;. If the operation requires an &amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; socket, a socket can have the &amp;lt;var&amp;gt;LABELC&amp;lt;/var&amp;gt; setting. See [[Janus Sockets User Language coding considerations#Handling connection errors and RESET sockets|&amp;quot;Handling connection errors and RESET sockets&amp;quot;]] for an explanation of the &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; setting.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
When the jump is attempted, it is successful if there is an &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label within the current or an invoking scope of the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; request that encountered the &amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; socket. If there is no such label, the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; request is cancelled. &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Using this function to set an &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; handler reduces the amount of return code checking the application has to do on each $Sock_xxx function call. &lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
As a result of the &amp;lt;var&amp;gt;$Sock_OnReset&amp;lt;/var&amp;gt; code in the following example, encountering a &amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; socket will print a set of error messages that provide the failing operation, return code, and socket identifier before terminating evaluation: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%x = $Sock_OnReset(&#039;KABOOM&#039;)&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
KABOOM: &lt;br /&gt;
%c =  $Sock_ErrInfo(&#039;CODE&#039;) &lt;br /&gt;
%s =  $Sock_ErrInfo(&#039;SOCKNUM&#039;) &lt;br /&gt;
%f =  $Sock_ErrInfo(&#039;FUN&#039;) &lt;br /&gt;
Print &#039;The connection was unexpectedly lost.&#039; &lt;br /&gt;
Print &#039;The last sockets error operation was:&#039; &lt;br /&gt;
Print &#039;Function:      &#039; With %f &lt;br /&gt;
Print &#039;Return code:   &#039; With %c &lt;br /&gt;
Print &#039;Socket:        &#039; With %s &lt;br /&gt;
STOP &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Num&amp;diff=116963</id>
		<title>$Sock Num</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Num&amp;diff=116963"/>
		<updated>2018-09-21T00:00:33Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Num}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Get selected socket numbers&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Num&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Num (Socket function)|Num]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Num&amp;lt;/var&amp;gt; retrieves selected socket numbers.&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;%nums&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_Num&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;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;selection&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;literal&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; &amp;lt;/p&amp;gt;&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;%nums&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that contains blank-separated selected socket numbers in ascending order. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;selection&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A string that identifies which socket numbers to return. It is any combination of the following strings separated by &#039;&#039;&#039;OR&#039;&#039;&#039;, and each optionally prefixed by &#039;&#039;&#039;NOT&#039;&#039;&#039;: &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&amp;gt;ANY&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return all sockets. This is the default. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;CONN&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return sockets enabled for sending in both directions. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;FINR&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return sockets on which local partner is enabled for sending but remote has stopped sending (&amp;quot;FIN received&amp;quot;). &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;FINS&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return sockets on which remote partner is enabled for sending but local stopped sending (&amp;quot;FIN sent&amp;quot;). &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;FINBOTH&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; sockets on which remote and local partners both stopped sending (&amp;quot;FIN sent and received&amp;quot;). &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;RESET&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return in-use but no longer connected sockets. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;OPEN&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; sockets. This is equivalent to either of the following: &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;NOT RESET &lt;br /&gt;
&amp;lt;li&amp;gt;CONN OR FINR OR FINS OR FINBOTH &lt;br /&gt;
&amp;lt;/ul&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;&amp;lt;var&amp;gt;CAPTURE&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return sockets (&amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; or not) for which print capturing is on. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;CAPOPEN&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Return &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; sockets for which print capturing is on. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt; &lt;br /&gt;
If &amp;lt;var&amp;gt;NOT&amp;lt;/var&amp;gt; prefixes one of the above specifications, then all in-use sockets (&amp;lt;i&amp;gt;excluding&amp;lt;/i&amp;gt; the specified set) are included in the selected set. With multiple terms separated by &amp;lt;var&amp;gt;OR&amp;lt;/var&amp;gt;, the specified sets are combined by the set union operation. &lt;br /&gt;
&amp;lt;/table&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Usage notes== &lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Num&amp;lt;/var&amp;gt; does not have a socket number argument, and thus it is not affected by any &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; setting.&lt;br /&gt;
&lt;br /&gt;
==Examples== &lt;br /&gt;
&amp;lt;ol&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;In the following example, &amp;lt;code&amp;gt;%sock&amp;lt;/code&amp;gt; contains the blank-delimited values of &amp;lt;code&amp;gt;%c1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%c2&amp;lt;/code&amp;gt;. Assuming no other client socket numbers were in use, this would result in &amp;lt;code&amp;gt;%sock = &#039;2 3&#039;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;JANUS DEFINE PIPE * CLSOCK 5 REMOTE * * SOCKPMAX 2 &lt;br /&gt;
Begin&lt;br /&gt;
    %c1       is Float&lt;br /&gt;
    %c2       is Float&lt;br /&gt;
    %sock     is String Len 255&lt;br /&gt;
    %c1 = $Sock_conn(&#039;PIPE&#039;, &#039;www.ampas.org&#039;, 80)&lt;br /&gt;
    %c2 = $Sock_conn(&#039;PIPE&#039;, &#039;www.wga.org&#039;, 80)&lt;br /&gt;
    %sock = $Sock_Num    ... &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The following example shows another way to retrieve the list of all &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; socket numbers: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%sock = $Sock_Num(&#039;NOT RESET&#039;) &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The following example shows how to retrieve the list of all &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; socket numbers that have not received the &amp;lt;var&amp;gt;FIN&amp;lt;/var&amp;gt; indicator: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%sock = $Sock_Num(&#039;CONN OR FINS&#039;) &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Info&amp;diff=116962</id>
		<title>$Sock Info</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Info&amp;diff=116962"/>
		<updated>2018-09-21T00:00:33Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Info}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Get info about a socket&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Info&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Info (Socket function)|Info]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_info&amp;lt;/var&amp;gt; retrieves socket information.&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;%info&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_Info(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;socket&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;infoType&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%info&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that contains the requested information. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;socket&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A string that is the socket identifier. &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;infoType&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;One of the following string indicators of the information to be retrieved about the socket: &lt;br /&gt;
&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;i&amp;gt;Value&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;i&amp;gt;Description&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;CAPTURE&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Retrieve current print capture setting of socket (see &amp;lt;var&amp;gt;[[$Sock_Capture]]&amp;lt;/var&amp;gt;). The socket need not be &amp;lt;code&amp;gt;OPEN&amp;lt;/code&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;&amp;lt;var&amp;gt;REMOTE&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Retrieve dotted IP address of remote host, followed by blank and remote port number. The socket must be &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;; if it is not, the string &amp;quot;RESET&amp;quot; is returned. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;STAT&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Retrieve socket state. The socket need not be &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;. The returned value will be one of the following: &lt;br /&gt;
&amp;lt;dl&amp;gt; &lt;br /&gt;
&amp;lt;dt&amp;gt;CONN &amp;lt;dd&amp;gt;Socket &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; and enabled for sending in both directions &lt;br /&gt;
&amp;lt;dt&amp;gt;FINR &amp;lt;dd&amp;gt;Socket &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;, remote stopped sending, local enabled for sending (&amp;quot;FIN received but not sent&amp;quot;) &lt;br /&gt;
&amp;lt;dt&amp;gt;FINS &amp;lt;dd&amp;gt;Socket &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;, local stopped sending, remote enabled for sending (&amp;quot;FIN sent but not received&amp;quot;) &amp;lt;dt&amp;gt;FINBOTH &amp;lt;dd&amp;gt;Socket &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;, local and remote stopped sending (&amp;quot;FIN sent and received&amp;quot;) &lt;br /&gt;
&amp;lt;dt&amp;gt;RESET &amp;lt;dd&amp;gt;Socket is &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; (no longer connected) &lt;br /&gt;
&amp;lt;/dl&amp;gt; &lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;b&amp;gt;Note:&amp;lt;/b&amp;gt; Since the status of &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; sockets may include several more status types in future releases, test for &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; sockets by testing for the string &amp;quot;RESET&amp;quot;: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;If $sock_info(%sk, &#039;STATUS&#039;) Ne &#039;RESET&#039; ... &amp;lt;/p&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;opt&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Any of the strings that may be passed as the second argument to &amp;lt;var&amp;gt;$Sock_Set&amp;lt;/var&amp;gt; (for example, &amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;PRSTOK&amp;lt;/var&amp;gt;). For some of these, the socket must be &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;; if not, the string &amp;quot;RESET&amp;quot; is returned. To view the arguments that require an &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; socket, see &amp;lt;var&amp;gt;[[$Sock_Set]]&amp;lt;/var&amp;gt;. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt; &lt;br /&gt;
The &amp;lt;var&amp;gt;$Sock_Info&amp;lt;/var&amp;gt; function returns either the requested value or, as noted above, the string &amp;quot;RESET&amp;quot;.&lt;br /&gt;
If &amp;lt;var&amp;gt;$Sock_Info&amp;lt;/var&amp;gt; is invoked with a socket that is &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;, the results depend on several factors: &lt;br /&gt;
&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;If argument two is &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt;, the operation is performed normally, and there is no indication of the fact that the socket is RESET. &lt;br /&gt;
&amp;lt;li&amp;gt;Otherwise, if argument two is a keyword which does not require an &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt; socket, and &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;CANCELC&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;LABELC&amp;lt;/var&amp;gt; is in effect for the socket, the string &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; is returned and the last error information is set. &lt;br /&gt;
&amp;lt;li&amp;gt;Otherwise, if &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt; is in effect for the socket, the string &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; is returned and the last error information is set. &lt;br /&gt;
&amp;lt;li&amp;gt;Otherwise the request is canceled or the &amp;lt;code&amp;gt;ONRESET&amp;lt;/code&amp;gt; label is jumped to, as explained in [[Janus Sockets User Language coding considerations#Handling connection errors and RESET sockets|&amp;quot;Handling connection errors and RESET sockets&amp;quot;]]. &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_ErrInfo&amp;diff=116961</id>
		<title>$Sock ErrInfo</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_ErrInfo&amp;diff=116961"/>
		<updated>2018-09-21T00:00:32Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_ErrInfo}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Get info about last Janus Sockets error&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_ErrInfo&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[ErrInfo (Socket function)|ErrInfo]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_ErrInfo&amp;lt;/var&amp;gt; retrieves information about the last &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; error.&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;%info&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt; = $Sock_ErrInfo(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;infoType&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%info&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string that contains the requested information. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;infoType&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;One of the following strings: &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;i&amp;gt;Value&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;th&amp;gt;&amp;lt;i&amp;gt;Description&amp;lt;/i&amp;gt;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;CODE&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Retrieve the code from the last &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; error. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;SOCKNUM&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Retrieve the socket number used by the last &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; operation with an error condition. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;FUN&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Retrieve the name of the $function producing the last &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; error. This may also be the string &amp;quot;Captured print,&amp;quot; if a captured &amp;quot;print&amp;quot; operation was the last operation that encountered a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; error. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&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;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the return string is null, there was no &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt;&lt;br /&gt;
error since the thread logged in (note, as described in [[Janus Sockets User Language coding considerations#Handling connection errors and RESET sockets|&amp;quot;Handling connection errors and RESET sockets&amp;quot;]],&lt;br /&gt;
that $Sock_Conn does not set the last error information, and a few other $Sock_xxx functions do not set it, either).&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_ErrInfo&amp;lt;/var&amp;gt; does not have a socket number argument, and thus it is not affected by any &amp;lt;code&amp;gt;ONRESET&amp;lt;/code&amp;gt; setting.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Conn&amp;diff=116960</id>
		<title>$Sock Conn</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Conn&amp;diff=116960"/>
		<updated>2018-09-21T00:00:32Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Conn}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Connect to remote using CLSOCK port&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;Socket&amp;lt;/var&amp;gt; class &amp;lt;var&amp;gt;[[New (Socket constructor)|New]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt; creates a connection to a remote host using a Janus&lt;br /&gt;
client socket port.&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;%num&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;= $Sock_Conn(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;socketPortName&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;remoteHost&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;remotePort&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;options&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;literal&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;syntaxTable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;%num&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An integer socket identifier or an error code. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;socketPortName&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The client socket port name. The &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;socketPortName&amp;lt;/var&amp;gt; default is the &amp;lt;var&amp;gt;[[MASTER (JANUS DEFINE parameter)|MASTER]]&amp;lt;/var&amp;gt; port, if any is defined. However, if you omit &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;socketPortName&amp;lt;/var&amp;gt; and no &amp;lt;var&amp;gt;MASTER&amp;lt;/var&amp;gt; port is defined, the request is canceled. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;remoteHost&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The remote host name or IP address. This argument is optional or may be the null string if the remote host or remote IP address is fully specified on the port definition &amp;lt;var&amp;gt;[[REMOTE (JANUS DEFINE parameter)|REMOTE]]&amp;lt;/var&amp;gt; clause.&lt;br /&gt;
If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;remoteHost&amp;lt;/var&amp;gt; is specified and is not the null string, it must match the remote host specified explicitly or indicated by a pattern on the port definition. If an asterisk (*) was specified for the remote host on the port definition, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;remoteHost&amp;lt;/var&amp;gt; must be specified. The remote host may also be restricted by &amp;lt;var&amp;gt;[[JANUS_CLSOCK#JANUS_CLSOCK_ALLOW|JANUS CLSOCK ALLOW]]&amp;lt;/var&amp;gt; rules. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;remotePort&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The port number on the remote host to which the socket will connect. If a port number was specified on the &amp;lt;var&amp;gt;REMOTE&amp;lt;/var&amp;gt; clause of the port definition, this argument can be either the matching number or -1, or it can be omitted. If an asterisk (*) was specified for the remote port on the port definition, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;remotePort&amp;lt;/var&amp;gt; must be specified. The port number may also be restricted by &amp;lt;var&amp;gt;[[JANUS_CLSOCK#JANUS_CLSOCK_ALLOW|JANUS CLSOCK ALLOW]]&amp;lt;/var&amp;gt; rules.  &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;options&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;An option string that can be used to invoke socket-specific processing that is not already explicitly specified on the &amp;lt;var&amp;gt;[[JANUS DEFINE]]&amp;lt;/var&amp;gt; command for the port. The argument string may contain one or two options, selected from the two pairs of alternatives below. If the argument string is omitted, the option defaults depend on the &amp;lt;var&amp;gt;[[JANUS DEFINE#type|CLSOCK]]&amp;lt;/var&amp;gt; port definition. If the argument string contains an option that conflicts with the port definition, the request is canceled. &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&amp;gt;SSL&amp;lt;/var&amp;gt; &amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Use SSL (Secure Sockets Layer) encryption over the connection (see &amp;lt;var&amp;gt;[[SSL (JANUS DEFINE parameter)|SSL]]&amp;lt;/var&amp;gt;, and see the &amp;lt;i&amp;gt;[http://www.sirius-software.com/maint/download/jansslr.pdf Janus Network Security Reference Manual]&amp;lt;/i&amp;gt;). Setting &amp;lt;code&amp;gt;SSL&amp;lt;/code&amp;gt; here is meaningful only if the port definition includes the &amp;lt;var&amp;gt;SSL&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[SSLOPT (JANUS DEFINE parameter)|SSLOPT]]&amp;lt;/var&amp;gt; parameters (in which case, by default, SSL is &#039;&#039;&#039;not&#039;&#039;&#039; used unless the socket connection explicitly requests it).&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Setting &amp;lt;code&amp;gt;SSL&amp;lt;/code&amp;gt; here is redundant if the port definition includes &amp;lt;var&amp;gt;SSL&amp;lt;/var&amp;gt; but not &amp;lt;var&amp;gt;SSLOPT&amp;lt;/var&amp;gt;, and setting it is invalid if the port definition excludes &amp;lt;var&amp;gt;SSL&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;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;NOSSL&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Do not use SSL over the connection. This setting is valid only if the port definition includes the &amp;lt;var&amp;gt;SSLOPT&amp;lt;/var&amp;gt; parameter. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;FINCLOSE&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;If the remote host closes the connection, even if it does so &amp;quot;cleanly&amp;quot; (that is, with &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;), &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; closes the connection immediately. This setting avoids wasted processing or even a hung connection in a situation(like a keep-alive facility) where a remote application uses a &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; to close a connection with a request. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;NOFINCLOSE&amp;lt;/var&amp;gt;&lt;br /&gt;
&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Do not use &amp;lt;var&amp;gt;FINCLOSE&amp;lt;/var&amp;gt; processing for this connection. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===$Sock_Conn return values===&lt;br /&gt;
The number returned from &amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt; is a positive value which is used as the&lt;br /&gt;
identifier of the successfully connected socket, or otherwise it is an error code as shown below:&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;&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;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;0&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Communications was successful.&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;100&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The format of the response from the server was invalid.&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;101&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A &amp;lt;var&amp;gt;Get&amp;lt;/var&amp;gt; operation exceeded its [[Timeout (HttpRequest property)|timeout]] value.&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;102&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The connection was closed before the complete response was received.&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;-100&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;No free socket numbers for user.&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;-101&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Remote host name or IP address missing or mismatch with &amp;lt;var&amp;gt;CLSOCK&amp;lt;/var&amp;gt; port definition.&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;-102&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Remote port number missing or mismatch with &amp;lt;var&amp;gt;CLSOCK&amp;lt;/var&amp;gt; port definition.&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;-103&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var&amp;gt;CLSOCK&amp;lt;/var&amp;gt; port not defined or not started.&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;-104&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;All ports on specified &amp;lt;var&amp;gt;CLSOCK&amp;lt;/var&amp;gt; port are busy.&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;-105&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Insufficient virtual storage.&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;-106&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Maximum connections exceeded.&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;-107&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Couldn&#039;t resolve remote host.&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;-108&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Remote port not responding.&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;-109&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Already have &amp;lt;var&amp;gt;[[SOCKPMAX]]&amp;lt;/var&amp;gt; sockets open on this &amp;lt;var&amp;gt;CLSOCK&amp;lt;/var&amp;gt; port.&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;-110&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;SSL/NOSSL setting mismatch.&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;-111&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;SSL handshake error.&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;-112&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Access to &amp;lt;var&amp;gt;CLSOCK&amp;lt;/var&amp;gt; port not enabled by &amp;lt;var&amp;gt;[[JANUS WEB ALLOW|ALLOW]]&amp;lt;/var&amp;gt; rule.&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;-149&amp;lt;/td&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Other error during connection attempt which prevents establishment of the connection.&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;$Sock_xxx functions that encounter an &amp;quot;unusable&amp;quot; socket can ordinarily be handled by a jump to an &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; label, by request cancellation, or by continuation of the request at the next statement with an error return code. &amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt;, however, always continues execution with the next statement. It does not have a socket number argument, and it cannot encounter a reset socket. You must check the error return code: if it is negative and you try to use it in a subsequent $Sock_xxx call, the request will be cancelled at that time. &lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When &amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt; detects an error, it also issues an error message to the user. If you want to suppress this, and the &amp;lt;var&amp;gt;APSY&amp;lt;/var&amp;gt; facility for suppressing error messages is not appropriate for your application, you can use the &amp;lt;var&amp;gt;[[$Resetn]]&amp;lt;/var&amp;gt; function to set the &amp;lt;var&amp;gt;MSGCTL&amp;lt;/var&amp;gt; user parameter to 4. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt; initiates a connection to a remote port over a client socket port. If the remote host and port were specified on the client socket port definition, they don&#039;t have to be specified in the function call.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the following example, because the port definition specifies that all client requests on port &amp;lt;code&amp;gt;SOCKEM&amp;lt;/code&amp;gt; will go to port 80 at host IP address &amp;lt;code&amp;gt;198.242.244.47&amp;lt;/code&amp;gt;, specifying the destination on the function call is superfluous. &amp;lt;code&amp;gt;%num&amp;lt;/code&amp;gt; contains either a positive number identifying the socket number or a negative number identifying the type of error received during the attempt to establish a new socket connection. A negative number indicates an error condition, and processing is routed to an error-handling subroutine. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;JANUS DEFINE SOCKEM * CLSOCK 5 REMOTE 198.242.244.47 80 &lt;br /&gt;
Begin&lt;br /&gt;
 ...    &lt;br /&gt;
%num = $Sock_Conn(&#039;SOCKEM&#039;)&lt;br /&gt;
    If %num Lt 0 Then&lt;br /&gt;
       Call PROCESS_SOCKET_ERROR&lt;br /&gt;
    End If    ... &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
In the example below, the port is defined to accept client requests to any remote port. The &amp;lt;var&amp;gt;$Sock_Conn&amp;lt;/var&amp;gt; function specifies a connection to the default web port (80) at a well-known satirical news provider. &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;* Define the client sockets port. &lt;br /&gt;
JANUS DEFINE SOCKEM * CLSOCK 5 REMOTE * * &lt;br /&gt;
Begin&lt;br /&gt;
 ...    &lt;br /&gt;
%num = $Sock_Conn(&#039;SOCKEM&#039;, &#039;www.theonion.com&#039;, 80)&lt;br /&gt;
    If %num Lt 0 Then&lt;br /&gt;
       Call PROCESS_SOCKET_ERROR&lt;br /&gt;
    End If    ... &amp;lt;/p&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;code&amp;gt;FINCLOSE&amp;lt;/code&amp;gt; option is useful in situations where &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; is as good as &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; for rendering a connection unusable, and where it&#039;s important to know that &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; has been sent to avoid wasted processing or even a hung connection.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
For example, an appropriate occasion for &amp;lt;code&amp;gt;FINCLOSE&amp;lt;/code&amp;gt; is a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; application communicating with a web server that is using a keep-alive facility (multiple requests over the same TCP/IP connection). Such a web server could close the connection between any pair of requests, and probably would use &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt;. Without &amp;lt;code&amp;gt;FINCLOSE&amp;lt;/code&amp;gt;, the Janus thread that connected to the web server would remain in-use until the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; application tried to receive data on the connection and so noticed the closed connection. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Close&amp;diff=116959</id>
		<title>$Sock Close</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Close&amp;diff=116959"/>
		<updated>2018-09-21T00:00:31Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Close}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Close Janus Sockets connection(s)&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Close&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Close (Socket function)|Close]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Close&amp;lt;/var&amp;gt; terminates the sending and receiving of data on, and removes from use,&lt;br /&gt;
one or all &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection(s).&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Sock_Close&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;literal&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;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&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;literal&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; &amp;lt;/p&amp;gt;&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;%num&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The number of of connections closed.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The number of a socket that is to be closed, or the value -1, which indicates that all the user&#039;s sockets should be closed. The default value of this optional argument is -1. &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;If &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;socket&amp;lt;/var&amp;gt; is -1, indicating that all sockets are affected by the &amp;lt;var&amp;gt;$Sock_Close&amp;lt;/var&amp;gt; call, then the returned number &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%num&amp;lt;/var&amp;gt; will be the number of sockets in use. Otherwise &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; is returned. &lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sock_Close&amp;lt;/var&amp;gt; is not affected by any &amp;lt;var&amp;gt;ONRESET&amp;lt;/var&amp;gt; setting. &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;In the following example, the &amp;lt;var&amp;gt;$Sock_Close&amp;lt;/var&amp;gt; call signals that the program has completed all processing on the socket identified by the value in &amp;lt;code&amp;gt;%sock&amp;lt;/code&amp;gt;: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%count = $Sock_Close(%sock) &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt;The following call closes all socket connections the user has: &lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%count = $Sock_Close(-1) &amp;lt;/p&amp;gt; &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Capture&amp;diff=116958</id>
		<title>$Sock Capture</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sock_Capture&amp;diff=116958"/>
		<updated>2018-09-21T00:00:30Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sock_Capture}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Change print capture setting&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented&lt;br /&gt;
methods. The OO equivalent for &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; is the &amp;lt;var&amp;gt;[[Capture (Socket function)|Capture]]&amp;lt;/var&amp;gt; method.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; specifies whether print output should be sent as lines on a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection.&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;squareb&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;%num&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&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; &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Sock_Capture(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&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;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;  &amp;lt;/p&amp;gt;&lt;br /&gt;
&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;%num&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The content of this return string depends on the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; argument, as described below in [[#$Sock_Capture return values|$Sock_Capture return values]]. &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;sockNum&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The socket number, or it is &#039;-1&#039; to indicate that the setting affects all sockets.&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 is the print capture setting for the socket. Valid values are:&lt;br /&gt;
&amp;lt;dl&amp;gt;&lt;br /&gt;
&amp;lt;dt&amp;gt;OFF&amp;lt;dd&amp;gt;Don&#039;t capture print to this socket.&lt;br /&gt;
&amp;lt;dt&amp;gt;ON&amp;lt;dd&amp;gt;Capture print to this socket as well as any other capturing sockets.&lt;br /&gt;
&amp;lt;/dl&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;
===$Sock_Capture return values===&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; argument is -1, indicating that all sockets are affected by the &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; call, the return string is the number of sockets (not counting the open sockets that have sent the &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; operation). &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;sockNum&amp;lt;/var&amp;gt; is not -1, the returned string contains the value of the socket&#039;s previous &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; setting. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If a single socket is specified as the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;sockNum&amp;lt;/var&amp;gt; value, the socket is not open,&lt;br /&gt;
and &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt; is in effect for the socket, then &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; returns the string &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&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;Each captured print line is followed by a &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string,&lt;br /&gt;
if the socket has one set in its definition or by &amp;lt;var&amp;gt;[[$Sock_Set]]&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The set of socket numbers that currently capture print lines can be obtained as &amp;lt;code&amp;gt;$Sock_Num(&#039;CAPTURE&#039;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
The set of open socket numbers that currently capture print lines can be obtained as &amp;lt;code&amp;gt;$Sock_Num(&#039;CAPOPEN&#039;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When a &amp;lt;code&amp;gt;FIN&amp;lt;/code&amp;gt; is sent (using either &amp;lt;var&amp;gt;[[$Sock_Send]]&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;[[$Sock_SendLn]]&amp;lt;/var&amp;gt;), print capturing is automatically turned &amp;lt;var&amp;gt;OFF&amp;lt;/var&amp;gt; for the socket.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
In the following example, the &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; call specifies that print operations should be sent to the [[JANUS SRVSOCK|SRVSOCK]] socket.&lt;br /&gt;
Subsequent print operations, such 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;Print&amp;lt;/var&amp;gt; statement, will send lines to the socket rather than to the normal terminal output:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%t = $Sock_Capture(1, &#039;ON&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a more complete example in [[Sample Janus Sockets programs#Print capturing example|Print capturing example]]; also&lt;br /&gt;
see [[#Print capturing hierarchy and other considerations|Print capturing hierarchy and other considerations]].&lt;br /&gt;
&lt;br /&gt;
==Print capturing hierarchy and other considerations==&lt;br /&gt;
The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Print&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;[[Text and Html statements|Html]]&amp;lt;/var&amp;gt; statements, the &amp;lt;var&amp;gt;DISPLAY PROCEDURE&amp;lt;/var&amp;gt; command, and the &amp;lt;var&amp;gt;DISPLAY LIST&amp;lt;/var&amp;gt; command are a few of many &amp;quot;print&amp;quot;&lt;br /&gt;
operations that can produce output lines for an application.&lt;br /&gt;
These operations &amp;quot;normally&amp;quot; send their output to the &amp;quot;terminal output&amp;quot; for the thread running the application.&lt;br /&gt;
&#039;&#039;&#039;Terminal output&#039;&#039;&#039; refers to the print destination defined by the &amp;lt;var&amp;gt;IODEV&amp;lt;/var&amp;gt; for the thread.&lt;br /&gt;
&lt;br /&gt;
For example, the terminal output of an IODEV=7 (VTAM) terminal user is the user&#039;s 3270-style terminal; the&lt;br /&gt;
terminal output of an IODEV=29 (IFDIAL, or BATCH2) user is the MVS batch program that retrieves the output lines.&lt;br /&gt;
&lt;br /&gt;
The terminal output of an &amp;lt;var&amp;gt;[[Sdaemons|Sdaemon]]&amp;lt;/var&amp;gt; thread (usually IODEV=15) depends on how the &amp;lt;var&amp;gt;Sdaemon&amp;lt;/var&amp;gt; was started:&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;COMMxx&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;If the thread was started by a Sirius $COMMxx function, the output can be saved in a [[$lists|$list]] that can be processed by the $COMMxx caller. &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;Janus SDS, OPENSERV, or SRVSOCK&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;For an [[JANUS DEFINE#type|SDS, OPENSERV, or SRVSOCK]] thread, the audit trail is used as the terminal output. For these port types, messages during compilation are always sent to the audit trail. For other types of print output, the &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;AUDTERM&amp;lt;/var&amp;gt; or &amp;lt;var&amp;gt;NOAUDTERM&amp;lt;/var&amp;gt; parameter controls whether the terminal output is sent to the audit trail (&amp;lt;var&amp;gt;AUDTERM&amp;lt;/var&amp;gt;) or simply discarded (&amp;lt;var&amp;gt;NOAUDTERM&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;Janus Web&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;For a &amp;lt;var&amp;gt;[[JANUS DEFINE#type|WEB]]&amp;lt;/var&amp;gt; thread, the terminal output can either be the browser (if &amp;lt;var&amp;gt;[[$Web_On]]&amp;lt;/var&amp;gt; is in effect) or the audit trail (if &amp;lt;var&amp;gt;[[$Web_Off]]&amp;lt;/var&amp;gt; is in effect), although &amp;lt;var&amp;gt;NOAUDTERM&amp;lt;/var&amp;gt; prevents non-compiler print lines from appearing on the audit trail, as with other Janus server threads. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As stated, $COMMxx can be used to process print output, since the &amp;lt;var&amp;gt;Sdaemon&amp;lt;/var&amp;gt; doing its work can place print output in a Sirius $list.&lt;br /&gt;
There are also facilities for processing print output on any kind of&lt;br /&gt;
thread, including other &amp;lt;var&amp;gt;Sdaemon&amp;lt;/var&amp;gt; threads, and 3270 and &amp;lt;var&amp;gt;IFDIAL&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;BATCH204&amp;lt;/var&amp;gt; threads:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;[[$List_Capture]]&amp;lt;/var&amp;gt; function directs print output to a $list.&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; function directs print output to a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; connection.&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;USE&amp;lt;/var&amp;gt; command directs print output to a &amp;lt;var&amp;gt;USE&amp;lt;/var&amp;gt; stream.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the above three facilities, &amp;quot;interactive&amp;quot; output is not sent to the $list, the socket,&lt;br /&gt;
nor the &amp;lt;var&amp;gt;USE&amp;lt;/var&amp;gt; stream, but instead is sent to the normal terminal output.&lt;br /&gt;
The types of interactive output lines are:&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;Type&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Description&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;Messages&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Informational or error messages (for example, M204.nnnn or MSIR.nnnn) except when &amp;lt;code&amp;gt;$List_Capture(id, &#039;MSGS&#039;)&amp;lt;/code&amp;gt; in effect. &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;Prompts&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Password prompts, &amp;lt;var&amp;gt;$Read&amp;lt;/var&amp;gt; input, etc. &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;READ SCREEN&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; full-screen display for input (note that &amp;lt;var&amp;gt;Print Screen&amp;lt;/var&amp;gt; statements &#039;&#039;&#039;are subject&#039;&#039;&#039; to redirection) &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;WRITE IMAGE ON TERMINAL&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;SOUL&amp;lt;/var&amp;gt; statement for sending lines directly to the normal terminal output &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When an output line is redirected from the normal terminal output, it is directed based on the following hierarchy:&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;Type&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Conditions&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;$List_Capture&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Non-interactive print lines captured on $list, if one is active as specified to &amp;lt;var&amp;gt;$List_Capture&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;$Sock_Capture&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Non-interactive print lines captured on one or more sockets, if any are specified as &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; to &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt;, and if no $list is active as specified to &amp;lt;var&amp;gt;$List_Capture&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;$List_Capture(-1)&amp;lt;/code&amp;gt; removes any active $list capture) &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;USE stream&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Non-interactive print lines directed to a &amp;lt;var&amp;gt;USE&amp;lt;/var&amp;gt; stream, if it is active and there is no socket specified as &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; to &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;$Sock_Capture(-1, &#039;OFF&#039;)&amp;lt;/code&amp;gt; removes all socket capturing)&lt;br /&gt;
and if no $list is active as specified to &amp;lt;var&amp;gt;$List_Capture&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 nowrap&amp;gt;Normal terminal output&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Print lines are sent to the normal terminal output if none of the above print redirections are active &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some additional suggestions and considerations for the use of applications using print redirection in general and socket capturing in particular:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For output lines (non &amp;lt;var&amp;gt;SCREEN&amp;lt;/var&amp;gt; output/input)&lt;br /&gt;
that should go to the terminal, use &amp;lt;var&amp;gt;WRITE IMAGE ON TERMINAL&amp;lt;/var&amp;gt; (on server applications, where the &amp;quot;terminal&amp;quot; output is the audit trail, you can use &amp;lt;var&amp;gt;AUDIT&amp;lt;/var&amp;gt; instead). &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The &amp;lt;var&amp;gt;OUTCCC&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;OUTMRL&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;LOBUFF&amp;lt;/var&amp;gt; limits are ignored for &amp;lt;var&amp;gt;$Sock_Capture&amp;lt;/var&amp;gt;.&lt;br /&gt;
A very long print line is captured as a single &amp;quot;logical&amp;quot; line (with a single trailing &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string, as specified on the &amp;lt;var&amp;gt;[[JANUS DEFINE]]&amp;lt;/var&amp;gt; command or &amp;lt;var&amp;gt;[[$Sock_Set]]&amp;lt;/var&amp;gt; for the socket). &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Output lines sent by the &amp;quot;ellipsis&amp;quot; form of the &amp;lt;var&amp;gt;Print&amp;lt;/var&amp;gt; statement&lt;br /&gt;
(&amp;lt;code&amp;gt;PRINT &amp;lt;items&amp;gt; ...&amp;lt;/code&amp;gt;) are captured without a trailing &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string.&lt;br /&gt;
The &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string is sent at the end of the logical line (that is, &amp;lt;var&amp;gt;OUTMRL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;OUTCCC&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;LOBUFF&amp;lt;/var&amp;gt; do not cause added &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; strings to be sent). The &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; string is not translated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If the socket&#039;s &amp;lt;var&amp;gt;LINEND&amp;lt;/var&amp;gt; parameter is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; when a print line is captured, the line is simply sent without any string following it. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If the socket is set to &amp;lt;var&amp;gt;CHAR&amp;lt;/var&amp;gt;, the print line is translated using the output translation table specified&lt;br /&gt;
by the socket&#039;s &amp;lt;var&amp;gt;XTAB&amp;lt;/var&amp;gt; parameter.&lt;br /&gt;
If the socket is set to &amp;lt;var&amp;gt;BINARY&amp;lt;/var&amp;gt;, the print line is not translated. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If you want a request to continue normal evaluation if a &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt; condition is encountered on a socket,&lt;br /&gt;
use &amp;lt;code&amp;gt;$Sock_Set(socknum, &#039;ONRESET&#039;, &#039;CONTINUE&#039;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
When print capturing is attempted to an &amp;lt;var&amp;gt;ONRESET CONTINUE&amp;lt;/var&amp;gt; socket, and the socket is&lt;br /&gt;
&amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;, &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Janus Sockets&amp;lt;/var&amp;gt; simply acts as if the print was captured and continues. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If &amp;lt;var&amp;gt;CONTINUE&amp;lt;/var&amp;gt; is not in effect for a &amp;lt;var&amp;gt;CAPTURE ON SOCKET&amp;lt;/var&amp;gt; that is &amp;lt;code&amp;gt;RESET&amp;lt;/code&amp;gt;,&lt;br /&gt;
a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;User Language&amp;lt;/var&amp;gt; print operation will jump&lt;br /&gt;
to the &amp;lt;code&amp;gt;ONRESET&amp;lt;/code&amp;gt; label if one is active, or else the&lt;br /&gt;
request is cancelled (and any &amp;lt;var&amp;gt;APSY&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;ERROR&amp;lt;/var&amp;gt; procedure is evaluated).&lt;br /&gt;
In this case, &amp;lt;var&amp;gt;[[$Sock_ErrInfo]]&amp;lt;/var&amp;gt; returns -1 for &amp;lt;code&amp;gt;CODE&amp;lt;/code&amp;gt;, and it returns the string&lt;br /&gt;
&amp;lt;code&amp;gt;Captured print&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;FUN&amp;lt;/code&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: Janus Sockets $functions]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$SubRep&amp;diff=116952</id>
		<title>$SubRep</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$SubRep&amp;diff=116952"/>
		<updated>2018-09-20T23:29:43Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$SubRep}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Replace occurrences of string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The recommended OO replacement function for $SubRep is &amp;lt;var&amp;gt;[[Replace (String function)|Replace]]&amp;lt;/var&amp;gt;. (See the [[#Usage notes|Usage notes]] below.) &amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function replaces occurrences of a substring in one string with another. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&amp;gt; function accepts five arguments and returns a string result that is part of the first argument string. &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;%string&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$SubRep&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;repstring&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;start_pos&amp;lt;/span&amp;gt;], [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;count&amp;lt;/span&amp;gt;])&lt;br /&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;%string&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The part of the first argument string that remains after the replacements of &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/span&amp;gt; by &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;repstring&amp;lt;/span&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 arbitrary 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;substring&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary string located in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; argument value. &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;repstring&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A replacement 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;start_pos&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A starting position in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; argument string. This optional argument defaults to 1. &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;count&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A repeat count indicating the number of occurrences to be replaced. This optional argument defaults to 1. &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;As stated above, the recommended OO replacement function for &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;[[Replace (String function)|Replace]]&amp;lt;/var&amp;gt;. However, unlike &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;Replace&amp;lt;/var&amp;gt; is Longstring capable (like all OO methods), so:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Both &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;Replace&amp;lt;/var&amp;gt; have an optional argument for the count of substrings to replace, but their defaults differ: for &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&amp;gt; it is 1; &amp;lt;var&amp;gt;Replace&amp;lt;/var&amp;gt; replaces all instances of the substring. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;It is possible that an application using &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&amp;gt; is unintentionally using &amp;quot;silent truncation,&amp;quot; which will become noticable if you replace it with &amp;lt;var&amp;gt;Replace&amp;lt;/var&amp;gt;; see the discussion in [[Longstrings]]. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Do not&#039;&#039;&#039; replace &amp;lt;var&amp;gt;Replace&amp;lt;/var&amp;gt; with &amp;lt;var&amp;gt;$SubRep&amp;lt;/var&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;If the substitution would cause the result value to exceed 255 characters, it is not performed. &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;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;code&amp;gt;XYCDABAB&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubRep(&#039;ABCDABAB&#039;, &#039;AB&#039;, &#039;XY&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;code&amp;gt;XYCDXYXY&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubRep(&#039;ABCDABAB&#039;, &#039;AB&#039;, &#039;XY&#039;, ,5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;code&amp;gt;ABCDXYXY&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubRep(&#039;ABCDABAB&#039;, &#039;AB&#039;, &#039;XY&#039;, 3 ,5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;b id=&amp;quot;auth&amp;quot;&amp;gt;&amp;lt;/b&amp;gt;Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$SubRep]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$SubIns&amp;diff=116951</id>
		<title>$SubIns</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$SubIns&amp;diff=116951"/>
		<updated>2018-09-20T23:29:43Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$SubIns}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Insert string inside another string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $SubIns function is &amp;lt;var&amp;gt;[[Insert (String function)|Insert]]&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function inserts a string inside another. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$SubIns&amp;lt;/var&amp;gt; function accepts three arguments and returns a string result. &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;%string&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$SubIns&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ins_string&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;insert_pos&amp;lt;/span&amp;gt;)&lt;br /&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;%string&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The string result that is a combination of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ins_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;string&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary 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;ins_string&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A string to be inserted in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; value. &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;insert_pos&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The insertion position in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; argument string.&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;If no insertion position is provided, the insertion string is appended to the end of the first input string. If the insertion point is past the first input string, the first input string is left unmodified. &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;This statement sets %JUNK to &amp;lt;code&amp;gt;PAT STAMPER, TRADER HORSE&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubIns(&#039;PAT STAMPER, TRADER&#039;, &#039; HORSE&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;code&amp;gt;PAT STAMPER, HORSE TRADER&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubIns(&#039;PAT STAMPER, TRADER&#039;, &#039; HORSE&#039;, 12)&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;code&amp;gt;PAT STAMPER, TRADER&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubIns(&#039;PAT STAMPER, TRADER&#039;, &#039; HORSE&#039;, 92)&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;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$SubIns]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$SubErs&amp;diff=116950</id>
		<title>$SubErs</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$SubErs&amp;diff=116950"/>
		<updated>2018-09-20T23:29:42Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$SubErs}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Remove occurrence of one string from another&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $SubErs function is the &amp;lt;var&amp;gt;[[Remove (String function)|Remove]]&amp;lt;/var&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function removes an occurrence of one string from another. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$SubErs&amp;lt;/var&amp;gt; function accepts four arguments and returns a string result that is part of the first argument string. &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;%string&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$SubErs&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;start_pos&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;count&amp;lt;/span&amp;gt;])&lt;br /&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;%string&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The part of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/var&amp;gt; argument that remains after &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/var&amp;gt; is removed from it.&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 arbitrary 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;substring&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Another arbitrary 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;start_pos&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A starting position within &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;count&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;A repeat count indicating the number of occurrences of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/var&amp;gt; to be removed. This is an optional argument, and it defaults to 1.&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;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;tt&amp;gt;CDABAB&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubErs(&#039;ABCDABAB&#039;, &#039;AB&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;tt&amp;gt;WE WAITED LONG ENOUGH&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubErs(&#039;WE HAVE WAITED LONG ENOUGH&#039;, &#039;HAVE &#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;tt&amp;gt;WE HAVE AITED LONG ENOUGH&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubErs(&#039;WE HAVE WAITED LONG ENOUGH&#039;, &#039;W&#039;, 5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This statement sets %JUNK to &amp;lt;tt&amp;gt;E HAVE AITED LONG ENOUGH&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubErs(&#039;WE HAVE WAITED LONG ENOUGH&#039;, &#039;W&#039;, 1, 5)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$SubErs]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$SubCnt&amp;diff=116949</id>
		<title>$SubCnt</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$SubCnt&amp;diff=116949"/>
		<updated>2018-09-20T23:29:41Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$SubCnt}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Count occurrences of one string in another&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $SubCnt function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function counts the occurrences of one string in another. &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;%count&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$SubCnt&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/span&amp;gt;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&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;%count&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The count of occurrences of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;substring&amp;lt;/var&amp;gt; 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;string&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary 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;substring&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Another arbitrary string.&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 statement would set %JUNK to 3:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubCnt(&#039;ABCDABAB&#039;, &#039;AB&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This statement would set %JUNK to 0:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubCnt(&#039;WE HAVE WAITED LONG ENOUGH&#039;, &#039;WEHAVE&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And this statement would set %JUNK to 4:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%JUNK = $SubCnt(&#039;WE HAVE WAITED LONG ENOUGH&#039;, &#039;E&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$SubCnt]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$StrXor&amp;diff=116948</id>
		<title>$StrXor</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$StrXor&amp;diff=116948"/>
		<updated>2018-09-20T23:28:51Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$StrXor}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Bit-wise exclusive OR two strings&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StrXor function is &amp;lt;var&amp;gt;[[BitXorString (String function)|BitXorString]]&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function performs a bit-wise exclusive OR of two strings. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$StrXor&amp;lt;/var&amp;gt; function accepts three arguments and returns a string result that is the bit-wise exclusive OR of the first two arguments, the shorter being padded with as many copies of the third argument as are required to make the string lengths equal. &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;%STR&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$StrXor&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string2&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;pad&amp;lt;/span&amp;gt;])&lt;br /&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;%str&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The bit-wise AND of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string1&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string2&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;string1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary 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;string2&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Another arbitrary 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;pad&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary string that is appended to the shorter of the first two strings and replicated as many times as required to make the strings of equal length. If this value is not specified or is null, it defaults to a single null byte (X&#039;00&#039;).&lt;br /&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;
==Examples==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This code fragment would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;746112445566&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%Y = $X2C(&#039;654321&#039;)&lt;br /&gt;
%junk = $StrXor(%X, %Y)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;These statements would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;DDEEFF8899AA&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%junk = $StrXor(%X, , $X2C(&#039;CC&#039;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This code fragment would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;0000CC44AA66&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%Y = $X2C(&#039;1122&#039;)&lt;br /&gt;
%Z = $X2C(&#039;FF00&#039;)&lt;br /&gt;
%junk = $StrXor(%X, %Y, %Z)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$StrXor]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$StrOr&amp;diff=116947</id>
		<title>$StrOr</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$StrOr&amp;diff=116947"/>
		<updated>2018-09-20T23:28:50Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$StrOr}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Bit-wise OR two strings&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StrOr function is the [[BitOrString (String function)]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function performs a bit-wise OR of two strings. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$StrOr&amp;lt;/var&amp;gt; function accepts three arguments and returns a string result that is the bit-wise OR of the first two arguments, the shorter being padded with as many copies of the third argument as are required to make the string lengths equal. &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;%STR&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$StrOr&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string2&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;pad&amp;lt;/span&amp;gt;])&lt;br /&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;%str&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The bit-wise AND of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string1&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;string2&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;string1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary 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;string2&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Another arbitrary 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;pad&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary string that is appended to the shorter of the first two strings and replicated as many times as required to make the strings of equal length. If this value is not specified or is null, it defaults to a single null byte (X&#039;00&#039;).&lt;br /&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;
==Examples==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This code fragment would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;756333445566&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%Y = $X2C(&#039;654321&#039;)&lt;br /&gt;
%junk = $StrOr(%X, %Y)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;These statements would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;DDEEFFCCDDEE&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%junk = $StrOr(%X, , $X2C(&#039;CC&#039;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This code fragment would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;1122FF44FF66&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%Y = $X2C(&#039;1122&#039;)&lt;br /&gt;
%Z = $X2C(&#039;FF00&#039;)&lt;br /&gt;
%junk = $StrOr(%X, %Y, %Z)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$StrOr]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$StrAnd&amp;diff=116946</id>
		<title>$StrAnd</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$StrAnd&amp;diff=116946"/>
		<updated>2018-09-20T23:28:49Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$StrAnd}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Bit-wise AND two strings&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StrAnd function is &amp;lt;var&amp;gt;[[BitAndString (String function)|BitAndString]]&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function performs a bit-wise AND of two strings. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$StrAnd&amp;lt;/var&amp;gt; function accepts three arguments and returns a string result that is the bit-wise AND of the first two arguments, the shorter being padded with as many copies of the third argument as are required to make the string lengths equal. &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;%str&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$StrAnd&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string2&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;pad&amp;lt;/span&amp;gt;])&lt;br /&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;%str&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The bit-wise AND of &#039;&#039;string1&#039;&#039; and &#039;&#039;string2&#039;&#039;.&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;string1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary 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;string2&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Another arbitrary 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;pad&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;An arbitrary string that is appended to the shorter of the first two strings and replicated as many times as required to make the strings of equal length. If this value is not specified or is null, it defaults to a single null byte (X&#039;00&#039;).&lt;br /&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;
==Examples==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;This code fragment would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;010221000000&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%Y = $X2C(&#039;654321&#039;)&lt;br /&gt;
%junk = $StrAnd(%X, %Y)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;These statements would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;000000444444&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%junk = $StrAnd(%X, , $X2C(&#039;CC&#039;))&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;This code fragment would set &amp;lt;code&amp;gt;%junk&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;X&#039;112233005500&#039;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $X2C(&#039;112233445566&#039;)&lt;br /&gt;
%Y = $X2C(&#039;1122&#039;)&lt;br /&gt;
%Z = $X2C(&#039;FF00&#039;)&lt;br /&gt;
%junk = $StrAnd(%X, %Y, %Z)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$StrAnd]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Str&amp;diff=116945</id>
		<title>$Str</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Str&amp;diff=116945"/>
		<updated>2018-09-20T23:28:48Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Str}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Treat a longstring as string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $Str function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function takes a longstring input and produces a string output, silently truncating the result at 255 bytes or shorter if the target is shorter. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Str&amp;lt;/var&amp;gt; function accepts one argument and returns a string result that is the first argument truncated at the $function target&#039;s length. &lt;br /&gt;
&lt;br /&gt;
The first argument is an arbitrary string.&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;%str&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Str&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;longstring&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;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%str&amp;lt;/var&amp;gt; is up to the first 255 bytes of &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;longstring&amp;lt;/var&amp;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 main utility of the &amp;lt;var&amp;gt;$Str&amp;lt;/var&amp;gt; function is to prevent the request cancellation that would result from a direct assignment from a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt; value to a &amp;lt;var&amp;gt;String&amp;lt;/var&amp;gt; %variable that is too small to hold the entire value. While the input to &amp;lt;var&amp;gt;$Str&amp;lt;/var&amp;gt; could be a regular &amp;lt;var&amp;gt;String&amp;lt;/var&amp;gt;, this doesn&#039;t really make much sense since a regular &amp;lt;var&amp;gt;String&amp;lt;/var&amp;gt; can be assigned to a regular &amp;lt;var&amp;gt;String&amp;lt;/var&amp;gt; without request cancellation for truncation, anyway.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
A &amp;lt;var&amp;gt;$Str&amp;lt;/var&amp;gt; would upgrade an argument With expression to a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt; With expression, but this is again rather silly as the result would then simply be truncated at 255 bytes if it exceeds 255 bytes.&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Str&amp;lt;/var&amp;gt; also makes sense as a quick shorthand for the first 255 bytes of a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;, even if the target is a &amp;lt;var&amp;gt;Longstring&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Str]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$StatLD&amp;diff=116944</id>
		<title>$StatLD</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$StatLD&amp;diff=116944"/>
		<updated>2018-09-20T23:28:48Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$StatLD}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Calculate differences and rates for statistics $lists&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StatLD function is the [[UserStatistics class]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows calculation of differences and rates for statistics $lists. These statistics $lists must be in a format identical to $lists produced by &amp;lt;var&amp;gt;$CfStatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$FiStatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$TkStatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$SsStatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$UsStatL&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$JpStatL&amp;lt;/var&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$StatLD&amp;lt;/var&amp;gt; function accepts six arguments and returns a numeric error code. &lt;br /&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;%result&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$StatLD&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;list1_id&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;list2_id&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;list3_id&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;action_list&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;divisor&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;prelen&amp;lt;/span&amp;gt;)&lt;br /&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;%result&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;Either 0 or a negative error code.&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;list1_id&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The identifier of a $list where each item contains an EBCDIC identifier in bytes 1-10, a binary number in bytes 11-12, and data in bytes 13 to the end of the $list item. &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;list2_id&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The identifier of a $list where each item contains an EBCDIC identifier in bytes 1-10, a binary number in bytes 11-12, and data in bytes 13 to the end of the $list item. &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;list3_id&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The identifier of an output $list. The contents of this $list are deleted and replaced by the differences between the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list1_id&amp;lt;/var&amp;gt; $list and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list2_id&amp;lt;/var&amp;gt; $list. &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;action_list&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A control string containing blank-delimited tokens describing the action to be performed for each 4-byte chunk of the input $list items. The available actions are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;N&#039; - Number. Simply copy 4 bytes from the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list2_id&amp;lt;/var&amp;gt; argument. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;D&#039; - Difference. Calculate binary difference between 4 bytes in &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list2_id&amp;lt;/var&amp;gt; and &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list1_id&amp;lt;/var&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;li&amp;gt;&#039;R&#039; - Rate. Calculate binary difference between 4 bytes in argument 2 and argument 1, multiply by 1,000,000, then divide by the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;divisor&amp;lt;/var&amp;gt; argument.  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&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;divisor&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A number to be used as a divisor in calculating rates. This optional argument is required if there is an &amp;lt;code&amp;gt;R&amp;lt;/code&amp;gt; in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;action_list&amp;lt;/var&amp;gt; argument. This would ordinarily be the elapsed time between calculation of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list1_id&amp;lt;/var&amp;gt; argument and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;list2_id&amp;lt;/var&amp;gt; argument.&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;pre_len&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A number of characters at the beginning of the output list (parameter 3) reserved for the name of the monitored entity.  Should be set to 30 when monitoring Janus ports, and to 10 (the default) for all other entities.&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 data returned into the output $list by &amp;lt;var&amp;gt;$StatLD&amp;lt;/var&amp;gt; is binary, with the first 12 bytes matching the first 12 bytes of an item in the second $list that matches one in the first list. Any item in the second $list that has the high order bit of byte 11 on (set to flag exclusion by a selection criterion on &amp;lt;var&amp;gt;$FistatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$TkstatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$SsStatL&amp;lt;/var&amp;gt;, or &amp;lt;var&amp;gt;$UsStatL&amp;lt;/var&amp;gt;) is excluded from the new $list. The actual difference data starts at offset 12 (byte number 13) in the result $list items.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return codes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; -3 - CCATEMP is full (if LISTFC &amp;lt;var&amp;gt;$SirParm&amp;lt;/var&amp;gt; parameter not set)&lt;br /&gt;
 -5 - Required parameter not specified&lt;br /&gt;
 -6 - Invalid $list identifier&lt;br /&gt;
-12 - Invalid control string&lt;br /&gt;
-13 - Invalid rate divisor&lt;br /&gt;
-14 - Invalid length $list item&lt;br /&gt;
&amp;lt;/p&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 program displays every user&#039;s CPU usage as a rate over one second interval and as a total over the whole run.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Begin&lt;br /&gt;
%i is float&lt;br /&gt;
%list1 is float&lt;br /&gt;
%list2 is float&lt;br /&gt;
%list3 is float&lt;br /&gt;
%time1 is float&lt;br /&gt;
%time2 is float&lt;br /&gt;
%rc is float&lt;br /&gt;
%data is string len 255&lt;br /&gt;
 &lt;br /&gt;
%list1 = $ListNew&lt;br /&gt;
%list2 = $ListNew&lt;br /&gt;
%list3 = $ListNew&lt;br /&gt;
 &lt;br /&gt;
%time1 = $UsStatL(%list1, &#039;IODEV CPU&#039;)&lt;br /&gt;
Pause 1&lt;br /&gt;
%time2 = $UsStatL(%list2, &#039;IODEV CPU&#039;)&lt;br /&gt;
%rc = $StatLD(%list1, %list2, %list3, &#039;N N&#039;, %time2 - %time1)&lt;br /&gt;
 &lt;br /&gt;
For %i from 1 to $ListCnt(%list3)&lt;br /&gt;
   %data = $ListInf(%list3, %i)&lt;br /&gt;
   Text&lt;br /&gt;
      userid = { $substr(%data,1,10) } -&lt;br /&gt;
      usernum = { $unbin($substr(%data,11,2)) } -&lt;br /&gt;
      iodev = { $unbin($substr(%data,13,4)) } -&lt;br /&gt;
      cpu total = { $unbin($substr(%data,17,4)) }&lt;br /&gt;
   End Text&lt;br /&gt;
End For&lt;br /&gt;
End&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 statistics collection functions (&amp;lt;var&amp;gt;$FiStatL&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$SSStatL&amp;lt;/var&amp;gt;, etc.) have a parameter that lets you subset the list of entities to be viewed. But those functions always return the full list of entities. To view the subsetted list, the collected statistics need to be run through &amp;lt;var&amp;gt;$StatLD&amp;lt;/var&amp;gt;. This example demonstrates the technique:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;begin                                         &lt;br /&gt;
%al1   is float                               &lt;br /&gt;
%al2   is float                               &lt;br /&gt;
%al3   is float                               &lt;br /&gt;
%error is float                               &lt;br /&gt;
%rc    is float                               &lt;br /&gt;
%z     is float                               &lt;br /&gt;
                                              &lt;br /&gt;
%an       is string len 20 array (20)         &lt;br /&gt;
%file     is string len 20                    &lt;br /&gt;
%restrict is string len 20                    &lt;br /&gt;
%file     = &#039;SIRLOCAL&#039;                        &lt;br /&gt;
                                              &lt;br /&gt;
%al1 = $listNew                               &lt;br /&gt;
%al2 = $listNew                               &lt;br /&gt;
%al3 = $listNew                               &lt;br /&gt;
%restrict  = &#039;FILE=&#039; with %file               &lt;br /&gt;
%rc        = $ssstatl(%al1,&#039;STATUS&#039;,%RESTRICT)&lt;br /&gt;
%rc        = $ssstatl(%al2,&#039;STATUS&#039;,%RESTRICT)&lt;br /&gt;
%rc        = $STATLD(%al1,%al2,%al3,&#039;N N&#039;)    &lt;br /&gt;
for %z from 1 to $listCnt(%al3)               &lt;br /&gt;
   %an(%z) = $deBlank($listInf(%al3,%Z,1,10)) &lt;br /&gt;
   printText {%an(%z)}                        &lt;br /&gt;
end for                                       &lt;br /&gt;
%al1 = $listDel                               &lt;br /&gt;
%al2 = $listDel                               &lt;br /&gt;
%al3 = $listDel                               &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
The example shows a set of subsystem statistics collected by &amp;lt;var&amp;gt;$SsStatL&amp;lt;/var&amp;gt;, limited to only those subsystems with file &amp;lt;code&amp;gt;SIRLOCAL&amp;lt;/code&amp;gt; open. The statistics are collected twice, into lists &amp;lt;code&amp;gt;%al1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%al2&amp;lt;/code&amp;gt;, and then run through &amp;lt;var&amp;gt;$StatLD&amp;lt;/var&amp;gt; to produce list &amp;lt;code&amp;gt;%al3&amp;lt;/code&amp;gt;. $List &amp;lt;code&amp;gt;%al3&amp;lt;/code&amp;gt; shows the selected subset. &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[SirMon]] &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$StatLD]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$StatD&amp;diff=116943</id>
		<title>$StatD</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$StatD&amp;diff=116943"/>
		<updated>2018-09-20T23:28:47Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$StatD}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Calculate differences and rates for statistics strings&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $StatD function is the [[UserStatistics class]].&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows calculation of differences and rates for statistics strings. These statistics strings must be in a format identical to strings produced by &amp;lt;var&amp;gt;$FISTAT&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$SYSTAT&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$TKSTAT&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;$SsStat&amp;lt;/var&amp;gt;, and &amp;lt;var&amp;gt;$UsStat&amp;lt;/var&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$StatD&amp;lt;/var&amp;gt; function accepts four arguments and returns a string made up of an error code and returned statistics. &lt;br /&gt;
&lt;br /&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;%string&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$StatD&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;stat_string1&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;stat_string2&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;ctl_string&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;divisor&amp;lt;/span&amp;gt;])&lt;br /&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;%string&amp;lt;/th&amp;gt; &lt;br /&gt;
&amp;lt;td&amp;gt;The returned string consists of binary data, the first 4 bytes of which is an error code. If the error code is negative, &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%string&amp;lt;/var&amp;gt; will only be 4 bytes long.&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;stat_string1&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This string contains an EBCDIC identifier in bytes 1-10, a binary number in bytes 11-12, and data in bytes 13 to the end of the 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;stat_string2&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This string contains an EBCDIC identifier in bytes 1-10, a binary number in bytes 11-12, and data in bytes 13 to the end of the string. For differences to be calculated, bytes 1-12 must match bytes 1-12 of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;stat_string1&amp;lt;/var&amp;gt; argument. &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;ctl_string&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This control string contains blank-delimited tokens describing the action to be performed for each 4 byte chunk of the input strings. The available actions are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;N&#039; - stands for number. Simply copy 4 bytes from argument 2. &lt;br /&gt;
&amp;lt;li&amp;gt;&#039;D&#039; - stands for difference. Calculate binary difference between 4 bytes in argument 2 and argument 1. &lt;br /&gt;
&amp;lt;li&amp;gt;&#039;R&#039; - stands for rate. Calculate binary difference between 4 bytes in argument 2 and argument 1, multiply by 1,000,000 and then divide by argument 4. Argument 4 is required if an R is included in the control string.&lt;br /&gt;
&amp;lt;/ul&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;divisor&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;This a number to be used as a divisor in calculating rates. This optional argument is required if there is an &#039;R&#039; in the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;ctl_string&amp;lt;/var&amp;gt; argument. This would ordinarily be the elapsed time between calculation of the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;stat_string1&amp;lt;/var&amp;gt; and the &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;stat_string2&amp;lt;/var&amp;gt; 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;
===Return codes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; -5 - Required parameter not specified&lt;br /&gt;
-12 - Invalid control string&lt;br /&gt;
-13 - Invalid rate divisor&lt;br /&gt;
-14 - Invalid length input string&lt;br /&gt;
-15 - First 12 bytes don&#039;t match in input&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 data returned by &amp;lt;var&amp;gt;$StatD&amp;lt;/var&amp;gt; is binary with the first 4 bytes containing an error code. If the error code is negative, only 4 bytes are returned. If the differences were successfully calculated, the first 4 bytes are set to binary 0. When a zero error code is returned, the next 12 bytes contain a copy of the first 12 bytes of argument 1 and 2. This means that the actual data starts at offset 16 (byte number 17) in the result string.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following program displays system CPU as a rate and difference over a one second interval and as a total over the whole run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;Begin                                                        &lt;br /&gt;
%data  is string len 255                                   &lt;br /&gt;
%data1 is string len 255                                   &lt;br /&gt;
%data2 is string len 255                                   &lt;br /&gt;
%data1 = $SyStat(&#039;CPU SVIO DNSCACHE DNSRTIMO&#039;):subString(5)&lt;br /&gt;
pause 1                                                    &lt;br /&gt;
%data2 = $SyStat(&#039;CPU SVIO DNSCACHE DNSRTIMO&#039;):subString(5)&lt;br /&gt;
%data = $statD( %data1, %data2, &#039;R R N N&#039;, 1000)           &lt;br /&gt;
Text                                                       &lt;br /&gt;
 %data                                                      &lt;br /&gt;
 Return Code = {$UnBin($subStr(%data,1,4))}                 &lt;br /&gt;
 CPU         = {$UnBin($SUBSTR(%data,17,4))}                &lt;br /&gt;
 SVIO        = {$UnBin($SUBSTR(%data,21,4))}                &lt;br /&gt;
 DNSCACHE    = {$UnBin($SUBSTR(%data,25,4))}                &lt;br /&gt;
 DNSRTIMO    = {$UnBin($SUBSTR(%data,29,4))}                &lt;br /&gt;
end Text                                                   &lt;br /&gt;
End                                                          &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[SirMon]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$StatD]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sir_Wild&amp;diff=116942</id>
		<title>$Sir Wild</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sir_Wild&amp;diff=116942"/>
		<updated>2018-09-20T23:27:43Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sir_Wild}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Test string against a wildcard string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Sir_Wild function is the &amp;lt;var&amp;gt;[[RegexMatch (String function)|RegexMatch]]&amp;lt;/var&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var&amp;gt;$Sir_Wild&amp;lt;/var&amp;gt; indicates whether the one string matches a Sirius-style pattern where asterisk (&amp;lt;tt&amp;gt;*&amp;lt;/tt&amp;gt;) matches any set of characters, question mark (&amp;lt;tt&amp;gt;?&amp;lt;/tt&amp;gt;) matches any single character, and double-quotation mark (&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt;) indicates that the following character is to be treated as a literal even if it is one of the three special wildcard characters: &amp;lt;code&amp;gt;* ? &amp;quot;&amp;lt;/code&amp;gt;. &amp;lt;var&amp;gt;$Sir_Wild&amp;lt;/var&amp;gt; takes two string arguments and returns either a 0 or 1. &lt;br /&gt;
&lt;br /&gt;
The first argument is the string to be tested for a match. This is an optional argument and defaults to null. &lt;br /&gt;
&lt;br /&gt;
The second argument is the string, possibly containing wildcards, against which the first argument is to be tested. This is an optional argument and defaults to null.&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;%rc&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Sir_Wild&amp;lt;/span&amp;gt;([&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;string&amp;lt;/span&amp;gt;], [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;wildcard&amp;lt;/span&amp;gt;])&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/var&amp;gt; is set to 0 or 1.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&amp;lt;var&amp;gt;$Sir_Wild&amp;lt;/var&amp;gt; returns either a 1 indicating that the first string matches the second or 0 otherwise. For example, this returns 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; $Sir_Wild(&#039;Ahab&#039;, &#039;A*&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns 0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; $Sir_Wild(&#039;Starbuck&#039;, &#039;A*&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This returns 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; $Sir_Wild(&#039;*LOOK&#039;, &#039;&amp;quot;*LOO?&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Sir_Wild]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sir_N2Date&amp;diff=116941</id>
		<title>$Sir N2Date</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sir_N2Date&amp;diff=116941"/>
		<updated>2018-09-20T23:27:43Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sir_N2Date}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Convert datetime number of seconds/300 to string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $Sir_N2Date function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Sir_N2Date&amp;lt;/var&amp;gt; function expects a numeric datetime argument containing a number of seconds/300 since January 1, 1900, and a datetime format string. It returns the date represented by the first argument, in the format corresponding to the second argument. &amp;lt;var&amp;gt;$Sir_N2Date&amp;lt;/var&amp;gt; accepts an optional error control string and returns the null string if an error is detected.&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;%dat&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;= $Sir_N2Date(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fmt&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;errctl&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&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;%dat&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to the datetime value string, using format specified by &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fmt&amp;lt;/var&amp;gt;, corresponding to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/var&amp;gt;, unless an error is detected.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;datn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Datetime number containing a signed number of seconds/300 since January 1, 1900.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;fmt&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Datetime format string. Refer to [[Datetime string formats|&amp;quot;Datetime string formats&amp;quot;]] for an explanation of valid datetime formats and valid datetime values.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;errctl&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Optional error control string; refer to [[Datetime string formats#Datetime error handling|&amp;quot;Datetime error handling&amp;quot;]].&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 inverse of this $function is &amp;lt;var&amp;gt;[[$Sir_Date2N]]&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sir_N2Date&amp;lt;/var&amp;gt; returns a null string in the following cases (see the discussion in [[Datetime string formats#Datetime error handling|&amp;quot;Datetime error handling&amp;quot;]]):&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;fmt&amp;lt;/var&amp;gt; is not a valid datetime format.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/var&amp;gt; out of range.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following fragment prints the string &amp;lt;code&amp;gt;07/31/84&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%x = $Sir_Date2N(&#039;8407301230&#039;, &#039;YYMMDDHHMI&#039;)&lt;br /&gt;
&amp;amp;#42; Add 15 hours:&lt;br /&gt;
%x = %x + 300 * 60 * 60 * 15&lt;br /&gt;
Print $Sir_N2Date(%X, &#039;MM/DD/YY&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://m204wiki.rocketsoftware.com/images/d/d6/Ul2krNew.pdf Sir2000 User Language Tools]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Sir_N2Date]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sir_NS2Date&amp;diff=116940</id>
		<title>$Sir NS2Date</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sir_NS2Date&amp;diff=116940"/>
		<updated>2018-09-20T23:27:42Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sir_NS2Date}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Convert datetime number of seconds to string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Sir_NS2Date function is &amp;lt;var&amp;gt;[[SecondsToString (Float function)|SecondsToString]]&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Sir_NS2Date&amp;lt;/var&amp;gt; function expects a numeric datetime argument containing a number of seconds since January 1, 1900, and a datetime format string. It returns the date represented by the first argument, in the format corresponding to the second argument. &amp;lt;var&amp;gt;$Sir_NS2Date&amp;lt;/var&amp;gt; accepts an optional error control string and returns the null string if an error is detected.&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;%dat&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;= $Sir_NS2Date(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fmt&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;errctl&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&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;%dat&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to the datetime value string, using format specified by &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fmt&amp;lt;/var&amp;gt;, corresponding to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/var&amp;gt;, unless an error is detected.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;datn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Datetime number containing a signed number of seconds since January 1, 1900.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;fmt&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Datetime format string. Refer to [[Datetime string formats|&amp;quot;Datetime string formats&amp;quot;]] for an explanation of valid datetime formats and valid datetime values.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;errctl&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Optional error control string; refer to [[Datetime string formats#Datetime error handling|&amp;quot;Datetime error handling&amp;quot;]].&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following fragment prints the string &amp;lt;tt&amp;gt;07/31/84&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%X = $Sir_Date2NS(&#039;8407301230&#039;, &#039;YYMMDDHHMI&#039;)&lt;br /&gt;
&amp;amp;#42; Add 15 hours:&lt;br /&gt;
%X = %X + 60 * 60 * 15&lt;br /&gt;
PRINT $Sir_NS2Date(%X, &#039;MM/DD/YY&#039;)&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 inverse of this $function is &amp;lt;var&amp;gt;[[$Sir_Date2NS]]&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sir_NS2Date&amp;lt;/var&amp;gt; returns a null string in the following cases: &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;fmt&amp;lt;/var&amp;gt; is not a valid datetime format.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/var&amp;gt; out of range.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://m204wiki.rocketsoftware.com/images/d/d6/Ul2krNew.pdf Sir2000 User Language Tools]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Sir_NS2Date]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Sir_ND2Date&amp;diff=116939</id>
		<title>$Sir ND2Date</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Sir_ND2Date&amp;diff=116939"/>
		<updated>2018-09-20T23:27:41Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Sir_ND2Date}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Convert datetime number of days to string&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for this $function is &amp;lt;var&amp;gt;[[DaysToString (Float function)|DaysToString]]&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Sir_ND2Date&amp;lt;/var&amp;gt; function expects a numeric datetime argument containing a number of days since January 1, 1900, and a datetime format string. It returns the date represented by the first argument, in the format corresponding to the second argument. &amp;lt;var&amp;gt;$Sir_ND2Date&amp;lt;/var&amp;gt; accepts an optional error control string and returns the null string if an error is detected.&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;%dat&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;= $Sir_ND2Date(&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;fmt&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;,&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;errctl&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;)&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/p&amp;gt;&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;%dat&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Set to the datetime value string, using format specified by &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;fmt&amp;lt;/var&amp;gt;, corresponding to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/var&amp;gt;, unless an error is detected.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;datn&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Datetime number containing a signed number of days since January 1, 1900.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;fmt&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Datetime format string. Refer to [[Datetime string formats|&amp;quot;Datetime string formats&amp;quot;]] for an explanation of valid datetime formats and valid datetime values.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;errctl&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Optional error control string; refer to [[Datetime string formats#Datetime error handling|&amp;quot;Datetime error handling&amp;quot;]].&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 inverse of this $function is &amp;lt;var&amp;gt;[[$Sir_Date2ND]]&amp;lt;/var&amp;gt;.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var&amp;gt;$Sir_ND2Date&amp;lt;/var&amp;gt; returns a null string in the following cases:&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;fmt&amp;lt;/var&amp;gt; is not a valid datetime format.&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;datn&amp;lt;/var&amp;gt; out of range.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following fragment prints the string &amp;lt;code&amp;gt;07/31/84&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%x = $Sir_Date2ND(&#039;8407301230&#039;, &#039;YYMMDDHHMI&#039;)&lt;br /&gt;
&amp;amp;#43; Add a day:&lt;br /&gt;
%x = %x + 1&lt;br /&gt;
Print $Sir_ND2Date(%X, &#039;MM/DD/YY&#039;)&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Fast/Unload User Language Interface]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JoclrNew.pdf|Janus Open Client]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:JosrvrNew.pdf|Janus Open Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Sockets]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Japanese functions&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://m204wiki.rocketsoftware.com/images/d/d6/Ul2krNew.pdf Sir2000 User Language Tools]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Sir_ND2Date]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$SetStat&amp;diff=116922</id>
		<title>$SetStat</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$SetStat&amp;diff=116922"/>
		<updated>2018-09-20T22:52:19Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$SetStat}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Set local system statistic&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. There is currently no OO equivalent for the $SetStat function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows a user to set the current value of a local system statistic. There are ten local system statistics that can be set via &amp;lt;var&amp;gt;$SetStat&amp;lt;/var&amp;gt;. These stats can be examined via &amp;lt;var&amp;gt;$SyStat&amp;lt;/var&amp;gt; under the names &amp;lt;code&amp;gt;LOCAL0&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;LOCAL9&amp;lt;/code&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;%value&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$SetStat&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;stat_num&amp;lt;/span&amp;gt;, [&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;
===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;%value&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;A variable that is set to &amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;value&amp;lt;/var&amp;gt;, the new value of the appropriate local statistic, or it is set to 0 if there is an error.&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;stat_num&amp;lt;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;The local stat number to be set. If this number is not in the range 0 through 9, &amp;lt;var&amp;gt;$SetStat&amp;lt;/var&amp;gt; performs no action and returns a 0. &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 number that indicates the value to which the local stat is to be set. This is an optional argument that defaults to 0.&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;This function can be used to initialize a local statistic. For example, this code fragment initializes local stat number 1 to 0:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;%value = $SetStat(1)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[SirMon]]&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$SetStat]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Sys_List&amp;diff=116921</id>
		<title>$Setg Sys List</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Sys_List&amp;diff=116921"/>
		<updated>2018-09-20T22:52:19Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Setg_Sys_List}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Get list of system-wide globals&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Sys_List function is &amp;lt;var&amp;gt;[[ListOfGlobals (System function)|ListOfGlobals]]&amp;lt;/var&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function returns names and values from the current set of system global variables. It may be useful in debugging situations. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;$Setg_Sys_List&amp;lt;/var&amp;gt; function accepts three arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one. &lt;br /&gt;
&lt;br /&gt;
The first argument identifies the $list to which items for the subsystem globals will be added. This is a required argument. &lt;br /&gt;
&lt;br /&gt;
The second argument is the string which is used to separate the global name from its value in each item of the output $list. This is an optional argument; if omitted, or if the null string is supplied, it defaults to a single byte with value X&#039;00&#039;. This separator value (X&#039;00&#039;) can be particularly useful for sorting the output $list; see [[$Setg_Subsys_List]] for an example with sorting. &lt;br /&gt;
&lt;br /&gt;
The third argument is a pattern string; all system global variables matching this pattern are placed on the output $list. This is an optional argument; if omitted, all system global variables are placed on the output $list.&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;%rc&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Setg_Sys_List&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;list_id&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sep&amp;lt;/span&amp;gt;], [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;glob_pat&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;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/var&amp;gt; is set to 0 or to an error indicator.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return codes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; 0 - No errors&lt;br /&gt;
-3 - No room to create $list items&lt;br /&gt;
     (if LISTFC &amp;lt;var&amp;gt;$SirParm&amp;lt;/var&amp;gt; parameter not set)&lt;br /&gt;
-6 - $List identifier invalid&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;This function can be used for debugging, to retrieve values of selected system global variables. The names global variables can be specified using the following wildcard characters:&lt;br /&gt;
&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;/th&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Matches any number of characters including none&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;Indicates that the next character must be treated literally even if it is a wildcard character.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The format of the items created by $Setg_Sys_List is as follows:&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;&amp;lt;th&amp;gt;Length&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;10&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Blanks&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;gg&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Global name&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;ss&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Separator string&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;vv&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Global value&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following request displays information about the system global variables whose names start with the string &#039;DATE&#039; or with the string &#039;EXPIRE&#039;. A single slash character (&amp;quot;/&amp;quot;) is used to separate the global name from the global value. (This example assumes that the combined length of the global name and value is less than 245.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%L FLOAT&lt;br /&gt;
%X FLOAT&lt;br /&gt;
%L = $ListNew&lt;br /&gt;
%X = $Setg_Sys_List(%L, &#039;/&#039;, &#039;DATE*&#039;)&lt;br /&gt;
&amp;amp;#42; Append more globals to $list:&lt;br /&gt;
%X = $Setg_Sys_List(%L, &#039;/&#039;, &#039;EXPIRE*&#039;)&lt;br /&gt;
FOR %X FROM 1 TO $ListCnt(%L)&lt;br /&gt;
   PRINT $ListInf(%L, %X)&lt;br /&gt;
END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&lt;br /&gt;
&amp;lt;/ul&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Setg_Sys_List]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Sys&amp;diff=116920</id>
		<title>$Setg Sys</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Sys&amp;diff=116920"/>
		<updated>2018-09-20T22:52:18Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Setg_Sys}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Set system-wide global&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Sys function is the &amp;lt;var&amp;gt;[[SetGlobal (System subroutine)|SetGlobal]]&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;System&amp;lt;/var&amp;gt; subroutine.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows a user to set the value of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; &amp;quot;global variable&amp;quot; which has a system-wide scope. These are used for the value of the $GetG function or dummy string (&amp;quot;?&amp;amp;&amp;quot;) substitution. The order in which the different scopes of global variables are searched can be controlled using &amp;lt;var&amp;gt;$SirParm&amp;lt;/var&amp;gt; arguments: for $GETG, with &#039;GETGSYS&#039;, and for dummy strings, with &#039;DUMMYSYS&#039;. &lt;br /&gt;
&lt;br /&gt;
The $Setg_Sys function accepts two arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one. &lt;br /&gt;
&lt;br /&gt;
The first argument is the name of the global variable to be set. This is an optional argument; it defaults to the null string. &lt;br /&gt;
&lt;br /&gt;
The second argument is the value to which the global variable is to be set. This is an optional argument; it defaults to the null string. &lt;br /&gt;
&lt;br /&gt;
System administrator privileges are required to invoke this $function.&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;%rc&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Setg_Sys&amp;lt;/span&amp;gt;([&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;glob_name&amp;lt;/span&amp;gt;], [&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;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/var&amp;gt; is set to 0 or to an error indicator.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return codes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;0 - No errors&lt;br /&gt;
1 - Not system administrator&lt;br /&gt;
2 - Insufficient storage&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage notes==&lt;br /&gt;
This function can be used to set a global variable which is used for all &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; users. The value can be set during &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; initialization (that is, in the CCAIN stream), so values can be calculated once, rather than coding it in the login proc of all subsystems, in which case it is calculated every time a user enters the subsystem, or rather than using some kind of &amp;quot;setup&amp;quot; subsystem that every user is forced into at user login time. For example, the following request can be run from CCAIN:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
   %X FLOAT&lt;br /&gt;
   %X = $Setg_Sys(&#039;BOSS&#039;, &#039;Mr. Homer J. Simpson&#039;)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
Then the global variable BOSS can be used to obtain the name of the latest boss. &lt;br /&gt;
&lt;br /&gt;
Also, since there is one shared system global table for the entire system, a smaller GTBL value for each user can be achieved than if the global values are set with user global variables. &lt;br /&gt;
&lt;br /&gt;
The order in which the different scopes of global variables are searched can be controlled using &amp;lt;var&amp;gt;$SirParm&amp;lt;/var&amp;gt; parameters: for $GETG, with &#039;GETGSYS&#039;, and for dummy strings, with &#039;DUMMYSYS&#039;.&lt;br /&gt;
Here is an example to show the effects of DUMMYSYS and GETGSYS; assume the following procedure is executed in the CCAIN input stream, and that there are no $Setg_Subsys invocations for the global variable named &#039;JUNK&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; BEGIN&lt;br /&gt;
 %X FLOAT&lt;br /&gt;
 %X = $Setg_Sys(&#039;JUNK&#039;, &#039;HELLO&#039;)&lt;br /&gt;
 END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and the procedure TESTIT contains the following requests:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; BEGIN&lt;br /&gt;
 %Y = $SETG(&#039;JUNK&#039;, &#039;GOODBYE&#039;)&lt;br /&gt;
 END&lt;br /&gt;
 BEGIN&lt;br /&gt;
 PRINT &#039;?&amp;amp;JUNK&#039;&lt;br /&gt;
 PRINT $GETG(&#039;JUNK&#039;)&lt;br /&gt;
 END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then here are various command streams, and their results: &lt;br /&gt;
&lt;br /&gt;
1. DUMMYSYS=0, GETGSYS=0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; BEGIN&lt;br /&gt;
 %X FLOAT&lt;br /&gt;
 %X = $SirParm(&#039;DUMMYSYS&#039;, 0)&lt;br /&gt;
 %X = $SirParm(&#039;GETGSYS&#039;, 0)&lt;br /&gt;
 END&lt;br /&gt;
 I TESTIT&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;produces the following print lines:&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 GOODBYE&lt;br /&gt;
 GOODBYE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. DUMMYSYS=0, GETGSYS=1:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; BEGIN&lt;br /&gt;
 %X FLOAT&lt;br /&gt;
 %X = $SirParm(&#039;DUMMYSYS&#039;, 0)&lt;br /&gt;
 %X = $SirParm(&#039;GETGSYS&#039;, 1)&lt;br /&gt;
 END&lt;br /&gt;
 I TESTIT&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;produces the following print lines:&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 GOODBYE&lt;br /&gt;
 HELLO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. DUMMYSYS=1, GETGSYS=0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; BEGIN&lt;br /&gt;
 %X FLOAT&lt;br /&gt;
 %X = $SirParm(&#039;DUMMYSYS&#039;, 1)&lt;br /&gt;
 %X = $SirParm(&#039;GETGSYS&#039;, 0)&lt;br /&gt;
 END&lt;br /&gt;
 I TESTIT&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;produces the following print lines:&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 HELLO&lt;br /&gt;
 GOODBYE&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. DUMMYSYS=1, GETGSYS=1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; BEGIN&lt;br /&gt;
 %X FLOAT&lt;br /&gt;
 %X = $SirParm(&#039;DUMMYSYS&#039;, 1)&lt;br /&gt;
 %X = $SirParm(&#039;GETGSYS&#039;, 1)&lt;br /&gt;
 END&lt;br /&gt;
 I TESTIT&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;produces the following print lines:&#039;&#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 HELLO&lt;br /&gt;
 HELLO&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Retrieval of system global variables is highly efficient; updates, however, are not, so use this $function appropriately. &lt;br /&gt;
&lt;br /&gt;
The current values of system globals can be retrieved using &amp;lt;var&amp;gt;$Setg_Sys_List&amp;lt;/var&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
See [[$SirParm]] for more information.&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]] &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;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Setg_Sys]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Subsys_List&amp;diff=116919</id>
		<title>$Setg Subsys List</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Subsys_List&amp;diff=116919"/>
		<updated>2018-09-20T22:52:18Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Setg_Subsys_List}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Get list of subsystem-wide globals&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Subsys_List function is the &amp;lt;var&amp;gt;[[ListOfGlobals (Subsystem function)|ListOfGlobals]]&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;Subsystem&amp;lt;/var&amp;gt; function.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function returns names and values from the current set of subsystem global variables. It may be useful in debugging situations. &lt;br /&gt;
&lt;br /&gt;
The $Setg_Subsys_List function accepts four arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one. &lt;br /&gt;
&lt;br /&gt;
The first argument identifies the $list to which items for the subsystem globals will be added. This is a required argument. &lt;br /&gt;
&lt;br /&gt;
The second argument is the string which is used to separate the global name from its value in each item of the output $list. This is an optional argument; if omitted, or if the null string is supplied, it defaults to a single byte with value X&#039;00&#039;. This separator value (X&#039;00&#039;) can be particularly useful for sorting the output $list, as shown in the example below. &lt;br /&gt;
&lt;br /&gt;
The third argument specifys the subsystem(s) whose global variables are to be examined for placement on the output $list. This argument may contain pattern matching characters. This is a required argument, and it may not be the null string. &lt;br /&gt;
&lt;br /&gt;
The fourth argument is a pattern string; all global variables in the selected subsystem(s) matching this pattern are placed on the output $list. This is an optional argument; if omitted, all variables in the subsystems specified by the third argument are placed on the output $list.&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;%rc&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Setg_Subsys_List&amp;lt;/span&amp;gt;(&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;list_id&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;sep&amp;lt;/span&amp;gt;], &amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;subsys_pat&amp;lt;/span&amp;gt;, [&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;glob_pat&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;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/var&amp;gt; is set to 0 or to an error indicator.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return codes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt; 0 - No errors&lt;br /&gt;
-3 - No room to create $list items&lt;br /&gt;
     (if LISTFC &amp;lt;var&amp;gt;$SirParm&amp;lt;/var&amp;gt; parameter not set)&lt;br /&gt;
-6 - $List identifier invalid&lt;br /&gt;
 3 - Subsystem name missing&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;This function can be used for debugging, to retrieve values of selected global variables for selected subsystems. The names of subsystems and global variables can be specified using the following wildcard characters:&lt;br /&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 number of characters including none&amp;lt;/td&amp;gt;&amp;lt;/tr&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 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;Indicates that the next character must be treated literally even if it is a wildcard character.&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The format of the items created by &amp;lt;var&amp;gt;$Setg_Subsys_List&amp;lt;/var&amp;gt; is as follows:&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;&amp;lt;th&amp;gt;Length&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;&amp;lt;var&amp;gt;10&amp;lt;/var&amp;gt;&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Subsystem name, padded on right by blanks&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;gg&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Global name&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;ss&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Separator string&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;vv&amp;lt;/th&amp;gt; &amp;lt;td&amp;gt;Global value&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
The following request displays information about the global variables whose names start with the string &#039;DATE&#039; in the subsystems whose names contain either the string &#039;AB&#039; or with the string &#039;CD&#039;. The display is sorted by subsystem name and global variable name; X&#039;00&#039; as the separator ensures this sort order.&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
  %I FLOAT&lt;br /&gt;
  %I2 FLOAT&lt;br /&gt;
  %L FLOAT&lt;br /&gt;
  %L2 FLOAT&lt;br /&gt;
  %X FLOAT&lt;br /&gt;
  %SEP STRING LEN 1&lt;br /&gt;
  %S1 STRING LEN 255&lt;br /&gt;
  %L = $ListNew&lt;br /&gt;
  %SEP = $X2C(&#039;00&#039;)&lt;br /&gt;
  %X = $Setg_Subsys_List(%L, %SEP, &#039;*AB*&#039;)&lt;br /&gt;
  * Append more globals to $list:&lt;br /&gt;
  %X = $Setg_Subsys_List(%L, %SEP, &#039;*CD*&#039;)&lt;br /&gt;
  %L2 = $ListSort(%L, &#039;1,10,A 11,255,A&#039;)&lt;br /&gt;
  PRINT &#039;Subsystem Global&#039; AND &#039;/ Value&#039; AT 33&lt;br /&gt;
  %S1 = &#039;----------&#039;&lt;br /&gt;
  PRINT %S1 AND %S1 WITH %S1 AND &#039; &#039; -&lt;br /&gt;
    AND %S1 WITH %S1&lt;br /&gt;
  FOR %X FROM 1 TO $ListCnt(%L2)&lt;br /&gt;
      %S1 = $ListInf(%L2, %X, 11)&lt;br /&gt;
      %I = $INDEX(%S1, %SEP)&lt;br /&gt;
      IF %I EQ 0 THEN&lt;br /&gt;
         %I = 256&lt;br /&gt;
      END IF&lt;br /&gt;
      %I2 = %I&lt;br /&gt;
      IF %I LT 21 THEN&lt;br /&gt;
         %S1 = $PADR($SUBSTR(%S1, 1, %I - 1), &#039; &#039;, 20)&lt;br /&gt;
         %I2 = 21&lt;br /&gt;
      END IF&lt;br /&gt;
      PRINT $ListInf(%L2, %X, 1, 10) AND -&lt;br /&gt;
            $SUBSTR(%S1, 1, %I2 - 1) AND &#039;/&#039; -&lt;br /&gt;
            AND $ListInf(%L2, %X, 11 + %I)&lt;br /&gt;
   END FOR&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Setg_Subsys_List]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
	<entry>
		<id>https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Subsys&amp;diff=116918</id>
		<title>$Setg Subsys</title>
		<link rel="alternate" type="text/html" href="https://m204wiki.rocketsoftware.com/index.php?title=$Setg_Subsys&amp;diff=116918"/>
		<updated>2018-09-20T22:52:17Z</updated>

		<summary type="html">&lt;p&gt;JALWiccan: Automatically generated page update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:$Setg_Subsys}}&lt;br /&gt;
&amp;lt;span class=&amp;quot;pageSubtitle&amp;quot;&amp;gt;Set subsystem-wide global&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;warn&amp;quot;&amp;gt;&amp;lt;b&amp;gt;Note: &amp;lt;/b&amp;gt;Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Setg_Subsys function is the &amp;lt;var&amp;gt;[[SetGlobal (System subroutine)|SetGlobal]]&amp;lt;/var&amp;gt; subroutine.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function allows a user to set the value of a &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; &amp;quot;global variable&amp;quot; which has a subsystem-wide scope. These are used for the value of the $GetG function or dummy string (&amp;quot;?&amp;amp;&amp;quot;) substitution. The order in which the different scopes of global variables are searched can be controlled using &amp;lt;var&amp;gt;$SirParm&amp;lt;/var&amp;gt; parameters: for $GetG, with &#039;GETGSYS&#039;, and for dummy strings, with &#039;DUMMYSYS&#039;.&lt;br /&gt;
&lt;br /&gt;
The $Setg_Subsys function accepts three arguments and returns zero, indicating success, or a number indicating the cause of error, if there is one. &lt;br /&gt;
&lt;br /&gt;
The first argument is the name of the global variable to be set. This is an optional argument; it defaults to the null string. &lt;br /&gt;
&lt;br /&gt;
The second argument is the value to which the global variable is to be set. This is an optional argument; it defaults to the null string. &lt;br /&gt;
&lt;br /&gt;
The third argument is the name of the subsystem that the variable is associated with. This is an optional argument if the $function is invoked from within a subsystem; it defaults to the null string. A non-null subsystem name is required if the $function is invoked from outside a subsystem. If invoked from a subsystem and the third argument is null, the name of the subsystem is used. &lt;br /&gt;
&lt;br /&gt;
System administrator privileges are required to invoke this $function, unless the third argument is omitted or is the null string, and the $function is invoked from a precompiled procedure; in that case, no privileges are required, and the subsystem name used is the active subsystem.&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;%rc&amp;lt;/span&amp;gt; = &amp;lt;span class=&amp;quot;literal&amp;quot;&amp;gt;$Setg_Subsys&amp;lt;/span&amp;gt;([&amp;lt;span class=&amp;quot;term&amp;quot;&amp;gt;glob_name&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;subsys_name&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;
&amp;lt;var class=&amp;quot;term&amp;quot;&amp;gt;%rc&amp;lt;/var&amp;gt; is set to 0 or to an error indicator.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return codes===&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;0 - No errors&lt;br /&gt;
1 - Not system administrator&lt;br /&gt;
2 - Insufficient storage&lt;br /&gt;
3 - Subsystem name missing&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&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;This function can be used to set a global variable which is used for all users of a subsystem. The value can be set during &amp;lt;var class=&amp;quot;product&amp;quot;&amp;gt;Model 204&amp;lt;/var&amp;gt; initialization (that is, in the CCAIN stream), so values can be calculated once, rather than every time a user enters the subsystem. For example, the following request can be run from CCAIN:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;OPEN CALENDAR&lt;br /&gt;
BEGIN&lt;br /&gt;
%DAYS STRING LEN 100&lt;br /&gt;
%X FLOAT&lt;br /&gt;
%DAYS = &#039;&#039;&lt;br /&gt;
D: FOR EACH VALUE OF DAY&lt;br /&gt;
%DAYS = %DAYS WITH &#039; &#039; WITH VALUE IN D&lt;br /&gt;
END FOR&lt;br /&gt;
%X = $Setg_Subsys(&#039;DAYS&#039;, %DAYS, &#039;TIMESHEET&#039;)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, during execution of the &amp;lt;code&amp;gt;TIMESHEET&amp;lt;/code&amp;gt; subsystem, the global variable &amp;lt;code&amp;gt;DAYS&amp;lt;/code&amp;gt; can be used to obtain the days of the week. &lt;br /&gt;
&lt;br /&gt;
Also, since there is one shared subsystem global table for the entire system, a smaller GTBL value for each user can be achieved than if the global values are set with user global variables. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The order in which the different scopes of global variables are searched can be controlled using &amp;lt;var&amp;gt;[[$SirParm]]&amp;lt;/var&amp;gt; parameters: for &amp;lt;var&amp;gt;$Getg&amp;lt;/var&amp;gt;, with &#039;GETGSYS&#039;, and for dummy strings, with &#039;DUMMYSYS&#039;.&lt;br /&gt;
Here is an example to show the effects of DUMMYSYS and GETGSYS; assume the following procedure is executed in the CCAIN input stream:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%X = $Setg_Subsys(&#039;JUNK&#039;, &#039;HELLO&#039;, &#039;MY_SUBSYS&#039;)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And assume the login procedure of &amp;lt;code&amp;gt;MY_SUBSYS&amp;lt;/code&amp;gt; contains the following requests:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%Y = $SETG(&#039;JUNK&#039;, &#039;GOODBYE&#039;)&lt;br /&gt;
END&lt;br /&gt;
BEGIN&lt;br /&gt;
PRINT &#039;?&amp;amp;amp.JUNK&#039;&lt;br /&gt;
PRINT $GETG(&#039;JUNK&#039;)&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then here are various command streams, and their results: &lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;DUMMYSYS=0, GETGSYS=0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%X FLOAT&lt;br /&gt;
%X = $SirParm(&#039;DUMMYSYS&#039;, 0)&lt;br /&gt;
%X = $SirParm(&#039;GETGSYS&#039;, 0)&lt;br /&gt;
END&lt;br /&gt;
MY_SUBSYS &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Produces the following print lines:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;GOODBYE&lt;br /&gt;
GOODBYE&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;DUMMYSYS=0, GETGSYS=1:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%X FLOAT&lt;br /&gt;
%X = $SirParm(&#039;DUMMYSYS&#039;, 0)&lt;br /&gt;
%X = $SirParm(&#039;GETGSYS&#039;, 1)&lt;br /&gt;
END&lt;br /&gt;
MY_SUBSYS &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Produces the following print lines:&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;GOODBYE&lt;br /&gt;
HELLO&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;DUMMYSYS=1, GETGSYS=0:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%X FLOAT&lt;br /&gt;
%X = $SirParm(&#039;DUMMYSYS&#039;, 1)&lt;br /&gt;
%X = $SirParm(&#039;GETGSYS&#039;, 0)&lt;br /&gt;
END&lt;br /&gt;
MY_SUBSYS &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Produces the following print lines:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;HELLO&lt;br /&gt;
GOODBYE&lt;br /&gt;
&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;DUMMYSYS=1, GETGSYS=1:&lt;br /&gt;
&amp;lt;p class=&amp;quot;code&amp;quot;&amp;gt;BEGIN&lt;br /&gt;
%X FLOAT&lt;br /&gt;
%X = $SirParm(&#039;DUMMYSYS&#039;, 1)&lt;br /&gt;
%X = $SirParm(&#039;GETGSYS&#039;, 1)&lt;br /&gt;
END&lt;br /&gt;
MY_SUBSYS &amp;lt;/p&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Produces the following print lines:&lt;br /&gt;
&amp;lt;p class=&amp;quot;output&amp;quot;&amp;gt;HELLO&lt;br /&gt;
HELLO&lt;br /&gt;
&amp;lt;/p&amp;gt;&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;The current values of subsystem globals can be retrieved using &amp;lt;var&amp;gt;[[$Setg_Subsys_List]]&amp;lt;/var&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Retrieval of subsystem global variables is highly efficient; updates, however, are not, so use this $function appropriately. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Products authorizing {{PAGENAMEE}}== &lt;br /&gt;
&amp;lt;ul class=&amp;quot;smallAndTightList&amp;quot;&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[List of $functions|Sirius functions]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Janus Web Server]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:$Functions|$Setg_Subsys]]&lt;/div&gt;</summary>
		<author><name>JALWiccan</name></author>
	</entry>
</feed>