Browse Source

WIP: doc import from internal svn.

Signed-off-by: Philip Schwartz <philip.schwartz@lexisnexis.com>
Philip Schwartz 13 years ago
parent
commit
e602bbb1ce
100 changed files with 31012 additions and 0 deletions
  1. 76 0
      docs/AWSIncludes.xml
  2. 484 0
      docs/BuildFromSource.xml
  3. 124 0
      docs/BuildTools/catalog.xml
  4. 337 0
      docs/BuildTools/fo.xsl
  5. 5120 0
      docs/BuildTools/mytitlepage.xsl
  6. 2569 0
      docs/BuildTools/pagesetup.xsl
  7. 1354 0
      docs/CT_Comm_Line_DFU.xml
  8. 653 0
      docs/CT_Comm_Line_ECL.xml
  9. 1261 0
      docs/CT_Comm_Line_Roxie.xml
  10. 222 0
      docs/CT_ECL_CLI.xml
  11. 3575 0
      docs/CT_ECL_IDE.xml
  12. 161 0
      docs/CT_Overview.xml
  13. 74 0
      docs/ClientTools.xml
  14. 1063 0
      docs/CommonItems.xml
  15. 485 0
      docs/DaliAdmin.xml
  16. 1314 0
      docs/DataHandling.xml
  17. 1390 0
      docs/DataTutorial.xml
  18. 524 0
      docs/ECLCC.xml
  19. 1231 0
      docs/ECLR.xml
  20. 253 0
      docs/ECLR_mods/AlienData-TypeStrucSpecial.xml
  21. 91 0
      docs/ECLR_mods/AlienData-TypeStruct.xml
  22. 81 0
      docs/ECLR_mods/Basics-ActionsandAttrib.xml
  23. 109 0
      docs/ECLR_mods/Basics-AttributeDef.xml
  24. 247 0
      docs/ECLR_mods/Basics-AttributeTypes.xml
  25. 78 0
      docs/ECLR_mods/Basics-AttributeVisibility.xml
  26. 99 0
      docs/ECLR_mods/Basics-Constants.xml
  27. 152 0
      docs/ECLR_mods/Basics-FieldandAttribute.xml
  28. 370 0
      docs/ECLR_mods/Basics-FunctionAttributes.xml
  29. 83 0
      docs/ECLR_mods/Basics-Overview.xml
  30. 76 0
      docs/ECLR_mods/Basics-RecordSetFiltring.xml
  31. 47 0
      docs/ECLR_mods/BltInFunc-ABS.xml
  32. 46 0
      docs/ECLR_mods/BltInFunc-ACOS.xml
  33. 220 0
      docs/ECLR_mods/BltInFunc-AGGREGATE.xml
  34. 47 0
      docs/ECLR_mods/BltInFunc-ALLNODES.xml
  35. 91 0
      docs/ECLR_mods/BltInFunc-APPLY.xml
  36. 47 0
      docs/ECLR_mods/BltInFunc-ASCII.xml
  37. 44 0
      docs/ECLR_mods/BltInFunc-ASIN.xml
  38. 134 0
      docs/ECLR_mods/BltInFunc-ASSERT.xml
  39. 52 0
      docs/ECLR_mods/BltInFunc-ASTRING.xml
  40. 45 0
      docs/ECLR_mods/BltInFunc-ATAN.xml
  41. 54 0
      docs/ECLR_mods/BltInFunc-ATAN2.xml
  42. 78 0
      docs/ECLR_mods/BltInFunc-AVE.xml
  43. 509 0
      docs/ECLR_mods/BltInFunc-BUILD.xml
  44. 101 0
      docs/ECLR_mods/BltInFunc-CASE.xml
  45. 72 0
      docs/ECLR_mods/BltInFunc-CHOOSE.xml
  46. 81 0
      docs/ECLR_mods/BltInFunc-CHOOSEN.xml
  47. 121 0
      docs/ECLR_mods/BltInFunc-CHOOSETS.xml
  48. 34 0
      docs/ECLR_mods/BltInFunc-CLUSTERSIZE.xml
  49. 220 0
      docs/ECLR_mods/BltInFunc-COMBINE.xml
  50. 124 0
      docs/ECLR_mods/BltInFunc-CORRELATION.xml
  51. 55 0
      docs/ECLR_mods/BltInFunc-COS.xml
  52. 57 0
      docs/ECLR_mods/BltInFunc-COSH.xml
  53. 97 0
      docs/ECLR_mods/BltInFunc-COUNT.xml
  54. 128 0
      docs/ECLR_mods/BltInFunc-COVARIANCE.xml
  55. 119 0
      docs/ECLR_mods/BltInFunc-CRON.xml
  56. 202 0
      docs/ECLR_mods/BltInFunc-DEDUP.xml
  57. 63 0
      docs/ECLR_mods/BltInFunc-DEFINE.xml
  58. 244 0
      docs/ECLR_mods/BltInFunc-DENORMALIZE.xml
  59. 204 0
      docs/ECLR_mods/BltInFunc-DISTRIBUTE.xml
  60. 61 0
      docs/ECLR_mods/BltInFunc-DISTRIBUTED.xml
  61. 113 0
      docs/ECLR_mods/BltInFunc-DISTRIBUTION.xml
  62. 49 0
      docs/ECLR_mods/BltInFunc-EBCDIC.xml
  63. 100 0
      docs/ECLR_mods/BltInFunc-ENTH.xml
  64. 73 0
      docs/ECLR_mods/BltInFunc-ERROR.xml
  65. 152 0
      docs/ECLR_mods/BltInFunc-EVALUATE.xml
  66. 85 0
      docs/ECLR_mods/BltInFunc-EVENT.xml
  67. 53 0
      docs/ECLR_mods/BltInFunc-EVENTEXTRA.xml
  68. 50 0
      docs/ECLR_mods/BltInFunc-EVENTNAME.xml
  69. 87 0
      docs/ECLR_mods/BltInFunc-EXISTS.xml
  70. 48 0
      docs/ECLR_mods/BltInFunc-EXP.xml
  71. 93 0
      docs/ECLR_mods/BltInFunc-FAIL.xml
  72. 29 0
      docs/ECLR_mods/BltInFunc-FAILCODE.xml
  73. 46 0
      docs/ECLR_mods/BltInFunc-FAILMESSAGE.xml
  74. 148 0
      docs/ECLR_mods/BltInFunc-FETCH.xml
  75. 52 0
      docs/ECLR_mods/BltInFunc-FROMUNICODE.xml
  76. 60 0
      docs/ECLR_mods/BltInFunc-FROMXML.xml
  77. 57 0
      docs/ECLR_mods/BltInFunc-GETENV.xml
  78. 89 0
      docs/ECLR_mods/BltInFunc-GLOBAL.xml
  79. 111 0
      docs/ECLR_mods/BltInFunc-GRAPH.xml
  80. 111 0
      docs/ECLR_mods/BltInFunc-GROUP.xml
  81. 48 0
      docs/ECLR_mods/BltInFunc-HASH.xml
  82. 49 0
      docs/ECLR_mods/BltInFunc-HASH32.xml
  83. 48 0
      docs/ECLR_mods/BltInFunc-HASH64.xml
  84. 46 0
      docs/ECLR_mods/BltInFunc-HASHCRC.xml
  85. 48 0
      docs/ECLR_mods/BltInFunc-HASHMD5.xml
  86. 57 0
      docs/ECLR_mods/BltInFunc-HAVING.xml
  87. 102 0
      docs/ECLR_mods/BltInFunc-IF.xml
  88. 65 0
      docs/ECLR_mods/BltInFunc-INTFORMAT.xml
  89. 49 0
      docs/ECLR_mods/BltInFunc-ISVALID.xml
  90. 111 0
      docs/ECLR_mods/BltInFunc-ITERATE.xml
  91. 1007 0
      docs/ECLR_mods/BltInFunc-JOIN.xml
  92. 111 0
      docs/ECLR_mods/BltInFunc-KEYDIFF.xml
  93. 110 0
      docs/ECLR_mods/BltInFunc-KEYPATCH.xml
  94. 65 0
      docs/ECLR_mods/BltInFunc-KEYUNICODE.xml
  95. 46 0
      docs/ECLR_mods/BltInFunc-LENGTH.xml
  96. 155 0
      docs/ECLR_mods/BltInFunc-LIBRARY.xml
  97. 140 0
      docs/ECLR_mods/BltInFunc-LIMIT.xml
  98. 47 0
      docs/ECLR_mods/BltInFunc-LN.xml
  99. 49 0
      docs/ECLR_mods/BltInFunc-LOCAL.xml
  100. 0 0
      docs/ECLR_mods/BltInFunc-LOG.xml

+ 76 - 0
docs/AWSIncludes.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter>
+  <title>IncluderStuff</title>
+
+  <sect1>
+    <title>Section1 container</title>
+
+    <para>This is filler</para>
+
+    <sect2 id="Find_AWS_Keys">
+      <title>Find your Amazon Access Key ID and Secret Access Key</title>
+
+      <para><orderedlist>
+          <listitem>
+            <para>Go to <emphasis role="bold">aws.amazon.com</emphasis> and
+            login, if needed.</para>
+          </listitem>
+
+          <listitem>
+            <para>Select <emphasis role="bold">Account</emphasis>.</para>
+          </listitem>
+
+          <listitem>
+            <para>Select <emphasis role="bold">Security
+            Credentials</emphasis>.</para>
+          </listitem>
+
+          <listitem>
+            <para>On the page, look for the section called <emphasis
+            role="bold">Access Credentials</emphasis>.</para>
+          </listitem>
+
+          <listitem>
+            <para>Note your <emphasis role="bold">Access Key ID</emphasis> and
+            your <emphasis role="bold">Secret Access Key.</emphasis></para>
+
+            <para><figure>
+                <title>Credentials</title>
+
+                <mediaobject>
+                  <imageobject>
+                    <imagedata fileref="images/AWS_Accesskey.jpg" />
+                  </imageobject>
+                </mediaobject>
+              </figure></para>
+          </listitem>
+        </orderedlist></para>
+
+      <para>Portions of this image are intentionally blurred</para>
+
+      <para><informaltable colsep="1" frame="all" rowsep="1">
+          <tgroup cols="2">
+            <colspec colwidth="126.00pt" />
+
+            <colspec colwidth="189.00pt" />
+
+            <tbody>
+              <row>
+                <entry>Access Key ID</entry>
+
+                <entry></entry>
+              </row>
+
+              <row>
+                <entry>Secret Access Key</entry>
+
+                <entry></entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+    </sect2>
+  </sect1>
+</chapter>

+ 484 - 0
docs/BuildFromSource.xml

@@ -0,0 +1,484 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book>
+  <bookinfo>
+    <title>Building from source</title>
+
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/redswooshWithLogo3.jpg" />
+      </imageobject>
+    </mediaobject>
+
+    <author>
+      <surname>Boca Raton Documentation Team</surname>
+    </author>
+
+    <legalnotice>
+      <para>We welcome your comments and feedback about this document via
+      email to <email>docfeedback@hpccsystems.com</email> Please include
+      <emphasis role="bold">Documentation Feedback</emphasis> in the subject
+      line and reference the document name, page numbers, and current Version
+      Number in the text of the message.</para>
+
+      <para>LexisNexis and the Knowledge Burst logo are registered trademarks
+      of Reed Elsevier Properties Inc., used under license. Other products,
+      logos, and services may be trademarks or registered trademarks of their
+      respective companies. All names and example data used in this manual are
+      fictitious. Any similarity to actual persons, living or dead, is purely
+      coincidental.</para>
+
+      <para></para>
+    </legalnotice>
+
+   <xi:include href="Version.xml" xpointer="FooterInfo"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+
+   <xi:include href="Version.xml" xpointer="DateVer"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+    <corpname>HPCC Systems</corpname>
+
+   <xi:include href="Version.xml" xpointer="FooterInfo"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+
+    <mediaobject role="logo">
+      <imageobject>
+        <imagedata fileref="images/LN_Rightjustified.jpg" />
+      </imageobject>
+    </mediaobject>
+  </bookinfo>
+
+  <chapter id="Buildin-HPCC-from-Source">
+    <title>Building HPCC from source</title>
+
+    <sect1>
+      <title id="Introduction">Introduction</title>
+
+      <para>The LexisNexis HPCC technology is designed to effectively process,
+      analyze, and find links and associations within high volumes of complex
+      data. The LexisNexis HPCC technology can detect non-obvious
+      relationships, scale to support petabytes of data, and is significantly
+      faster than competing technologies while requiring less hardware and
+      resources.</para>
+
+      <para>This translates into better quality answers in less time so that
+      organizations can cope with massive data and turn information into
+      knowledge.</para>
+
+      <para>This document will show you how to obtain and build an HPCC system
+      using the open source model.</para>
+
+      <para>OUTLINE DRAFT: </para>
+
+      <para>Description: </para>
+
+      <para>------------ </para>
+
+      <para>This file is the top level handling for cmake based compilation
+      and build process. </para>
+
+      <para>To build for Linux: </para>
+
+      <para>1. Check out sources (for example, to directory ~/hpcc) </para>
+
+      <para>2. Create a build directory - either as a child of hpcc or
+      elsewhere </para>
+
+      <para>3. cd to the build directory </para>
+
+      <para>4a.To create makefiles to build native release version for local
+      machine, run cmake ~/hpcc </para>
+
+      <para>4b.To create makefiles to build native debug version, run cmake
+      -DCMAKE_BUILD_TYPE=Debug ~/hpcc </para>
+
+      <para>4c.To create makefiles to build 32-bit version from 64-bit host,
+      run cmake -DCMAKE_C_FLAGS:STRING="-m32 -march=i386"
+      -DCMAKE_CXX_FLAGS:STRING="-m32 -march=i386" ~/hpcc </para>
+
+      <para>5. To build the makefiles just created above, run make </para>
+
+      <para>6. Executables will be created in ./&lt;releasemode&gt;/bin and
+      ./&lt;releasemode&gt;/libs </para>
+
+      <para></para>
+
+      <para>To build for Windows: </para>
+
+      <para>1. Check out sources (for example, to directory c:\hpcc) </para>
+
+      <para>2. Create a build directory - either as a child of hpcc or
+      elsewhere </para>
+
+      <para>3. cd to the build directory </para>
+
+      <para>4. To create a Visual Studio project, run cmake c:\hpcc -G "Visual
+      Studio 9 2008" The sln file hpccsystems-platform.sln will be created in
+      the current directory, and will support debug and release targets
+      </para>
+
+      <para>5. To build the project, load the solution into the visual studio
+      IDE and build in the usual way. 6. Executables will be created in (for
+      example) c:\hpcc\bin\&lt;release_mode&gt; </para>
+
+      <para></para>
+    </sect1>
+  </chapter>
+
+  <chapter id="Hardware-and-Software-Requirements">
+    <title>Hardware and Software Requirements</title>
+
+    <para>The following section describes the various hardware and software
+    required in order to run the HPCC.</para>
+
+    <sect1 id="Switch">
+      <title>Switch</title>
+
+      <para>A significant component of HPCC is the infrastructure it runs on,
+      specifically the switch.</para>
+
+      <sect2 id="Switch-Requirements">
+        <title>Switch requirements</title>
+
+        <itemizedlist mark="square">
+          <listitem>
+            <para>Sufficient number of ports to allow all nodes to be
+            connected directly to it;</para>
+          </listitem>
+
+          <listitem>
+            <para>IGMP v.2 support</para>
+          </listitem>
+
+          <listitem>
+            <para>IGMP snooping support</para>
+          </listitem>
+        </itemizedlist>
+      </sect2>
+
+      <sect2 id="Switch-additional-recommend">
+        <title>Switch additional recommended features</title>
+
+        <para><itemizedlist mark="square">
+            <listitem>
+              <para>Non-blocking backplane</para>
+            </listitem>
+
+            <listitem>
+              <para>Low latency (under 35usec)</para>
+            </listitem>
+
+            <listitem>
+              <para>Layer 3 switching</para>
+            </listitem>
+
+            <listitem>
+              <para>Managed and monitored (SNMP is a plus)</para>
+            </listitem>
+
+            <listitem>
+              <para>Port channel (port bundling) support</para>
+            </listitem>
+          </itemizedlist></para>
+      </sect2>
+    </sect1>
+
+    <sect1 id="Nodes-Hardware">
+      <title>Nodes-Hardware</title>
+
+      <para>The HPCC can run as a single node system or a multi node
+      system.</para>
+
+      <sect2 id="Node-Mandatory-requirements">
+        <title>Node mandatory requirements</title>
+
+        <itemizedlist mark="square">
+          <listitem>
+            <para>Pentium 4 or newer CPU</para>
+          </listitem>
+
+          <listitem>
+            <para>64 bit</para>
+          </listitem>
+
+          <listitem>
+            <para>4GB RAM</para>
+          </listitem>
+
+          <listitem>
+            <para>one or two Hard Drives</para>
+          </listitem>
+
+          <listitem>
+            <para>1 GigE network interface</para>
+          </listitem>
+        </itemizedlist>
+      </sect2>
+
+      <sect2 id="Node-recommended-specifications">
+        <title>Node recommended specifications</title>
+
+        <para><itemizedlist mark="square">
+            <listitem>
+              <para>Nehalem Core i7 CPU</para>
+            </listitem>
+
+            <listitem>
+              <para>64 bit</para>
+            </listitem>
+
+            <listitem>
+              <para>12GB RAM</para>
+            </listitem>
+
+            <listitem>
+              <para>Two 15K RPM SAS Hard Drives (Roxie)</para>
+            </listitem>
+
+            <listitem>
+              <para>Two 7200K RPM SATA Hard Drives (Thor)</para>
+            </listitem>
+
+            <listitem>
+              <para>1 GigE network interface</para>
+            </listitem>
+
+            <listitem>
+              <para>PXE boot support in BIOS</para>
+            </listitem>
+
+            <listitem>
+              <para>Optionally 3 or more hard drives can be configured in a
+              RAID 5 container for increased performance</para>
+            </listitem>
+
+            <listitem>
+              <para>Optionally IPMI and KVM over IP support</para>
+            </listitem>
+          </itemizedlist></para>
+      </sect2>
+    </sect1>
+
+    <sect1 id="Nodes-Software">
+      <title>Nodes-Software</title>
+
+      <para>We recommend all nodes have identical operating systems and
+      packages installed. This significantly reduces variables when
+      troubleshooting.</para>
+
+      <sect2 id="Operating-System-Requirements">
+        <title>Operating System Requirements</title>
+
+        <para><itemizedlist mark="square">
+            <listitem>
+              <para>64 bit LINUX CentOS 5.4 or later</para>
+
+              <para>Or</para>
+
+              <para>LINUX Ubuntu 9.10 or later and Debian x.xx</para>
+            </listitem>
+          </itemizedlist></para>
+      </sect2>
+
+      <sect2 id="configuration-manager">
+        <title>Dependencies and packages</title>
+
+        <para>Running HPCC depends on having these required component packages
+        listed below installed on the system. For details of the commands
+        recommended for obtaining these packages, see Specific OS Software
+        Installation commands section in appendix of the GettingStarted
+        document.</para>
+
+        <itemizedlist mark="square">
+          <listitem>
+            <para>OpenLDAP 2.3.43 (base for CentOS 5.5)</para>
+          </listitem>
+
+          <listitem>
+            <para>OpenLDAP-devel 2.3.43 (base for CentOS 5.5)</para>
+          </listitem>
+
+          <listitem>
+            <para>libicu 3.6 (for CentOS 5.5)</para>
+
+            <para>libicu-3.6-5.11.4.i386.rpm</para>
+          </listitem>
+
+          <listitem>
+            <para>libicu-devel 3.6 (for CentOS 5.5)</para>
+          </listitem>
+
+          <listitem>
+            <para>m4 1.4.5 (for CentOS 5.5)</para>
+          </listitem>
+
+          <listitem>
+            <para>libtool 1.5.22 (for CentOS 5.5)</para>
+          </listitem>
+
+          <listitem>
+            <para>binutils-devel 2.17.50.0.6 (for CentOS 5.5)</para>
+          </listitem>
+
+          <listitem>
+            <para>bison 2.4.1 (source)</para>
+          </listitem>
+
+          <listitem>
+            <para>flex 2.5.35 (source)</para>
+          </listitem>
+
+          <listitem>
+            <para>The GNU Compiler Collection (GCC) with G++ support (required
+            only on the ECL Server node)</para>
+          </listitem>
+
+          <listitem>
+            <para>boost 1.44 (source)</para>
+          </listitem>
+
+          <listitem>
+            <para>boost-devel 1.44 (source)</para>
+          </listitem>
+
+          <listitem>
+            <para>Xalan-c 1.10.0 (rpm - fedora epel repository or via
+            source)</para>
+          </listitem>
+
+          <listitem>
+            <para>Xalan-c-devel 1.10.0 (rpm - fedora epel repository or via
+            source)</para>
+          </listitem>
+
+          <listitem>
+            <para>Xerces-c 2.7.0 (rpm - fedora epel repository or via
+            source)</para>
+          </listitem>
+
+          <listitem>
+            <para>Xerces-c-devel 2.7.0 (rpm - fedora epel repository or via
+            source)</para>
+          </listitem>
+        </itemizedlist>
+      </sect2>
+    </sect1>
+
+    <sect1 id="workstation-requirements">
+      <title>Workstation Requirements</title>
+
+      <itemizedlist>
+        <listitem>
+          <para>Running HPCC requires communicating with the system from your
+          workstation with a browser</para>
+
+          <para>You will need to use one of the supported web browsers with
+          Javascript enabled.</para>
+
+          <itemizedlist>
+            <listitem>
+              <para>Internet Explorer 7</para>
+            </listitem>
+
+            <listitem>
+              <para>Mozilla Firefox 3.5 or later</para>
+
+              <!--*** Add additional browsers when approved-->
+            </listitem>
+          </itemizedlist>
+
+          <para>If browser security is set to <emphasis
+          role="bold">High</emphasis>, you should add ECLWatch as a Trusted
+          Site to allow Javascript execution.</para>
+        </listitem>
+
+        <listitem>
+          <para>HPCC Client Tools (ECL IDE). See the ECLWatch web page to
+          download the Windows install set.</para>
+
+          <graphic fileref="images/GS_DownloadTools.png" />
+
+          <para></para>
+
+          <para>The Client tools were designed to run on Windows machines. See
+          the appendix for instructions on running them on Linux workstations
+          using Wine.</para>
+        </listitem>
+      </itemizedlist>
+    </sect1>
+  </chapter>
+
+  <chapter id="Getting_the_Source">
+    <title>Getting and Installing the Source</title>
+
+    <para>This part of the document will discuss ways to get the source code
+    and install it.</para>
+
+    <sect1>
+      <title>Sources of Source</title>
+
+      <para>The source code can be found on the LexisNexis Portal at ***link
+      to portal***. Register with the NIM*** site to be able to download the
+      source package.</para>
+
+      <para>The source package is in the form of a source tarfile. (.stgz)
+      download the file from the site to the machine where you wish to install
+      the HPCC.</para>
+
+      <para></para>
+    </sect1>
+
+    <sect1>
+      <title>Installing the Source files</title>
+
+      <para>Extract the source files into a working directory. You may want to
+      create a directory for the source files. You would also want to have a
+      directory for the binaries.</para>
+
+      <para>For instance, if we wanted to extract to /users/home/hpcc9 we
+      could issue the command:</para>
+
+      <para><programlisting>tar -xzvf hpcc.tar.gz –C /usr/home/hpcc9/
+</programlisting>This will be the directory of the source, here we would
+      create a directory for the binaries.</para>
+
+      <para><programlisting>mkdir cmake_build9
+</programlisting>Then from the new cmake_build9 directory, you can issue the
+      command:</para>
+
+      <para><programlisting>cmake /usr/home/hpcc9</programlisting>This will
+      give lots of messages and status as the process runs.</para>
+
+      <para>Once this process successfully completes, you can then issue the
+      command:<programlisting>make 
+</programlisting>Make will now build all the source files, this process is
+      automated to detect the platform you are running on. If its a red hat or
+      CentOS platform, it will create a .rpm file to install. If you are on
+      Ubuntu/Debian package it will generate a apt-get package.</para>
+
+      <para><!--*** The following section is just conjecture at this point, 
+because I do not fully understand what these commands do or what their purpose is... 
+*** sorry if this does not quite make sense.-->Another step in the process is
+      to make the install...</para>
+
+      <para><programlisting>make install
+</programlisting>This will make the installation file ***</para>
+
+      <para><!--*** See comments above!-->Another step in the process is to
+      make the package...</para>
+
+      <para><programlisting>make package
+</programlisting>This will package up the installation files ready to
+      redeploy***</para>
+
+      <para></para>
+
+      <para>Next steps: Get the GettingStarted document, and the Using Config
+      Manager document to configure your HPCC system.</para>
+    </sect1>
+  </chapter>
+</book>

+ 124 - 0
docs/BuildTools/catalog.xml

@@ -0,0 +1,124 @@
+<?xml version='1.0'?>
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
+
+<!-- ...................................................................... -->
+<!-- XML Catalog data for DocBook XML V4.5 ................................ -->
+<!-- File catalog.xml ..................................................... -->
+
+<!-- Please direct all questions, bug reports, or suggestions for
+     changes to the docbook@lists.oasis-open.org mailing list. For more
+     information, see http://www.oasis-open.org/.
+  -->
+
+<!-- This is the catalog data file for DocBook V4.5. It is provided as
+     a convenience in building your own catalog files. You need not use
+     the filenames listed here, and need not use the filename method of
+     identifying storage objects at all.  See the documentation for
+     detailed information on the files associated with the DocBook DTD.
+     See XML Catalogs at http://www.oasis-open.org/committees/entity/ for
+     detailed information on supplying and using catalog data.
+  -->
+
+<!-- ...................................................................... -->
+<!-- DocBook driver file .................................................. -->
+
+<public publicId="-//OASIS//DTD DocBook XML V4.5//EN"
+        uri="docbookx.dtd"/>
+
+<system systemId="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"
+	uri="docbookx.dtd"/>
+
+<system systemId="http://docbook.org/xml/4.5/docbookx.dtd"
+	uri="docbookx.dtd"/>
+
+<!-- ...................................................................... -->
+<!-- DocBook modules ...................................................... -->
+
+<public publicId="-//OASIS//DTD DocBook CALS Table Model V4.5//EN"
+        uri="calstblx.dtd"/>
+
+<public publicId="-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN"
+	uri="htmltblx.mod"/>
+
+<public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"
+        uri="soextblx.dtd"/>
+
+<public publicId="-//OASIS//ELEMENTS DocBook Information Pool V4.5//EN"
+        uri="dbpoolx.mod"/>
+
+<public publicId="-//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN"
+        uri="dbhierx.mod"/>
+
+<public publicId="-//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN"
+        uri="dbgenent.mod"/>
+
+<public publicId="-//OASIS//ENTITIES DocBook Notations V4.5//EN"
+        uri="dbnotnx.mod"/>
+
+<public publicId="-//OASIS//ENTITIES DocBook Character Entities V4.5//EN"
+        uri="dbcentx.mod"/>
+
+<!-- ...................................................................... -->
+<!-- ISO entity sets ...................................................... -->
+
+<public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML"
+        uri="isodia.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"
+        uri="isonum.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Publishing//EN//XML"
+        uri="isopub.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES General Technical//EN//XML"
+        uri="isotech.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
+        uri="isolat1.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN//XML"
+        uri="isolat2.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN//XML"
+        uri="isogrk1.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML"
+        uri="isogrk2.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN//XML"
+        uri="isogrk3.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML"
+        uri="isogrk4.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML"
+        uri="isoamsa.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML"
+        uri="isoamsb.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML"
+        uri="isoamsc.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML"
+        uri="isoamsn.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML"
+        uri="isoamso.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML"
+        uri="isoamsr.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML"
+        uri="isobox.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML"
+        uri="isocyr1.ent"/>
+
+<public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML"
+        uri="isocyr2.ent"/>
+
+<!-- End of catalog data for DocBook XML V4.5 ............................. -->
+<!-- ...................................................................... -->
+
+</catalog>

+ 337 - 0
docs/BuildTools/fo.xsl

@@ -0,0 +1,337 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version='1.0'>
+
+  <xsl:import href="../docbook-xsl/fo/profile-docbook.xsl"/>
+  <xsl:import href="mytitlepage.xsl"/>
+
+<xsl:param name="admon.graphics" select="1"/>
+<xsl:param name="admon.graphics.path" select="icons"/>
+<xsl:param name="chapter.autolabel" select="0"/>  
+<xsl:param name="shade.verbatim" select="1"/> 
+<!--xsl:param name="body.font.family" select="serif"/-->
+<xsl:param name="body.start.indent" select="0"/>
+<xsl:param name="callout.graphics" select="0"/>
+<xsl:param name="footer.column.widths" select="'0 3 0'"/>
+<!--xsl:param name="use.extensions" select="1"/-->
+<xsl:param name="fop1.extensions" select="1"/>
+<xsl:param name="generate.index" select="3"/>
+<xsl:param name="generate.section.toc.level" select="1"/>
+<xsl:param name="generate.toc">book toc</xsl:param>
+<xsl:param name="header.column.widths" select="'0 3 0'"/>
+<xsl:param name="paper.type" select="letter"/>
+<xsl:param name="profile.condition" select="int"/>
+<xsl:param name="qanda.inherit.numeration" select="0"/>
+<xsl:param name="section.autolabel" select="0"/>
+<!--xsl:param name="title.font.family" select="sans-serif"/-->
+<xsl:param name="toc.section.depth" select="1"/>
+
+<!--===========================SPECIAL_TOC_SAUCE======================-->
+<xsl:template name="page.number.format">
+  <xsl:param name="element" select="local-name(.)"/>
+  <xsl:choose>
+    <xsl:when test="$element = 'toc'">1</xsl:when>
+    <xsl:otherwise>1</xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<xsl:template name="initial.page.number">
+  <xsl:param name="element" select="local-name(.)"/>
+  <xsl:param name="master-reference" select="''"/>
+
+  <!-- Select the first content that the stylesheet places
+       after the TOC -->
+  <xsl:variable name="first.book.content" 
+                select="ancestor::book/*[
+                          not(self::title or
+                              self::subtitle or
+                              self::titleabbrev or
+                              self::bookinfo or
+                              self::info or
+                              self::dedication or
+                              self::preface or
+                              self::toc or
+                              self::lot)][1]"/>
+  <xsl:choose>
+    <!-- double-sided output -->
+    <xsl:when test="$double.sided != 0">
+      <xsl:choose>
+        <xsl:when test="$element = 'toc'">auto-odd</xsl:when>
+        <xsl:when test="$element = 'book'">auto</xsl:when>
+        <!-- preface typically continues TOC roman numerals -->
+        <!-- Change page.number.format if not -->
+        <xsl:when test="$element = 'preface'">auto-odd</xsl:when>
+        <xsl:when test="($element = 'dedication' or $element = 'article') 
+                    and not(preceding::chapter
+                            or preceding::preface
+                            or preceding::appendix
+                            or preceding::article
+                            or preceding::dedication
+                            or parent::part
+                            or parent::reference)">auto</xsl:when>
+        <xsl:when test="generate-id($first.book.content) =
+                        generate-id(.)">auto</xsl:when>
+        <xsl:otherwise>auto-odd</xsl:otherwise>
+      </xsl:choose>
+    </xsl:when>
+
+    <!-- single-sided output -->
+    <xsl:otherwise>
+      <xsl:choose>
+        <xsl:when test="$element = 'toc'">auto</xsl:when>
+        <xsl:when test="$element = 'book'">1</xsl:when>
+        <xsl:when test="$element = 'preface'">auto</xsl:when>
+       <xsl:when test="($element = 'dedication' or $element = 'article') and
+                        not(preceding::chapter
+                            or preceding::preface
+                            or preceding::appendix
+                            or preceding::article
+                            or preceding::dedication
+                            or parent::part
+                            or parent::reference)">auto</xsl:when>
+        <xsl:when test="generate-id($first.book.content) =
+                        generate-id(.)">auto</xsl:when>
+        <xsl:otherwise>auto</xsl:otherwise>
+      </xsl:choose>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<!--================ENDOFSPECIAL_tocSauce==============================-->
+
+
+<xsl:template match="processing-instruction('hard-pagebreak')">
+   <fo:block break-after='page'/>
+</xsl:template>
+  
+<xsl:template match="programlisting[@role='tab']">
+  <fo:block xsl:use-attribute-sets="monospace.verbatim.properties">
+   <xsl:attribute name="font-family">serif</xsl:attribute>
+   <xsl:attribute name="font-size">10pt</xsl:attribute>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<!--sans-serif-para-role-->
+<xsl:template match="para[@role='sans']">
+  <fo:block>
+   <xsl:attribute name="font-family">sans-serif</xsl:attribute>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="para[@role='wsig']">
+  <fo:block xsl:use-attribute-sets="monospace.verbatim.properties">
+      <xsl:attribute name="font-size">10pt</xsl:attribute>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+<xsl:template match="programlisting[@role='wsig']">
+  <fo:block xsl:use-attribute-sets="monospace.verbatim.properties">
+      <xsl:attribute name="font-size">10pt</xsl:attribute>
+    <xsl:apply-templates/>
+  </fo:block>
+</xsl:template>
+
+<xsl:attribute-set name="monospace.verbatim.properties">
+ <xsl:attribute name="font-size">
+   0.83em
+  </xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level1.properties">
+ <xsl:attribute name="font-size">
+    <xsl:value-of select="$body.font.master * 2.525"></xsl:value-of>
+    <xsl:text>pt</xsl:text>
+  </xsl:attribute>
+    <xsl:attribute name="color">#A91919</xsl:attribute>
+    <xsl:attribute name="text-decoration">underline</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level2.properties">
+    <xsl:attribute name="color">#A91919</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.level1.properties">
+  <xsl:attribute name="break-before">
+      <xsl:choose>
+        <xsl:when test="@role = 'nobrk'">auto</xsl:when>
+        <xsl:otherwise>page</xsl:otherwise>
+      </xsl:choose>
+  </xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.level2.properties">
+   <xsl:attribute name="break-before">
+        <xsl:choose>
+            <xsl:when test="@role = 'brk'">page</xsl:when>
+            <xsl:otherwise>auto</xsl:otherwise>
+        </xsl:choose>
+   </xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.level3.properties">
+   <xsl:attribute name="break-before">
+        <xsl:choose>
+            <xsl:when test="@role = 'brk'">page</xsl:when>
+            <xsl:otherwise>auto</xsl:otherwise>
+        </xsl:choose>
+   </xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="header.content.properties">
+    <xsl:attribute name="font-family">
+       <xsl:value-of select="$title.font.family"></xsl:value-of>
+    </xsl:attribute>
+</xsl:attribute-set>
+<xsl:attribute-set name="footer.content.properties">
+    <xsl:attribute name="font-family">
+        <xsl:value-of select="$title.font.family"></xsl:value-of>
+    </xsl:attribute>
+</xsl:attribute-set>
+
+<!--chapter-title-attrib-set-->
+<xsl:attribute-set name="component.title.properties">
+    <xsl:attribute name="text-align">right</xsl:attribute>
+</xsl:attribute-set>
+
+<xsl:template name="footer.content">
+<xsl:param name="pageclass" select="''"/>
+<xsl:param name="sequence" select="''"/>
+<xsl:param name="position" select="''"/>
+<xsl:param name="gentext-key" select="''"/>
+      <xsl:choose>
+        <xsl:when test="$double.sided = 0 and $position='center'">
+	     <fo:block>
+		     <xsl:value-of select="ancestor-or-self::book/bookinfo/releaseinfo"/> 
+	     </fo:block>
+	     <fo:block>
+		     <fo:page-number/>
+	     </fo:block>
+	 </xsl:when>
+      </xsl:choose>
+ </xsl:template>
+    
+    <xsl:template name="header.content">
+    <xsl:param name="pageclass" select="body"/>
+    <xsl:param name="sequence" select="''"/>
+    <xsl:param name="position" select="''"/>
+    <xsl:param name="gentext-key" select="''"/>
+        <xsl:choose>
+      	   <xsl:when test="$pageclass = 'titlepage' and $position='center'">
+ 	             <!--IFC-HEADER-LOGIC-->
+ 	              <fo:block>
+ 	      	     		     <xsl:value-of select="ancestor-or-self::book/bookinfo/title"/> 
+ 	       	     </fo:block>
+     	   </xsl:when>
+           <xsl:when test="$pageclass = 'lot' and $position='center'">
+                     <!--TOC-HEADER-LOGIC-->
+	       	     <fo:block>
+	       		     <xsl:value-of select="ancestor-or-self::book/bookinfo/title"/> 
+	       	     </fo:block>
+	      	 
+    	   </xsl:when>
+
+    	   <xsl:when test="$double.sided = 0 and $position='center'">
+    	     <fo:block>
+    		     <xsl:value-of select="ancestor-or-self::book/bookinfo/title"/> 
+             </fo:block>
+             <fo:block>  
+             <xsl:apply-templates select="." mode="object.title.markup"/>
+	     </fo:block>
+	    </xsl:when>
+    	</xsl:choose>
+    </xsl:template>
+    
+ <!--VarListVariation-->
+ <xsl:template match="varlistentry/term">
+        <fo:inline font-family="sans-serif" font-weight="bold">
+          <xsl:apply-templates/>
+        </fo:inline>
+ </xsl:template>
+
+    
+
+<!--COLORING-TEMPLATES-->
+<xsl:template match="emphasis[@role='bluebold']">
+       <fo:inline color="blue"  font-weight="bold">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='blueital']">
+       <fo:inline color="blue"  font-style="italic">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+  
+<xsl:template match="emphasis[@role='blue']">
+       <fo:inline color="blue">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='redbold']">
+       <fo:inline color="red"  font-weight="bold">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='redital']">
+       <fo:inline color="red"  font-style="italic">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+    
+<xsl:template match="emphasis[@role='red']">
+       <fo:inline color="red">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='greenbold']">
+       <fo:inline color="green"  font-weight="bold">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='greenital']">
+       <fo:inline color="green"  font-style="italic">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+  
+<xsl:template match="emphasis[@role='green']">
+       <fo:inline color="green">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='whitebold']">
+       <fo:inline color="white"  font-weight="bold">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+<xsl:template match="emphasis[@role='whiteital']">
+       <fo:inline color="white"  font-style="italic">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+  
+<xsl:template match="emphasis[@role='white']">
+       <fo:inline color="white">
+         <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+
+<xsl:template match="ulink">
+     <fo:inline color="blue" text-decoration="underline">
+             <xsl:apply-templates/>
+       </fo:inline>
+</xsl:template>
+
+
+</xsl:stylesheet>
+
+

File diff suppressed because it is too large
+ 5120 - 0
docs/BuildTools/mytitlepage.xsl


File diff suppressed because it is too large
+ 2569 - 0
docs/BuildTools/pagesetup.xsl


File diff suppressed because it is too large
+ 1354 - 0
docs/CT_Comm_Line_DFU.xml


+ 653 - 0
docs/CT_Comm_Line_ECL.xml

@@ -0,0 +1,653 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book>
+  <bookinfo>
+    <title>Client Tools Overview</title>
+
+    <author>
+      <firstname>Boca Raton</firstname>
+
+      <surname>Documentation Team</surname>
+
+      <affiliation>
+        <orgname>Lexis Nexis</orgname>
+      </affiliation>
+    </author>
+
+    <pubdate>Sept. 2011</pubdate>
+  </bookinfo>
+
+  <chapter id="Command_Line_ECL">
+    <title><emphasis role="bold">Command Line ECL</emphasis></title>
+
+    <sect1 id="Command_Line_Interface" role="nobrk">
+      <title>Command Line Interface</title>
+
+      <sect2 id="ECLPlus_exe">
+        <title><emphasis>ECLPlus.exe</emphasis></title>
+
+        <para><emphasis role="bold">eclplus </emphasis><emphasis> action=
+        owner= password= cluster= server= queue= timeout=
+        ecl=</emphasis><emphasis> file= format= output= jobname= -debugparam1=
+        _applicationparam1=</emphasis><emphasis>
+        /variablename1=</emphasis></para>
+
+        <para>
+      
+         <informaltable colsep="0" frame="none" rowsep="0">
+								            <tgroup cols="2">
+								              <colspec align="left" colwidth="125.55pt" />
+								
+				              <colspec colwidth="384.85pt" />
+              <tbody>
+                <row>
+                  <entry><emphasis>action=</emphasis></entry>
+
+                  <entry>One of the following options:
+                  list|view|dump|delete|abort|query|graph(the default option
+                  is “query”).</entry>
+                </row>
+
+                <row>
+                  <entry><emphasis>owner=</emphasis> </entry>
+
+                  <entry>Either the userid or a workunit identifier (in the
+                  form: wuid=&lt;wuid&gt;).</entry>
+                </row>
+
+                <row>
+                  <entry><emphasis>password=</emphasis></entry>
+
+                  <entry>The password authorizing access
+                   for the owner.</entry>
+                </row>
+
+                <row>
+                  <entry><emphasis>cluster=</emphasis></entry>
+
+                  <entry>The name of the cluster to
+        use.</entry>
+                </row>
+                                <row>
+								                  <entry><emphasis>server=</emphasis></entry>
+								
+								                  <entry>The URL or IP address of the ECL
+        Watch server.</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>queue=</emphasis> </entry>
+
+                  <entry>The name of the ECL server
+        queue.</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>timeout=</emphasis> </entry>
+
+                  <entry>Query timeout in seconds (0 for
+        asynchronous).</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>ecl=</emphasis> </entry>
+
+                  <entry>The ECL code to execute. Optionally,
+        this may be replaced by the name of an input file containing the ECL
+        to execute (in the form: @inputfile), or the name of a stored ECL file
+        to execute (in the form: $folder.eclfile).</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>file=</emphasis> </entry>
+
+                  <entry>The logical name of the file, or the
+        logical name with the starting and ending rows specified (in the form:
+        !logicalName[startrow,endrow]).</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>format=</emphasis> </entry>
+
+                  <entry>One of the following options:
+        default | csv | csvh | xml | runecl | bin(ary)</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>output=</emphasis> </entry>
+
+                  <entry>The name of the file to
+        output.</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>jobname=</emphasis> </entry>
+
+                  <entry>The name to give the job.</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>pagesize=</emphasis> </entry>
+
+                  <entry>The number of rows per page. If
+        omitted, the default is 500.</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>-debugparam=</emphasis> </entry>
+
+                  <entry>Debug parameters to pass on
+        the command line, in the form: -debugparam=debugvalue</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>_applicationparam=</emphasis></entry>
+
+                  <entry>Parameters to pass on the
+        command line, in the form: _applicationparam=applicationvalue</entry>
+                </row>                
+                <row>
+                  <entry><emphasis>/variablename= </emphasis></entry>
+
+                  <entry>Variables to pass on the
+        command line, in the form: /variablename=[(int)|(bool)] valueThe
+        default value type is string unless int or bool is specified (in
+        parentheses preceding the value). The
+        <emphasis>variablename</emphasis> is the STORED name of an EXL file in
+        your ECL code. <emphasis role="bold">Not yet
+        implemented.</emphasis></entry>
+                </row>                
+                
+              </tbody>
+            </tgroup>
+          </informaltable></para>
+
+        <para>The <emphasis role="bold">ECLPlus.exe</emphasis> application
+        accepts command line parameters to send directly to an ECL execution
+        engine. These options can be typed directly on the command line, sent
+        using a script or batch file, through an INI file, or any
+        combination.</para>
+
+        <sect3>
+          <title>ECLPLUS.INI</title>
+
+          <para>All the options can be put directly on the command line, or
+          placed in a file called ECLPLUS.INI. Options that do not change very
+          often should be put in the ini file. For example:</para>
+
+          <programlisting>server=10.150.50.12
+cluster=training
+queue=eclserver_training
+owner=rtor
+password=password</programlisting>
+
+          <para>In all the examples below, we'll assume eclplus.ini has the
+          above content.</para>
+
+          <para><informaltable colsep="1" frame="all" rowsep="1">
+              <tgroup cols="2">
+                <colspec colwidth="49.50pt" />
+
+                <colspec />
+
+                <tbody>
+                  <row>
+                    <entry><graphic fileref="images/caution.png"
+                    scale="noin" /></entry>
+
+                    <entry>We do not recommend storing your password in the
+                    INI file (which is clear text). The password is included
+                    in the INI file for these examples to simplify the example
+                    code.</entry>
+                  </row>
+                </tbody>
+              </tgroup>
+            </informaltable></para>
+        </sect3>
+
+        <sect3>
+          <title>Running queries in batch mode</title>
+
+          <para>Batch mode queries are executed using the
+          <emphasis>ecl=</emphasis> option, in any of its three forms. In the
+          first form you simply put your ECL code on the command line
+          itself:</para>
+
+          <programlisting>C:\&gt;Eclplus ecl=1+1
+            // Result = 2</programlisting>
+
+          <para>In the second form, your ECL code is in an input file. For
+          example, assume you have a text file called dataset.txt, which
+          contains the following ECL code:</para>
+
+          <programlisting>myrec := record
+string10 firstname,
+string10 lastname
+end;
+ds := dataset([{'Yanrui', 'Ma'}, {'Richard', 'Taylor'},
+{'Richard', 'Chapman'}], myrec);
+output(ds, ,'testdata::namesdb');</programlisting>
+
+          <para>Then if you run:</para>
+
+          <programlisting>C:\&gt;Eclplus @dataset.txt</programlisting>
+
+          <para>A dataset will be created and the result will be written to
+          the thor file testdata::namesdb.</para>
+
+          <para>If also have a text file called datasetquery.txt
+          containing:</para>
+
+          <programlisting>myrec := record
+string10 firstname,
+string10 lastname
+end;
+ds1 := dataset('testdata::namesdb', myrec, thor);
+output(ds1);</programlisting>
+
+          <para>then run:</para>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt</programlisting>
+
+          <para>You'll get:</para>
+
+          <programlisting>firstname lastname
+Yanrui Ma
+Richard Taylor
+Richard Chapman</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>Passing command line values to ECL files</title>
+
+          <para>Using the <emphasis>/variablename= </emphasis>command line
+          capability, you can pass in specific values to ECL files with the
+          STORED Workflow Service. Given this code in the repository attribute
+          MyECLFile.BWR_TestECLPlus: <emphasis role="bold">Not yet
+          implemented.</emphasis></para>
+
+          <programlisting>MyCount := 0 : STORED('Fred');
+        output(MyCount);</programlisting>
+
+          <para></para>
+
+          <para>This ECLPlus command line produces this result:</para>
+
+          <programlisting>C:\eclplus&gt;eclplus $MyModule.BWR_TestECLPlus
+          /Fred=(int)12
+Workunit W20091212-144654-963059896 submitted
+[Result 1]
+Result_1
+12</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>Workunit manipulation</title>
+
+          <para>A workunit is a data structure that is passed among eclplus,
+          daliserver, and eclserver. It contains realtime information about
+          the query, so you can control the process of a query by manipulating
+          the workunit.</para>
+        </sect3>
+
+        <sect3>
+          <title>List all work units</title>
+
+          <para>To list all work units:</para>
+
+          <programlisting>C:\&gt;Eclplus action=list</programlisting>
+
+          <para></para>
+
+          <para>The output looks like:</para>
+
+          <programlisting>WUID OWNER JOBNAME STATUS
+W20090226-100258-85132143 yma dataset.txt completed
+W20090226-100958-85552898 yma datasetquery.txt completed</programlisting>
+
+          <para></para>
+
+          <para></para>
+
+          <para>Each workunit has a WUID (WorkUnit IDentifier), owner, jobname
+          and status. You can see that the jobname is simply the filename that
+          contains the query, but you can specify the jobname by your self,
+          like this:</para>
+
+          <programlisting>C:\&gt;Eclplus jobname=myquery1 @datasetquery.txt</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>View the result of a certain workunit</title>
+
+          <para>You can look at specific workunit results, like this:</para>
+
+          <programlisting>C:\&gt;Eclplus action=view wuid=
+          W20090226-100958-85552898</programlisting>
+
+          <para>The output will look like:</para>
+
+          <programlisting>firstname lastname
+Yanrui Ma
+Richard Taylor
+Richard Chapman</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>Dump a workunit</title>
+
+          <para>If you want to get all the details describing a workunit, use
+          the dump option for the action parameter:</para>
+
+          <programlisting>C:\&gt;Eclplus action=dump wuid= W20090226-100958-85552898</programlisting>
+
+          <para>See the Workunit Dump section below for the result.</para>
+        </sect3>
+
+        <sect3>
+          <title>See the thor graph of a workunit:</title>
+
+          <para>The thor graph</para>
+
+          <programlisting>C:\&gt;Eclplus action=graph wuid=W20090226-100958-85552898</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>Aborting a workunit</title>
+
+          <para>If a query is taking an usually long time and you doubt
+          something is wrong, you can abort it by:</para>
+
+          <programlisting>C:\&gt;Eclplus action=abort wuid= W20090226-100958-85552898</programlisting>
+
+          <para>You can use list to find out the wuid the workunit and use
+          abort to abort it.</para>
+        </sect3>
+
+        <sect3>
+          <title>Timeout</title>
+
+          <para>Before you run a query, if you know the query is going to take
+          a long time, you can specify a timeout, then your eclplus will
+          return when it reaches the timeout, and the query will run in the
+          background.</para>
+
+          <para>For example:</para>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt timeout=0</programlisting>
+
+          <para>Eclplus will return immediately.</para>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt timeout=2</programlisting>
+
+          <para>Eclplus will return in 2 seconds.</para>
+
+          <para>You can list/view the workunit associated with the query to
+          monitor its status.</para>
+
+          <beginpage />
+        </sect3>
+
+        <sect3>
+          <title>Output format</title>
+
+          <para>By default, the result displays on the screen. You can direct
+          it to a file, by using the output option:</para>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt output=o1.txt
+C:\&gt;type o1.txt
+firstname lastname
+Yanrui Ma
+Richard Taylor
+Richard Chapman</programlisting>
+
+          <para>Also, you may specify the following output formats:</para>
+        </sect3>
+
+        <sect3>
+          <title>csv</title>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt format=csv
+[QUERY 0]
+"Yanrui ","Ma "
+"Richard ","Taylor "
+"Richard ","Chapman "</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>csvh</title>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt format=csvh
+[QUERY 0]
+"firstname","lastname"
+"Yanrui ","Ma "
+"Richard ","Taylor "
+"Richard ","Chapman "</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>raw</title>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt format=raw
+Yanrui     Ma
+Richard    Taylor
+Richard    Chapman</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>runecl</title>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt format=runecl
+[QUERY 0]
+[0]
+firstname -&gt; Yanrui
+lastname -&gt; Ma
+[1]
+firstname -&gt; Richard
+lastname -&gt; Taylor
+[2]
+firstname -&gt; Richard
+lastname -&gt; Chapman</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>bin(ary)</title>
+
+          <programlisting>C:\&gt;Eclplus @datasetquery.txt format=bin
+Yanrui Ma Richard Taylor Richard Chapman</programlisting>
+        </sect3>
+
+        <sect3>
+          <title>Running queries in Interactive mode</title>
+
+          <para>Assuming you have the ECLPLUS.INI file as listed above, when
+          you run eclplus without any options you will enter interactive
+          mode:</para>
+
+          <programlisting>C:\&gt;Eclplus
+Connected to:
+SDS=172.16.20.13 Queue=eclserver_linux_7way Cluster=linux_7way
+ECL&gt;</programlisting>
+
+          <para>Type in ? for a list of the available commands:</para>
+
+          <programlisting>ECL&gt; ?</programlisting>
+
+          <para>Supported commands:</para>
+
+          <informaltable colsep="0" frame="none" rowsep="0">
+            <tgroup cols="2">
+              <colspec align="left" colwidth="125.55pt" />
+
+              <colspec colwidth="384.85pt" />
+
+              <tbody>
+                <row>
+                  <entry>&lt;ecl&gt;</entry>
+
+                  <entry>executes the supplied ecl</entry>
+                </row>
+
+                <row>
+                  <entry>@file.ecl</entry>
+
+                  <entry>executes the ecl in file.ecl</entry>
+                </row>
+
+                <row>
+                  <entry>conn[ect] SDSserver</entry>
+
+                  <entry>connects to the specified SDS server</entry>
+                </row>
+
+                <row>
+                  <entry>disc[onnect]</entry>
+
+                  <entry>disconnects from the active SDS server</entry>
+                </row>
+
+                <row>
+                  <entry>l[ist] {line}</entry>
+
+                  <entry>list command history, or retrieve one line</entry>
+                </row>
+
+                <row>
+                  <entry>sta[rt] file.ecl</entry>
+
+                  <entry>executes the ecl in file.ecl</entry>
+                </row>
+
+                <row>
+                  <entry>setparam name=value</entry>
+
+                  <entry>set global variable name to value</entry>
+                </row>
+
+                <row>
+                  <entry>sav[e] file</entry>
+
+                  <entry>save ecl to a local file</entry>
+                </row>
+
+                <row>
+                  <entry>spo[ol] {file|off}</entry>
+
+                  <entry>send query output to a file, or the console if
+                  'off'</entry>
+                </row>
+
+                <row>
+                  <entry>exit</entry>
+
+                  <entry>exit ECLPlus</entry>
+                </row>
+
+                <row>
+                  <entry>quit</entry>
+
+                  <entry>exit ECLPlus</entry>
+                </row>
+
+                <row>
+                  <entry>ver[sion]</entry>
+
+                  <entry>display version information</entry>
+                </row>
+
+                <row>
+                  <entry>help</entry>
+
+                  <entry>displays this message</entry>
+                </row>
+
+                <row>
+                  <entry>?</entry>
+
+                  <entry>displays this message</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
+
+          <para>Most of the commands are self-explanatory. You can run a query
+          by typing in the ecl directly:</para>
+
+          <programlisting>ECL&gt; 1+1
+Result
+2</programlisting>
+
+          <para>Or by running a file that contains the query:</para>
+
+          <programlisting>ECL&gt; @datasetquery.txt
+firstname lastname
+Yanrui  Ma
+Richard Taylor
+Richard Chapman</programlisting>
+
+          <beginpage />
+        </sect3>
+
+        <sect3>
+          <title>Workunit Dump</title>
+
+          <para>A Workunit dump is an XML representation of every piece of
+          data in the workunit. This contains all the information that you
+          could discover about the workunit by using ECL Watch.</para>
+
+          <para>The following workunit dump came from a simple COUNT(person)
+          query in the Training environment:</para>
+
+          <programlisting>&lt;W20110615-160604 agentPID="4162" agentSession="4296042782" cloneable="1" 
+ clusterName="thor" codeVersion="138"  isClone="1" scope="hpccdemo" 
+ state="completed" submitID="hpccdemo" 
+ token="X1lUMJ6oacON/1anTHTQW1JVHr1bbY8EWTSJhlDOrtYxmD13Z5ly4Qd26sEYVtxhW"&gt;
+  &lt;Action&gt;run&lt;/Action&gt;
+  &lt;Debug&gt;
+    &lt;applyinstantecltransformations&gt;1&lt;/applyinstantecltransformations&gt;
+    &lt;applyinstantecltransformationslimit&gt;100&lt;/applyinstantecltransformationslimit&gt;
+    &lt;created_by&gt;ws_workunits&lt;/created_by&gt;
+    &lt;created_for&gt;hpccdemo&lt;/created_for&gt;
+    &lt;eclagentlog&gt;//192.168.237.132/var/log/HPCCSystems/myeclagent/eclagent.06_15_11.log
+    &lt;/eclagentlog&gt;
+    &lt;targetclustertype&gt;hthor&lt;/targetclustertype&gt;
+  &lt;/Debug&gt;
+  &lt;Query fetchEntire="1"&gt;
+    &lt;Associated&gt;
+      &lt;File crc="701142319" filename="libW20110615-160604.so" type="dll"/&gt;
+    &lt;/Associated&gt;
+    &lt;Text&gt;
+      &lt;Archive build="community_3.0.0" eclVersion="3.0.0"&gt;  &lt;Query 
+       originalFilename="C:\DOCUME~1\Hpccdemo\LOCALS~1\Temp\TFR2CE.tmp"&gt; 
+       OUTPUT(&amp;apos;Hello World&amp;apos;); &lt;/Query&gt; &lt;/Archive&gt;
+    &lt;/Text&gt;
+  &lt;/Query&gt;
+  &lt;resultLimit&gt;100&lt;/resultLimit&gt;
+  &lt;Results&gt;
+    &lt;Result fetchEntire="1" name="Result 1" sequence="0" status="calculated"&gt;
+      &lt;rowCount&gt;1&lt;/rowCount&gt;
+      &lt;SchemaRaw xsi:type="SOAP-ENC:base64"&gt; UmVzdWx0XzEABPH///8BYXNjaWkAAWFzY2lpAAAYAAAAAA== 
+      &lt;/SchemaRaw&gt;
+      &lt;totalRowCount&gt;1&lt;/totalRowCount&gt;
+      &lt;Value xsi:type="SOAP-ENC:base64"&gt; CwAAAEhlbGxvIFdvcmxk &lt;/Value&gt;
+    &lt;/Result&gt;
+  &lt;/Results&gt;
+  &lt;TimeStamps&gt;
+    &lt;TimeStamp application="workunit"&gt;
+      &lt;Created ts="1308153964"&gt; 2011-06-15T16:06:04Z &lt;/Created&gt;
+    &lt;/TimeStamp&gt;
+    &lt;TimeStamp application="EclAgent" instance="localhost.localdom"&gt;
+      &lt;Started ts="1308153971"&gt; 2011-06-15T16:06:11Z &lt;/Started&gt;
+    &lt;/TimeStamp&gt;
+    &lt;TimeStamp application="EclAgent" instance="localhost.localdom"&gt;
+      &lt;Finished ts="1308153971"&gt; 2011-06-15T16:06:11Z &lt;/Finished&gt;
+    &lt;/TimeStamp&gt;
+  &lt;/TimeStamps&gt;
+  &lt;Timings&gt;
+    &lt;Timing count="1" duration="1" max="1308040" name="WorkUnit_lockRemote"/&gt;
+    &lt;Timing count="1" duration="6" max="6577412" name="SDS_Initialize"/&gt;
+    &lt;Timing count="1" duration="0" max="704338" name="Environment_Initialize"/&gt;
+    &lt;Timing count="1" duration="16" max="16414003" name="Process"/&gt;
+  &lt;/Timings&gt;
+  &lt;Workflow&gt;
+    &lt;Item mode="normal" state="done" type="normal" wfid="1"&gt;
+      &lt;Schedule/&gt;
+    &lt;/Item&gt;
+  &lt;/Workflow&gt;
+&lt;/W20110615-160604&gt;</programlisting>
+        </sect3>
+      </sect2>
+    </sect1>
+  </chapter>
+</book>

File diff suppressed because it is too large
+ 1261 - 0
docs/CT_Comm_Line_Roxie.xml


+ 222 - 0
docs/CT_ECL_CLI.xml

@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book>
+  <bookinfo>
+    <title>Client Tools Component ECL CLI</title>
+
+    <author>
+      <firstname>Boca Raton</firstname>
+
+      <surname>Documentation Team</surname>
+
+      <affiliation>
+        <orgname>Lexis Nexis</orgname>
+      </affiliation>
+    </author>
+
+    <pubdate>Nov. 2011</pubdate>
+  </bookinfo>
+
+  <chapter id="ECL_CLI">
+    <title><emphasis role="bold">ECL Command Line Interface</emphasis></title>
+
+    <sect1 id="The_ECL_Command_Syntax" role="nobrk">
+      <title>The ECL Command Syntax</title>
+
+      <sect2>
+        <title></title>
+
+        <sect3 id="ecl_command_syntax">
+          <title><emphasis role="bold">ecl [</emphasis>--version<emphasis
+          role="bold">]</emphasis> &lt;command&gt; <emphasis
+          role="bold">[</emphasis>&lt;args&gt;<emphasis
+          role="bold">]</emphasis></title>
+
+          <para></para>
+
+          <informaltable colsep="0" frame="none" rowsep="0">
+            <tgroup cols="2">
+              <colspec align="left" colwidth="125.55pt" />
+
+              <colspec colwidth="384.85pt" />
+
+              <tbody>
+                <row>
+                  <entry><emphasis>--version=</emphasis></entry>
+
+                  <entry>displays version info.</entry>
+                </row>
+
+                <row>
+                  <entry><emphasis>valid &lt;command&gt;
+                  options</emphasis></entry>
+
+                  <entry></entry>
+                </row>
+
+                <row>
+                  <entry><emphasis>deploy=</emphasis></entry>
+
+                  <entry>executes the deploy command</entry>
+                </row>
+
+                <row>
+                  <entry><emphasis>publish=</emphasis></entry>
+
+                  <entry>executes the publish command</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
+        </sect3>
+
+        <sect3>
+          <title>ecl deploy</title>
+
+          <para>For example:</para>
+
+          <programlisting>ecl deploy</programlisting>
+
+          <para>Provides usage options for ecl deploy command.</para>
+
+          <para><informaltable colsep="0" frame="none" rowsep="0">
+              <tgroup cols="2">
+                <colspec align="left" colwidth="125.55pt" />
+
+                <colspec colwidth="384.85pt" />
+
+                <tbody>
+                  <row>
+                    <entry>ecl deploy</entry>
+
+                    <entry>executes the supplied ecl deploy command</entry>
+                  </row>
+
+                  <row>
+                    <entry></entry>
+                  </row>
+
+                  <row>
+                    <entry>--cluster=&lt;cluster&gt;</entry>
+
+                    <entry>cluster to associate workunit with</entry>
+                  </row>
+
+                  <row>
+                    <entry>--name=&lt;name&gt;</entry>
+
+                    <entry>workunit job name</entry>
+                  </row>
+
+                  <row>
+                    <entry>--server=&lt;ip&gt;</entry>
+
+                    <entry>ip of server running ecl services
+                    (eclwatch)</entry>
+                  </row>
+
+                  <row>
+                    <entry>--port=&lt;port&gt;</entry>
+
+                    <entry>ecl services port</entry>
+                  </row>
+
+                  <row>
+                    <entry>--username=&lt;name&gt;</entry>
+
+                    <entry>username for accessing ecl services</entry>
+                  </row>
+
+                  <row>
+                    <entry>--password=&lt;pw&gt;</entry>
+
+                    <entry>password for accessing ecl services</entry>
+                  </row>
+                </tbody>
+              </tgroup>
+            </informaltable></para>
+        </sect3>
+
+        <sect3>
+          <title>ecl publish</title>
+
+          <para>For example:</para>
+
+          <programlisting>ecl publish</programlisting>
+
+          <para>Provides usage options for ecl publish command.</para>
+
+          <para><informaltable colsep="0" frame="none" rowsep="0">
+              <tgroup cols="2">
+                <colspec align="left" colwidth="125.55pt" />
+
+                <colspec colwidth="384.85pt" />
+
+                <tbody>
+                  <row>
+                    <entry>ecl publish</entry>
+
+                    <entry>executes the supplied ecl publish command</entry>
+                  </row>
+
+                  <row>
+                    <entry></entry>
+                  </row>
+
+                  <row>
+                    <entry>--cluster=&lt;cluster&gt;</entry>
+
+                    <entry>cluster to associate workunit with</entry>
+                  </row>
+
+                  <row>
+                    <entry>--name=&lt;name&gt;</entry>
+
+                    <entry>workunit job name</entry>
+                  </row>
+
+                  <row>
+                    <entry>--wuid=&lt;wuid&gt;</entry>
+
+                    <entry>workunit id to publish</entry>
+                  </row>
+
+                  <row>
+                    <entry>--activate</entry>
+
+                    <entry>activates query when published</entry>
+                  </row>
+
+                  <row>
+                    <entry>--server=&lt;ip&gt;</entry>
+
+                    <entry>ip of server running ecl services
+                    (eclwatch)</entry>
+                  </row>
+
+                  <row>
+                    <entry>--port=&lt;port&gt;</entry>
+
+                    <entry>ecl services port</entry>
+                  </row>
+
+                  <row>
+                    <entry>--username=&lt;name&gt;</entry>
+
+                    <entry>username for accessing ecl services</entry>
+                  </row>
+
+                  <row>
+                    <entry>--password=&lt;pw&gt;</entry>
+
+                    <entry>password for accessing ecl services</entry>
+                  </row>
+                </tbody>
+              </tgroup>
+            </informaltable></para>
+        </sect3>
+      </sect2>
+    </sect1>
+  </chapter>
+</book>

File diff suppressed because it is too large
+ 3575 - 0
docs/CT_ECL_IDE.xml


+ 161 - 0
docs/CT_Overview.xml

@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="CT_Overview">
+  <title><emphasis role="bold">Overview</emphasis></title>
+
+  <para>This manual contains documentation for the set of Client Tools for use
+  with the LexisNexis HPCC. These tools include:</para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec align="left" colwidth="122.40pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis role="bold">ECL IDE</emphasis></entry>
+
+          <entry>An integrated development environment for ECL programmers to
+          create, edit, and execute ECL code.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">ECL Debugger</emphasis></entry>
+
+          <entry>A development tool integrated into the ECL IDE, which is used
+          to debug queries as they are developed.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">ECLPlus</emphasis></entry>
+
+          <entry>Command line ECL execution tool to facilitate automation of
+          ECL Code execution.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">ECL</emphasis></entry>
+
+          <entry>Command line ECL tool.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">ECL Compiler</emphasis></entry>
+
+          <entry>Command line ECL Compiler </entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">DFUPlus</emphasis></entry>
+
+          <entry>Command line Distributed File Utility management tool,
+          facilitate automation of data file spray, despray, and other common
+          file handling tasks.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">RoxieConfig</emphasis></entry>
+
+          <entry>Command line query management tool to facilitate automation
+          of Roxie Query management.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para><emphasis role="bold"> </emphasis></para>
+
+  <sect1 id="Documentation_Conventions">
+    <title>Documentation Conventions</title>
+
+    <sect2 id="ECL_Language">
+      <title><emphasis>ECL Language</emphasis></title>
+
+      <para>Although ECL is not case-sensitive, ECL reserved keywords and
+      built-in functions in this document are always shown in ALL CAPS to make
+      them stand out for easy identification.</para>
+
+      <sect3>
+        <title>Example Code</title>
+
+        <para>All example code in this document appears in the following
+        font:</para>
+
+        <programlisting>MyECLFileName := COUNT(Person);
+// MyECLFileName is a user-defined ECL file
+// COUNT is a built-in ECL function
+// Person is the name of a dataset</programlisting>
+
+        <para>ECL file names and record set names are always shown in example
+        code as mixed-case. Run-on words may be used to explicitly identify
+        purpose in examples.</para>
+      </sect3>
+
+      <sect3>
+        <title>Actions</title>
+
+        <para>In step-by-step sections, there will be explicit actions to
+        perform. These are all shown with a bullet to differentiate action
+        steps from explanatory text, as shown here:</para>
+
+        <para><itemizedlist>
+            <listitem>
+              <para>Keyboard and mouse actions are shown in small caps, such
+              as: DOUBLE-CLICK, or press the ENTER key. word.</para>
+            </listitem>
+
+            <listitem>
+              <para>On-screen items to select are shown in boldface, such as:
+              press the <emphasis role="bold">OK </emphasis>button.</para>
+            </listitem>
+          </itemizedlist></para>
+      </sect3>
+    </sect2>
+
+    <sect2 id="Installation">
+      <title><emphasis>Installation</emphasis></title>
+
+      <para>The installation program installs all client tools, including the
+      ECL IDE, ECLPlus, DFUPlus, and RoxieConfig. The installation program
+      provides the option to select which tools to install.</para>
+
+      <itemizedlist mark="bullet">
+        <listitem>
+          <para>From the CD, your Build Server, or your download:</para>
+        </listitem>
+
+        <listitem>
+          <para>Run <emphasis role="bold">setup.msi </emphasis>, then follow
+          the prompts</para>
+        </listitem>
+      </itemizedlist>
+
+      <para><emphasis>System Requirements</emphasis></para>
+
+      <para>The recommended system configuration is:</para>
+
+      <para>A Pentium III processor (or higher) and at least 128 megabytes
+      (MB) of RAM.</para>
+
+      <para>Microsoft Windows 2000, Windows XP, Windows Server 2003, Windows
+      Vista, Windows 7, or higher.</para>
+
+      <para>A full installation requires less than 16 MB of disk space.<!-- --></para>
+
+      <para>The optional Tutorial Data File is 100 MB.</para>
+
+      <para>In addition, you will need Internet Explorer 7 and have Active
+      Scripting support enabled (Javascript). If browser security is set to
+      High, you should add the ECLWatch IP (or DNS name) as a Trusted
+      Site.</para>
+
+      <para>Adobe Reader 5 (or higher) is required to view the documentation
+      PDF files.</para>
+
+      <para>GVC Viewer is used to display graphs in ECL Watch, RoxieConfig GUI
+      and ECL IDE. It is installed automatically.</para>
+    </sect2>
+  </sect1>
+</chapter>

+ 74 - 0
docs/ClientTools.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book lang="en_US">
+  <bookinfo>
+    <title>HPCC Client Tools</title>
+
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/redswooshWithLogo3.jpg" />
+      </imageobject>
+    </mediaobject>
+
+    <author>
+      <surname>Boca Raton Documentation Team</surname>
+    </author>
+
+    <legalnotice>
+      <para>We welcome your comments and feedback about this document via
+      email to <email>docfeedback@hpccsystems.com</email> Please include
+      <emphasis role="bold">Documentation Feedback</emphasis> in the subject
+      line and reference the document name, page numbers, and current Version
+      Number in the text of the message.</para>
+
+      <para>LexisNexis and the Knowledge Burst logo are registered trademarks
+      of Reed Elsevier Properties Inc., used under license. Other products,
+      logos, and services may be trademarks or registered trademarks of their
+      respective companies. All names and example data used in this manual are
+      fictitious. Any similarity to actual persons, living or dead, is purely
+      coincidental.</para>
+
+      <para></para>
+    </legalnotice>
+
+    <xi:include href="Version.xml" xpointer="FooterInfo"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+    <xi:include href="Version.xml" xpointer="DateVer"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+    <corpname>HPCC Systems</corpname>
+
+    <xi:include href="Version.xml" xpointer="Copyright"
+                xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+    <mediaobject role="logo">
+      <imageobject>
+        <imagedata fileref="images/LN_Rightjustified.jpg" />
+      </imageobject>
+    </mediaobject>
+  </bookinfo>
+
+  <xi:include href="CT_Overview.xml" xpointer="CT_Overview"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+              
+  <xi:include href="CT_ECL_IDE.xml" xpointer="The_ECL_Ide"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+              
+  <xi:include href="CT_Comm_Line_ECL.xml" xpointer="Command_Line_ECL"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+             
+  <xi:include href="CT_ECL_CLI.xml" xpointer="ECL_CLI"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+                
+  <xi:include href="ECLCC.xml" xpointer="ECL_Compiler"
+              xmlns:xi="http://www.w3.org/2001/XInclude" />
+                       
+  <xi:include href="CT_Comm_Line_DFU.xml" xpointer="Command_Line_DFU"
+               xmlns:xi="http://www.w3.org/2001/XInclude" />
+  
+  <xi:include href="CT_Comm_Line_Roxie.xml" xpointer="Command_Line_Interface_RoxieConfig"
+               xmlns:xi="http://www.w3.org/2001/XInclude" />
+   
+</book>

File diff suppressed because it is too large
+ 1063 - 0
docs/CommonItems.xml


+ 485 - 0
docs/DaliAdmin.xml

@@ -0,0 +1,485 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book>
+  <title>Dali Admin</title>
+
+  <bookinfo>
+    <title>Administering Dali</title>
+
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/redswooshWithLogo3.jpg" />
+      </imageobject>
+    </mediaobject>
+
+    <author>
+      <surname>Boca Raton Documentation Team</surname>
+    </author>
+
+    <legalnotice>
+      <para>We welcome your comments and feedback about this document via
+      email to <email>docfeedback@hpccsystems.com</email> Please include
+      <emphasis role="bold">Documentation Feedback</emphasis> in the subject
+      line and reference the document name, page numbers, and current Version
+      Number in the text of the message.</para>
+
+      <para>LexisNexis and the Knowledge Burst logo are registered trademarks
+      of Reed Elsevier Properties Inc., used under license. Other products,
+      logos, and services may be trademarks or registered trademarks of their
+      respective companies. All names and example data used in this manual are
+      fictitious. Any similarity to actual persons, living or dead, is purely
+      coincidental.</para>
+
+      <para></para>
+    </legalnotice>
+
+    <releaseinfo>© 2011 HPCC Systems. All rights reserved</releaseinfo>
+
+    <date>3.0.0_x</date>
+
+    <corpname>HPCC Systems</corpname>
+
+    <copyright>
+      <year>May, 2011</year>
+    </copyright>
+
+    <mediaobject role="logo">
+      <imageobject>
+        <imagedata fileref="images/LN_Rightjustified.jpg" />
+      </imageobject>
+    </mediaobject>
+  </bookinfo>
+
+  <chapter>
+    <title><emphasis role="bold">Dali Admin</emphasis></title>
+
+    <para>DaliAdmin is an administrator's command line tool to diagnose and
+    fix problems in an HPCC's System Data Store inside the Dali Server.</para>
+
+    <para>Daliadmin can be found at opt/LexisNexis/bin/, along with other
+    tools the HPCC installation package installs.</para>
+
+    <sect1>
+      <title><emphasis>Dali Admin usage</emphasis></title>
+
+      <para>Daliadmin is a command line tool to with the System Data Store in
+      your Dali server.</para>
+
+      <para>Usage:</para>
+
+      <para>daliadmin &lt;command&gt; { &lt;options&gt; }</para>
+
+      <para><programlisting>daliadmin &lt;command&gt; { &lt;options&gt; }
+</programlisting></para>
+
+      <para></para>
+
+      <para>More text and further descriptions of daliadmin to come...</para>
+
+      <para></para>
+
+      <para></para>
+
+      <para>Data Store commands:</para>
+
+      <para><informaltable>
+          <?dbfo keep-together="always"?>
+
+          <tgroup cols="2">
+            <tbody>
+              <row>
+                <entry>export &lt;branchxpath&gt; &lt;destfile&gt;</entry>
+
+                <entry>exports specified branches to the nominated
+                file...</entry>
+              </row>
+
+              <row>
+                <entry>import &lt;branchxpath&gt; &lt;srcfile&gt;</entry>
+
+                <entry>imports branches from the nominated file..</entry>
+              </row>
+
+              <row>
+                <entry>importadd &lt;branchxpath&gt; &lt;srcfile&gt;</entry>
+
+                <entry>Adds to import ***</entry>
+              </row>
+
+              <row>
+                <entry>delete &lt;branchxpath&gt;</entry>
+
+                <entry>deletes the specified branch</entry>
+              </row>
+
+              <row>
+                <entry>set &lt;xpath&gt; &lt;value&gt;</entry>
+
+                <entry>sets single value to a single</entry>
+              </row>
+
+              <row>
+                <entry>get &lt;xpath&gt;</entry>
+
+                <entry>get single value</entry>
+              </row>
+
+              <row>
+                <entry>bget &lt;xpath&gt; &lt;dest-file&gt;</entry>
+
+                <entry>binary property</entry>
+              </row>
+
+              <row>
+                <entry>xget &lt;xpath&gt;</entry>
+
+                <entry>(multi-value tail can have commas)</entry>
+              </row>
+
+              <row>
+                <entry>wget &lt;xpath&gt;</entry>
+
+                <entry>(gets all matching xpath)</entry>
+              </row>
+
+              <row>
+                <entry>addp &lt;xpath&gt; &lt;value&gt;</entry>
+
+                <entry>adds value</entry>
+              </row>
+
+              <row>
+                <entry>delp &lt;xpath&gt;</entry>
+
+                <entry>deletes path</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para></para>
+
+      <para>Logical File meta information command:</para>
+
+      <para><informaltable>
+          <?dbfo keep-together="always"?>
+
+          <tgroup cols="2">
+            <tbody>
+              <row>
+                <entry>dfsfile &lt;logicalname&gt;</entry>
+
+                <entry>get meta information for file</entry>
+              </row>
+
+              <row>
+                <entry>dfspart &lt;logicalname&gt; &lt;part-num&gt;</entry>
+
+                <entry>get meta information for part</entry>
+              </row>
+
+              <row>
+                <entry>dfscsv &lt;logicalnamemask&gt;</entry>
+
+                <entry>get csv description for files matching mask</entry>
+              </row>
+
+              <row>
+                <entry>dfsgroup &lt;logicalgroupname&gt;</entry>
+
+                <entry>get IPs for logical group (aka cluster)</entry>
+              </row>
+
+              <row>
+                <entry>dfsmap &lt;logicalname&gt;</entry>
+
+                <entry>get part files (primary and replicates)</entry>
+              </row>
+
+              <row>
+                <entry>dfsexists &lt;logicalname&gt;</entry>
+
+                <entry>sets return value to 0 if logical file exists</entry>
+              </row>
+
+              <row>
+                <entry>dfsparents &lt;logicalname&gt;</entry>
+
+                <entry>list superfiles containing file</entry>
+              </row>
+
+              <row>
+                <entry>dfssuperunlink &lt;logicalname&gt;</entry>
+
+                <entry>unlinks file from all super parents</entry>
+              </row>
+
+              <row>
+                <entry>dfsverify &lt;logicalname&gt; crc</entry>
+
+                <entry>verifies parts exist and (optionaly) match crc</entry>
+              </row>
+
+              <row>
+                <entry>setprotect &lt;logicalname&gt; &lt;id&gt;</entry>
+
+                <entry>overwrite protects logical file</entry>
+              </row>
+
+              <row>
+                <entry>unprotect &lt;logicalname&gt; &lt;id&gt;</entry>
+
+                <entry>unprotect file (if id=* then clear all)</entry>
+              </row>
+
+              <row>
+                <entry>listprotect &lt;logicalnamemask&gt;
+                &lt;id-mask&gt;</entry>
+
+                <entry>list protected files</entry>
+              </row>
+
+              <row>
+                <entry>checksuperfile &lt;superfilename&gt;</entry>
+
+                <entry>check superfile linkage consistent</entry>
+              </row>
+
+              <row>
+                <entry>checksubfile &lt;subfilename&gt;</entry>
+
+                <entry>check subfile links to parent</entry>
+              </row>
+
+              <row>
+                <entry>listexpires &lt;logicalnamemask&gt;</entry>
+
+                <entry>lists logical files with expiry value</entry>
+              </row>
+
+              <row>
+                <entry>listrelationships &lt;primary&gt; secondary&gt;</entry>
+
+                <entry>lists relations set up</entry>
+              </row>
+
+              <row>
+                <entry>dfsperm &lt;logicalname&gt;</entry>
+
+                <entry>returns LDAP permission for logical file access</entry>
+              </row>
+
+              <row>
+                <entry>dfscompratio &lt;logicalname&gt;</entry>
+
+                <entry>returns size and compression ratio of logical
+                file</entry>
+              </row>
+
+              <row>
+                <entry>dfsscopes &lt;mask&gt;</entry>
+
+                <entry>lists logical file scopes</entry>
+              </row>
+
+              <row>
+                <entry>cleanscopes &lt;mask&gt;</entry>
+
+                <entry>remove empty scopes</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para></para>
+
+      <para>Workunit commands:</para>
+
+      <para><informaltable>
+          <?dbfo keep-together="always"?>
+
+          <tgroup cols="2">
+            <tbody>
+              <row>
+                <entry>listworkunits &lt;workunit-mask&gt;
+                [&lt;prop&gt;=&lt;val&gt; &lt;lower&gt; &lt;upper&gt;]
+                workunittimings &lt;WUID&gt;</entry>
+
+                <entry>csv of graph timings</entry>
+              </row>
+
+              <row>
+                <entry>saveworkunitarchive &lt;WUID&gt; &lt;file&gt;</entry>
+
+                <entry>sets result to 0 if exists</entry>
+              </row>
+
+              <row>
+                <entry>loadworkunitarchive &lt;WUID&gt; &lt;file&gt;</entry>
+
+                <entry>sets result to 0 if exists</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para></para>
+
+      <para>Other dali server and misc commands:</para>
+
+      <informaltable>
+        <?dbfo keep-together="always"?>
+
+        <tgroup cols="2">
+          <tbody>
+            <row>
+              <entry>serverlist &lt;mask&gt;</entry>
+
+              <entry>list server IPs (mask optional)</entry>
+            </row>
+
+            <row>
+              <entry>clusterlist &lt;mask&gt;</entry>
+
+              <entry>list clusters (mask optional)</entry>
+            </row>
+
+            <row>
+              <entry>queuelist &lt;mask&gt;</entry>
+
+              <entry>list active queues (mask optional)</entry>
+            </row>
+
+            <row>
+              <entry>clientlist &lt;mask&gt;</entry>
+
+              <entry>list all current connected clients</entry>
+            </row>
+
+            <row>
+              <entry>getauditlog &lt;fromdate&gt; &lt;todate&gt;
+              &lt;match&gt;</entry>
+
+              <entry>get dali audit log text</entry>
+            </row>
+
+            <row>
+              <entry>storecoalesce</entry>
+
+              <entry>force dali server transaction log coalesce</entry>
+            </row>
+
+            <row>
+              <entry>mpping &lt;server-ip&gt;</entry>
+
+              <entry>time MP connect (sets result no zero if failed)</entry>
+            </row>
+
+            <row>
+              <entry>daliping</entry>
+
+              <entry>time dali client connect (sets result)</entry>
+            </row>
+
+            <row>
+              <entry>daliperf</entry>
+
+              <entry>return 'busy' measure for dali server</entry>
+            </row>
+
+            <row>
+              <entry>getxref &lt;destxmlfile&gt;</entry>
+
+              <entry>get all XREF information</entry>
+            </row>
+
+            <row>
+              <entry>dalilocks</entry>
+
+              <entry>get all locked paths (e.g. files)</entry>
+            </row>
+
+            <row>
+              <entry>daliunlock</entry>
+
+              <entry>unlocks a path</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+
+      <para></para>
+
+      <para>Common options:</para>
+
+      <para>(can be placed in daliadmin.ini)</para>
+
+      <para><informaltable>
+          <?dbfo keep-together="always"?>
+
+          <tgroup cols="2">
+            <tbody>
+              <row>
+                <entry>server=&lt;dali-server-ip&gt;</entry>
+
+                <entry>required</entry>
+              </row>
+
+              <row>
+                <entry>user=&lt;username&gt;</entry>
+
+                <entry>for file operations</entry>
+              </row>
+
+              <row>
+                <entry>password=&lt;password&gt;</entry>
+
+                <entry>for file operations</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para></para>
+
+      <para></para>
+
+      <para></para>
+
+      <sect2>
+        <title>XPATH Syntax</title>
+
+        <para>The XPATH Syntax can be entered in alternative method on the
+        command line making it easier to enter commands without having to
+        escape. Take for intsance the expression:</para>
+
+        <para><programlisting> x/y[@id="z"]</programlisting></para>
+
+        <para>This can be alternatively expressed as:</para>
+
+        <para><programlisting> x/y[@id=z] </programlisting></para>
+
+        <para>if z doesn't contain the character ']'</para>
+
+        <para>Alternatively the same statement can be constructed as :</para>
+
+        <para><programlisting>x/y[@id='z']</programlisting> another example in
+        the following statement, if z does not contain a '}]' character
+        string, you can use:</para>
+
+        <para><programlisting>x/y[@id={z}] </programlisting></para>
+
+        <para></para>
+
+        <para>The above examples make using xpaths easier from the command
+        line by removing need to always escape quotes.</para>
+
+        <para></para>
+
+        <para>LFN(&lt;logicalname&gt;) expands to file xpath for the logical
+        filename</para>
+      </sect2>
+    </sect1>
+  </chapter>
+</book>

File diff suppressed because it is too large
+ 1314 - 0
docs/DataHandling.xml


File diff suppressed because it is too large
+ 1390 - 0
docs/DataTutorial.xml


+ 524 - 0
docs/ECLCC.xml

@@ -0,0 +1,524 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<book>
+  <bookinfo>
+    <title>The ECL Compiler</title>
+
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="images/redswooshWithLogo3.jpg" />
+      </imageobject>
+    </mediaobject>
+
+    <author>
+      <surname>Boca Raton Documentation Team</surname>
+    </author>
+
+    <legalnotice>
+      <para>We welcome your comments and feedback about this document via
+      email to <email>docfeedback@hpccsystems.com</email> Please include
+      <emphasis role="bold">Documentation Feedback</emphasis> in the subject
+      line and reference the document name, page numbers, and current Version
+      Number in the text of the message.</para>
+
+      <para>LexisNexis and the Knowledge Burst logo are registered trademarks
+      of Reed Elsevier Properties Inc., used under license. Other products,
+      logos, and services may be trademarks or registered trademarks of their
+      respective companies. All names and example data used in this manual are
+      fictitious. Any similarity to actual persons, living or dead, is purely
+      coincidental.</para>
+
+      <para></para>
+    </legalnotice>
+
+    <releaseinfo>© 2011 HPCC Systems. All rights reserved</releaseinfo>
+
+    <date><emphasis role="bold">BETA</emphasis> </date>
+
+    <corpname>HPCC Systems</corpname>
+
+    <copyright>
+      <year>2011 HPCC Systems. All rights reserved</year>
+    </copyright>
+
+    <mediaobject role="logo">
+      <imageobject>
+        <imagedata fileref="images/LN_Rightjustified.jpg" />
+      </imageobject>
+    </mediaobject>
+  </bookinfo>
+
+  <chapter id="ECL_Compiler">
+    <title><emphasis role="bold">ECL Compiler</emphasis></title>
+
+    <para>The ECL Compiler is the compiler component of the High Performance
+    Computing Cluster (HPCC). It is embedded and included when you install the
+    HPCC. The compiler is the component that actually compiles the ECL code.
+    </para>
+
+    <para>The syntax and many of the compiler options implemented are similar
+    to the gcc compiler. You can execute either the Linux or Windows version
+    of eclcc, which, when run, load several of our shared objects (SO files,
+    on Linux) or DLLs (on Windows). The ECL Compiler can process hThor, Thor,
+    or Roxie targeted ECL code.</para>
+
+    <para><!--*** Now ECLCC is actually embedded in the HPCC - delivered with the RPMs--><informaltable
+        colsep="1" frame="all" rowsep="1">
+        <?dbfo keep-together="always"?>
+
+        <tgroup cols="2">
+          <colspec colwidth="49.50pt" />
+
+          <colspec />
+
+          <tbody>
+            <row>
+              <entry><inlinegraphic fileref="images/OSSgr3.png" /></entry>
+
+              <entry>To compile and run ECL code locally on your Windows
+              machine, you will need the Microsoft Visual Studio 2008 C++
+              compiler (either Express or Professional edition). This is
+              available from <ulink
+              url="http://www.microsoft.com/express/Downloads/#2008-Visual-CPP">http://www.microsoft.com/express/Downloads/#2008-Visual-CPP</ulink></entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable><!--  ***this whole thing should be comment!
+      /sect2 id="configuration-manager"/
+        <title>Dependencies and packages</title>
+
+        <para>Running eclcc depends on having these required component
+        packages listed below installed on the system.</para>
+
+        <itemizedlist mark="square">
+          <listitem>
+            <para>Microsoft Visual C++</para>
+          </listitem>
+
+          <listitem>
+            <para>Visual Studio 9 (Visual Studio 10 requires to manually set
+            the ENVIRONMENT VS90COMNTOOLS == C:\ProgramFiles\Microsoft Visual
+            Studio 10.0\Common7\Tools)</para>
+
+            <para>Can download from <ulink
+            url="http://www.microsoft.com/express/Downloads/#2008-Visual-CPP">http://www.microsoft.com/express/Downloads/#2008-Visual-CPP</ulink></para>
+          </listitem>
+
+          <listitem>
+            <para>Other Dependencies maybe required***
+            </para>
+              </listitem>
+            </itemizedlist>
+      //sect2/
+         ***END OF COMMENT***   --></para>
+
+    <sect1 id="Stand-Alone-ECL-Compiler">
+      <title><emphasis>Using the ECL Compiler as a Stand Alone option
+      </emphasis></title>
+
+      <para>The ECL Compiler is normally used through the ECL IDE, however,
+      you can use the ECL Compiler in a stand alone manner, to create stand
+      alone programs, or workunits. The ECL Compiler can read ECL code from
+      standard input, or can read it from a specified input file. It compiles
+      the code into an executable program (Such as an ‘EXE’ file in Windows).
+      The resulting program, when executed, runs the job, writing any output
+      to standard output. Alternatively, you could redirect the output to a
+      file or pipe into another process. With the ECL Compiler, you do not
+      need a supercomputer cluster to develop and run ECL code. </para>
+
+      <para>Running the ECL Compiler without any options (or specifying –help)
+      will display the syntax.</para>
+
+      <para><programlisting>C:\eclcc&gt;eclcc -help
+</programlisting></para>
+
+      <para>Usage: eclcc &lt;options&gt; ECL_file.ecl</para>
+
+      <para>General options:</para>
+
+      <para> <informaltable colsep="0" frame="none" rowsep="0">
+
+          <?dbfo keep-together="always"?>
+
+								            <tgroup cols="2">
+								              <colspec align="left" colwidth="125.55pt" />
+								
+				              <colspec colwidth="384.85pt" />
+            <tbody>
+              <row>
+                <entry>-g</entry>
+
+                <entry>Enable debug symbols in generated code</entry>
+              </row>
+
+              <row>
+                <entry>-I<emphasis>path</emphasis></entry>
+
+                <entry>Add path to locations to search for ecl imports</entry>
+              </row>
+
+              <row>
+                <entry>-L<emphasis>path</emphasis></entry>
+
+                <entry>Add path to locations to search for system
+                libraries</entry>
+              </row>
+
+              <row>
+                <entry>-o<emphasis>file</emphasis></entry>
+
+                <entry>Specify name of output file (default a.out if linking
+                to executable, or stdout)</entry>
+              </row>
+
+              <row>
+                <entry>-P<emphasis>path</emphasis></entry>
+
+                <entry>Specify the path of the output files</entry>
+              </row>
+
+              <row>
+                <entry>-Wc,xx</entry>
+
+                <entry>Supply option for the c++ compiler</entry>
+              </row>
+
+              <row>
+                <entry>-save-temps</entry>
+
+                <entry>Do not delete intermediate files (implied if
+                -g)</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para><informaltable colsep="1" frame="all">
+          <?dbfo keep-together="always"?>
+
+          <tgroup cols="2">
+           <colspec colwidth="49.50pt" />
+					
+           <colspec />
+            <tbody>
+              <row>
+                <entry><inlinegraphic fileref="images/OSSgr3.png" /></entry>
+
+                <entry><emphasis role="bold">NOTE: </emphasis>If there are
+                spaces in the path you specify, put it in quotes. For example:
+                –L"C:\Program Files"</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para>ECL options:</para>
+
+      <para>
+          <informaltable colsep="0" frame="none" rowsep="0">
+					
+					          <?dbfo keep-together="always"?>
+					
+													            <tgroup cols="2">
+													              <colspec align="left" colwidth="125.55pt" />
+													
+				              <colspec colwidth="384.85pt" />
+            <tbody>
+              <row>
+                <entry>-E</entry>
+
+                <entry>Output preprocessed ECL in xml archive form</entry>
+              </row>
+
+              <row>
+                <entry>-S</entry>
+
+                <entry>Generate c++ output, but don't compile</entry>
+              </row>
+
+              <row>
+                <entry>-foption[=value]</entry>
+
+                <entry>Set an ecl option (#option)</entry>
+              </row>
+
+              <row>
+                <entry>-shared</entry>
+
+                <entry>Generate workunit shared object instead of a stand
+                alone exe</entry>
+              </row>
+
+              <row>
+                <entry>-target=hthor</entry>
+
+                <entry>Generate code for hthor executable (default)</entry>
+              </row>
+
+              <row>
+                <entry>-target=roxie</entry>
+
+                <entry>Generate code for roxie cluster</entry>
+              </row>
+
+              <row>
+                <entry>-target=thor</entry>
+
+                <entry>Generate code for thor cluster</entry>
+              </row>
+
+              <row>
+                <entry>-wu</entry>
+
+                <entry>Only generate workunit informaton as xml file</entry>
+              </row>
+              
+              <row>
+                <entry>-manifest=&lt;manifest file path&gt;</entry>
+
+                <entry>Specifies the manifest file containing the resources to include</entry>
+              </row>
+              
+              </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para></para>
+
+      <?dbfo-need height="3in"?>
+
+      <para>Other options:</para>
+
+      <para><informaltable colsep="0" frame="none" rowsep="0">
+
+          <?dbfo keep-together="always"?>
+
+								            <tgroup cols="2">
+								              <colspec align="left" colwidth="125.55pt" />
+								
+				              <colspec colwidth="384.85pt" />
+            <tbody>
+              <row>
+                <entry>-b</entry>
+
+                <entry>Batch mode. Each source file is processed in turn.
+                Output name depends on the input filename</entry>
+              </row>
+
+              <row>
+                <entry>-c</entry>
+
+                <entry>compile only (don't link)</entry>
+              </row>
+
+              <row>
+                <entry>-help</entry>
+
+                <entry>Display this message</entry>
+              </row>
+
+              <row>
+                <entry>--help</entry>
+
+                <entry>Display this message</entry>
+              </row>
+
+              <row>
+                <entry>--logdetail=n</entry>
+
+                <entry>Set the level of detail in the log file</entry>
+              </row>
+
+              <row>
+                <entry>--logfile file</entry>
+
+                <entry>Write log to specified file</entry>
+              </row>
+
+              <row>
+                <entry>-specs file</entry>
+
+                <entry>Read eclcc configuration from specified file</entry>
+              </row>
+
+              <row>
+                <entry>-v --verbose</entry>
+
+                <entry>Output additional tracing information while
+                compiling</entry>
+              </row>
+
+              <row>
+                <entry>--version</entry>
+
+                <entry>Output version information</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+
+      <para></para>
+    </sect1>
+
+    <sect1 id="compiled_options">
+      <title>Compiled Options:</title>
+
+      <para>After you have successfully compiled the code, it produces an
+      executable file. There are a few additional options that can be used
+      when running that executable.</para>
+
+      <para>Usage: a.out &lt;options&gt;</para>
+
+      <para><informaltable colsep="0" frame="none" rowsep="0">
+
+          <?dbfo keep-together="always"?>
+
+								            <tgroup cols="2">
+								              <colspec align="left" colwidth="125.55pt" />
+								
+				              <colspec colwidth="384.85pt" />
+            <tbody>
+              <row>
+                <entry>-wu=&lt;file&gt;</entry>
+
+                <entry>Write XML formatted workunit to given filespec and
+                exit</entry>
+              </row>
+
+              <row>
+                <entry>-xml</entry>
+
+                <entry>Display output as XML</entry>
+              </row>
+
+              <row>
+                <entry>-raw</entry>
+
+                <entry>Display output as binary</entry>
+              </row>
+
+              <row>
+                <entry>-limit=x</entry>
+
+                <entry>Limit number of output rows</entry>
+              </row>
+
+              <row>
+                <entry>--help</entry>
+
+                <entry>Display help text</entry>
+              </row>
+            </tbody>
+          </tgroup>
+        </informaltable></para>
+    </sect1>
+
+    <sect1 id="Examples">
+      <title>Examples</title>
+
+      <para>The following example demonstrates what you can do once the ECL
+      Compiler is installed and operational.</para>
+
+      <sect2>
+        <title>Running a basic ECL program using the command line
+        compiler</title>
+
+        <para>Once the ECL Compiler is installed, you can use the ECL Compiler
+        to run an ECL program.</para>
+
+        <itemizedlist>
+          <listitem>
+            <para>Create a file called hello.ecl, and type in the
+            text<programlisting>Output('Hello world'); </programlisting></para>
+
+            <para>(including the quotes) into the file.</para>
+
+            <para>You can either use your favorite editor, or you can use the
+            command line by typing the following (for Windows systems):</para>
+
+            <para><programlisting>echo Output('Hello world'); &gt; hello.ecl</programlisting></para>
+
+            <para>on a Linux system you would need to escape some characters
+            as follows:</para>
+
+            <para><programlisting>echo "Output('Hello world');" &gt; hello.ecl</programlisting></para>
+          </listitem>
+
+          <listitem>
+            <para>Compile your program using the ECL Compiler by issuing the
+            following command:</para>
+
+            <para><programlisting>eclcc hello.ecl</programlisting><!--*** Need to tell them where to run this  --></para>
+
+            <!--  ***COMMENTED OUT per authors discretion - this code is just messy when talking about multiple platforms! 
+              If you prefer, you can pipe the source code directly into the
+            compiler as shown in the following example:
+            <para><programlisting>echo \'hello again\'| eclcc -</programlisting></para> -->
+          </listitem>
+
+          <listitem>
+            <para>An executable file is created which you can run by typing
+            the following:</para>
+
+            <para>on Linux systems:</para>
+
+            <para><programlisting>   ./a.out
+</programlisting></para>
+
+            <para>on Windows systems:</para>
+
+            <para><programlisting>   a.out</programlisting>This will generate
+            the output "Hello world" (excluding quotes), to the std output,
+            your terminal window in this example. You can redirect or pipe the
+            output to a file or program if you choose. This simple example
+            will verify the compiler is working properly.</para>
+          </listitem>
+        </itemizedlist>
+      </sect2>
+
+      <sect2 id="Compile_with_options">
+        <title>Compile with Options</title>
+
+        <para>Once verified that the ECL Compiler is working correctly, you
+        can try using some of the options. One such variation might be to
+        specify the -o option which allows us to input more meaningful output
+        filename of Hello.</para>
+
+        <para><programlisting>eclcc -oHello hello.ecl</programlisting>This
+        produces a file called "Hello", which can now be run from the command
+        line.</para>
+
+        <para>on Linux systems:</para>
+
+        <programlisting>   ./Hello
+</programlisting>
+
+        <para>on Windows systems:</para>
+
+        <para><programlisting>   Hello</programlisting>This will result in the
+        output of the following.</para>
+
+        <para><programlisting>Hello world</programlisting></para>
+
+        <para>There are additional options that can be used when running the
+        executable. Using our Hello program, as an example, we can execute it
+        with an option to generate different output. One such option is the
+        -xml option which generates the output in an XML format.</para>
+
+        <para>on Linux systems:</para>
+
+        <programlisting>   ./Hello -xml
+</programlisting>
+
+        <para>on Windows systems:</para>
+
+        <para><programlisting>   Hello -xml</programlisting></para>
+
+        <para>This would result in the output of the following:</para>
+
+        <programlisting>&lt;Dataset name="Result 1"&gt;&lt;Row&gt;&lt;Result_1&gt;Hello world&lt;/Result_1&gt;&lt;/Row&gt;&lt;/Dataset&gt;</programlisting>
+      </sect2>
+    </sect1>
+  </chapter>
+</book>

File diff suppressed because it is too large
+ 1231 - 0
docs/ECLR.xml


+ 253 - 0
docs/ECLR_mods/AlienData-TypeStrucSpecial.xml

@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Type_Sturcture_Special_Functions">
+  <title>TYPE Structure Special Functions</title>
+
+  <sect2>
+    <title>LOAD</title>
+
+    <para><emphasis role="bold">EXPORT<indexterm>
+        <primary>EXPORT</primary>
+      </indexterm> </emphasis><emphasis>LogicalType </emphasis><emphasis
+    role="bold">LOAD<indexterm>
+        <primary><emphasis role="bold">LOAD</emphasis></primary>
+      </indexterm>(</emphasis><emphasis>PhysicalType alias) :=
+    expression;</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>LogicalType</emphasis></entry>
+
+            <entry>The value type of the resulting output of the
+            function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>PhysicalType</emphasis></entry>
+
+            <entry>The value type of the input parameter to the
+            function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>alias</emphasis></entry>
+
+            <entry>The name of the input to use in the
+            <emphasis>expression</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The operation to perform on the input.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para><emphasis role="bold">LOAD </emphasis>defines the callback function
+    to be applied to the bytes of the record to create the data value to be
+    used in the computation. This function defines how the system reads the
+    data from disk.</para>
+  </sect2>
+
+  <sect2 id="store">
+    <title>STORE</title>
+
+    <para><emphasis role="bold">EXPORT </emphasis><emphasis>PhysicalType
+    </emphasis><emphasis role="bold">STORE<indexterm>
+        <primary><emphasis role="bold">STORE</emphasis></primary>
+      </indexterm>(</emphasis><emphasis>LogicalType alias) :=
+    expression;</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>PhysicalType</emphasis></entry>
+
+            <entry>The value type of the resulting output of the
+            function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>LogicalType</emphasis></entry>
+
+            <entry>The value type of the input parameter to the
+            function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>alias</emphasis></entry>
+
+            <entry>The name of the input to use in the
+            <emphasis>expression</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The operation to perform on the input.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para><emphasis role="bold">STORE</emphasis> defines the callback function
+    to be applied to the computed value to store it within the record. This
+    function defines how the system writes the data to disk.</para>
+  </sect2>
+
+  <sect2 id="physicallegnth">
+    <title>PHYSICALLENGTH</title>
+
+    <para><emphasis role="bold">EXPORT INTEGER<indexterm>
+        <primary><emphasis role="bold">INTEGER</emphasis></primary>
+      </indexterm> PHYSICALLENGTH<indexterm>
+        <primary><emphasis role="bold">PHYSICALLENGTH</emphasis></primary>
+      </indexterm>(</emphasis><emphasis>type alias) :=
+    expression;</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>type</emphasis></entry>
+
+            <entry>The value type of the input parameter to the
+            function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>alias</emphasis></entry>
+
+            <entry>The name of the input to use in the
+            <emphasis>expression</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The operation to perform on the input.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para><emphasis role="bold">PHYSICALLENGTH </emphasis>defines the callback
+    function to determine the storage requirements of the logical format in
+    the specified physical format. This function defines how many bytes the
+    data occupies on disk.</para>
+  </sect2>
+
+  <sect2 id="maxlength">
+    <title>MAXLENGTH</title>
+
+    <para><emphasis role="bold">EXPORT INTEGER MAXLENGTH<indexterm>
+        <primary><emphasis role="bold">MAXLENGTH</emphasis></primary>
+      </indexterm></emphasis><emphasis> := expression;</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>An integer constant defining the maximum physical length of
+            the data.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para><emphasis role="bold">MAXLENGTH </emphasis>defines the callback
+    function to determine the maximum physical length of variable-length
+    data.</para>
+  </sect2>
+
+  <sect2 id="getisvalid">
+    <title>GETISVALID</title>
+
+    <para><emphasis role="bold">EXPORT BOOLEAN<indexterm>
+        <primary><emphasis role="bold">BOOLEAN</emphasis></primary>
+      </indexterm> GETISVALID<indexterm>
+        <primary><emphasis role="bold">GETISVALID</emphasis></primary>
+      </indexterm>(</emphasis><emphasis>PhysicalType alias) :=
+    expression;</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>PhysicalType</emphasis></entry>
+
+            <entry>The value type of the input parameter to the
+            function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>alias</emphasis></entry>
+
+            <entry>The name of the input to use in the
+            <emphasis>expression</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The operation to perform on the input.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para><emphasis role="bold">GETISVALID </emphasis>defines the callback
+    function to determine that data values are in the specified physical
+    format.</para>
+
+    <para>Example:</para>
+
+    <programlisting>EXPORT NeedC(INTEGER len) := TYPE
+  EXPORT STRING LOAD(STRING S) := 'C' + S[1..len];
+  EXPORT STRING STORE(STRING S) := S[2..len+1];
+  EXPORT INTEGER PHYSICALLENGTH(STRING S) := len;
+  EXPORT INTEGER MAXLENGTH(STRING S) := len;
+  EXPORT BOOLEAN GETISVALID(STRING S) := S[1] &lt;&gt; 'C';
+END;
+          
+// delimited string data type
+EXPORT dstring(STRING del) := TYPE
+  EXPORT INTEGER PHYSICALLENGTH(STRING s) :=
+               Std.Str.Find(s,del)+length(del)-1;
+  EXPORT STRING LOAD(STRING s) :=
+               s[1..Std.Str.Find(s,del)-1];
+  EXPORT STRING STORE(STRING s) := s + del;
+END;</programlisting>
+
+    <para>See Also: <link linkend="TYPE_Structure">TYPE
+    Structure</link></para>
+  </sect2>
+</sect1>

+ 91 - 0
docs/ECLR_mods/AlienData-TypeStruct.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="TYPE_Structure" role="nobrk">
+  <title>TYPE Structure</title>
+
+  <para><emphasis>TypeName</emphasis><emphasis role="bold"> := TYPE<indexterm>
+      <primary><emphasis role="bold">TYPE</emphasis></primary>
+    </indexterm></emphasis><emphasis role="bold">
+  </emphasis><emphasis></emphasis></para>
+
+  <para><emphasis>functions;</emphasis></para>
+
+  <para><emphasis></emphasis><emphasis role="bold">END;</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec align="left" colwidth="122.40pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>TypeName</emphasis></entry>
+
+          <entry>The name of the TYPE structure<indexterm>
+              <primary>TYPE structure</primary>
+            </indexterm>.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>functions</emphasis></entry>
+
+          <entry>Function Attribute definitions. There are usually multiple
+          <emphasis>functions</emphasis>.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">TYPE </emphasis>structure defines a series
+  of <emphasis>functions</emphasis> that are implicitly invoked when the
+  <emphasis>TypeName</emphasis> is subsequently used in a RECORD
+  structure<indexterm>
+      <primary>RECORD structure</primary>
+    </indexterm> as a value type. Parameters may be passed to the TYPE
+  structure Attribute which may then be used in any of the
+  <emphasis>function</emphasis> definitions. To pass the parameters, simply
+  append them to the <emphasis>TypeName</emphasis> used in the RECORD
+  structure to define the value type for the field.</para>
+
+  <para>A TYPE structure may only contain function definitions from the the
+  list of available Special Functions (see <emphasis role="bold">TYPE
+  Structure Special Functions</emphasis>).</para>
+
+  <para>Example:</para>
+
+  <programlisting>STRING4 Rev(STRING4 S) := S[4] + S[3] + S[2] + S[1];
+EXPORT ReverseString4 := TYPE
+        EXPORT STRING4 LOAD(STRING4 S) := Rev(S);
+        EXPORT STRING4 STORE(STRING4 S) := Rev(S);
+END;
+NeedC(INTEGER len) := TYPE
+        EXPORT STRING LOAD(STRING S) := 'C' + S[1..len];
+        EXPORT STRING STORE(STRING S) := S[2..len+1];
+        EXPORT INTEGER PHYSICALLENGTH(STRING S) := len;
+END;
+ScaleInt := TYPE
+        EXPORT REAL LOAD(INTEGER4 I ) := I / 100;
+        EXPORT INTEGER4 STORE(REAL R) := ROUND(R * 100);
+END;
+R := RECORD
+     ReverseString4 F1;
+        // Defines a field size of 4 bytes. When R.F1 is used, 
+        // the ReverseString4.Load function is called passing 
+        // in those four bytes and returning a string result.
+     NeedC(5) F2;
+
+        // Defines a field size of 5 bytes. When R.F2 is used, 
+        // those 5 bytes are passed in to NeedC.Load (along with 
+        // the length 5) and a 6 byte string is returned.
+     ScaleInt F3;
+
+        // Defines a field size of 4. When R.F3 is used, the 
+        //  ScaleInt.Load function returns the number / 100.
+END;</programlisting>
+
+  <para>See Also: <link linkend="RECORD_Structure">RECORD Structure</link>,
+  <link linkend="Type_Sturcture_Special_Functions">TYPE Structure Special
+  Functions</link></para>
+</sect1>

+ 81 - 0
docs/ECLR_mods/Basics-ActionsandAttrib.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Actions_and_Attributes">
+  <title>Actions and Attributes</title>
+
+  <para>There are several built-in Actions in ECL (such as OUTPUT), but there
+  are many more actions that you can execute as queries to the
+  supercomputer.</para>
+
+  <sect2 id="Functions_as_ActionsFunctions_as_Actions">
+    <title>Functions as Actions<indexterm>
+        <primary>Functions as Actions</primary>
+      </indexterm></title>
+
+    <para>Fundamentally, all the built-in functions that return single values
+    (such as COUNT) can be executed as Actions. For example,</para>
+
+    <programlisting>Attr1 := COUNT(Trades);
+Attr2 := MAX(Trades,trd_bal);
+Attr3 := IF (1 = 0, 'A', 'B');</programlisting>
+
+    <para>are all attribute definitions, but</para>
+
+    <programlisting>COUNT(Trades); //execute these Function calls as Actions
+MAX(Trades,trd_bal);
+IF (1 = 0, 'A', 'B');</programlisting>
+
+    <para>are also all valid actions, and as such, can directly generate
+    result values by simply submitting them as queries to the supercomputer.
+    Basically, any ECL expression that results in a scalar value can be used
+    as an Action to instigate a workunit.</para>
+  </sect2>
+
+  <sect2 id="Attributes_as_ActionsAttributes_as_Actions">
+    <title>Attributes as Actions<indexterm>
+        <primary>Attributes as Actions</primary>
+      </indexterm></title>
+
+    <para>Any Attribute that defines a single value of some sort (that is, it
+    does not define a record set) can be executed as an Action. These same
+    actions can be executed by submitting the names of the Attributes as
+    queries, like this:</para>
+
+    <programlisting>Attr1; //These all generate the same result values
+Attr2; // as the previous examples
+Attr3;</programlisting>
+  </sect2>
+
+  <sect2 id="Actions_as_Attributes">
+    <title>Actions as Attributes<indexterm>
+        <primary>Actions as Attributes</primary>
+      </indexterm></title>
+
+    <para>Conversely, by simply giving any Action an Attribute name you turn
+    it into an Attribute definition, therefore no longer a directly executable
+    action. For example,</para>
+
+    <programlisting>OUTPUT(Person);</programlisting>
+
+    <para>is an action, but</para>
+
+    <programlisting>Attr4 := OUTPUT(Person);</programlisting>
+
+    <para>is an attribute definition and does not immediately execute when
+    submitted as part of a query. To execute the action inherent in the
+    attribute, you must execute the Attribute name you've given to the Action,
+    like this:</para>
+
+    <programlisting>Attr4; // run the OUTPUT(Person) action</programlisting>
+  </sect2>
+
+  <sect2 id="Debugging_Uses">
+    <title>Debugging Uses</title>
+
+    <para>This technique of directly executing an attribute as an Action is
+    useful when debugging complex ECL code. You can send the attribute as a
+    query to determine if intermediate values are correctly calculated before
+    continuing on with more complex code.</para>
+  </sect2>
+</sect1>

+ 109 - 0
docs/ECLR_mods/Basics-AttributeDef.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Attribute_Definition">
+  <title>Attribute Definition</title>
+
+  <para>Each ECL definition<indexterm>
+      <primary>ECL definition</primary>
+    </indexterm> creates an Attribute<indexterm>
+      <primary>Attribute</primary>
+    </indexterm>—the basic building block of ECL. An Attribute definition
+  asserts that something is true; it defines <emphasis>what </emphasis>is done
+  but not <emphasis>how</emphasis> it is to be done. Attributes can be thought
+  of as a highly developed form of macro-substitution, making each succeeding
+  Attribute definition more and more highly leveraged upon the work that has
+  gone before. This results in extremely efficient query construction.</para>
+
+  <para>All Attribute definitions take the form:</para>
+
+  <para><emphasis role="bold">[</emphasis><emphasis>Scope</emphasis><emphasis
+  role="bold">] [</emphasis><emphasis>ValueType</emphasis><emphasis
+  role="bold">] Name<indexterm>
+      <primary>Name</primary>
+    </indexterm> [ </emphasis>(<emphasis>parms</emphasis>) <emphasis
+  role="bold">] := Expression<indexterm>
+      <primary>Expression</primary>
+    </indexterm> [ </emphasis><emphasis>:WorkflowService</emphasis><emphasis
+  role="bold">] ;</emphasis></para>
+
+  <para>The Attribute Definition Operator<indexterm>
+      <primary>Attribute Definition Operator</primary>
+    </indexterm> (<emphasis role="bold">:=</emphasis> read as “is defined as”)
+  defines an Attribute. On the left side of the operator is an optional
+  <emphasis>Scope<indexterm>
+      <primary>Scope</primary>
+    </indexterm></emphasis> (see <emphasis role="bold">Attribute
+  Visibility</emphasis>), <emphasis>ValueType<indexterm>
+      <primary>Value Type</primary>
+    </indexterm></emphasis> (see <emphasis role="bold">Value
+  Types</emphasis>), and any parameters<indexterm>
+      <primary>parameters</primary>
+    </indexterm> (<emphasis>parms</emphasis>) it may take (see <emphasis
+  role="bold">Functions (Parameter Passing)</emphasis>). On the right side is
+  the Expression that produces the result and optionally a colon (:) and a
+  comma-delimited list of <emphasis>WorkflowServices</emphasis> (see <emphasis
+  role="bold">Workflow Services</emphasis>). An Attribute definition must be
+  explicitly terminated with a semi-colon (;). The Attribute name can be used
+  in subsequent Attribute definitions:</para>
+
+  <programlisting>MyFirstAttribute := 5; //defined as 5
+MySecondAttribute := MyFirstAttribute + 5; //this is 10</programlisting>
+
+  <sect2 id="Attribute_Name_Rules">
+    <title>Attribute Name Rules</title>
+
+    <para>Attribute name<indexterm>
+        <primary>Attribute Name</primary>
+      </indexterm>s begin with a letter and may contain only letters, numbers,
+    or underscores (_).</para>
+
+    <programlisting>My_First_Attribute1 := 5; // valid name
+My First Attribute := 5;  // INVALID name, spaces not allowed</programlisting>
+
+    <para>You may name an attribute with the name of a previously created
+    module in the ECL Repository, if the attribute is defined with an explicit
+    <emphasis>ValueType</emphasis>.</para>
+  </sect2>
+
+  <sect2 id="Reserved_Words">
+    <title>Reserved Words</title>
+
+    <para>ECL keywords<indexterm>
+        <primary>ECL keywords</primary>
+      </indexterm>, built-in functions and their options are reserved
+    words<indexterm>
+        <primary>Reserved Words</primary>
+      </indexterm>, but they are generally reserved only in the context within
+    which they are valid for use. Even in that context, you may use reserved
+    words as field or attribute names, provided you explicitly disambiguate
+    them, as in this example:</para>
+
+    <programlisting>ds2 := DEDUP(ds, ds.all, ALL); //ds.all is the 'all' field in the
+                               //ds dataset - not DEDUP’s ALL option</programlisting>
+
+    <para>However, it is still a good idea to avoid using ECL keywords as
+    attribute or field names.</para>
+  </sect2>
+
+  <sect2 id="Attribute_Naming">
+    <title>Attribute Naming</title>
+
+    <para>Use descriptive names for all EXPORTed and SHARED Attributes. This
+    will make your code more readable. The naming convention adopted
+    throughout the ECL documentation and training courses is as
+    follows:</para>
+
+    <programlisting><emphasis role="bold">Attribute Type</emphasis>     <emphasis
+        role="bold">Are Named
+</emphasis>Boolean              Is...
+Set Definition       Set...
+Record Set           ...DatasetName</programlisting>
+
+    <para>For example:</para>
+
+    <programlisting>IsTrue := TRUE;                         // a BOOLEAN Attribute
+SetNumbers := [1,2,3,4,5];              // a Set Attribute
+R_People := People(firstname[1] = 'R'); // a Record Set Attribute</programlisting>
+  </sect2>
+</sect1>

+ 247 - 0
docs/ECLR_mods/Basics-AttributeTypes.xml

@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Basic_Attribute_Types">
+  <title>Basic Attribute Types<indexterm>
+      <primary>Attribute Types</primary>
+    </indexterm></title>
+
+  <para>The basic types of Attributes used most commonly throughout ECL coding
+  are: <emphasis role="bold">Boolean</emphasis><indexterm>
+      <primary>Boolean</primary>
+    </indexterm>, <emphasis role="bold">Value<indexterm>
+      <primary>Value</primary>
+    </indexterm></emphasis>, <emphasis role="bold">Set<indexterm>
+      <primary>Set</primary>
+    </indexterm></emphasis>, <emphasis role="bold">Record Set<indexterm>
+      <primary>Record Set</primary>
+    </indexterm></emphasis>, and <emphasis role="bold">TypeDef<indexterm>
+      <primary>TypeDef</primary>
+    </indexterm></emphasis>.</para>
+
+  <sect2 id="Boolean_Attributes">
+    <title>Boolean Attribute<indexterm>
+        <primary>Boolean Attribute</primary>
+      </indexterm>s</title>
+
+    <para>A Boolean Attribute is defined as any Attribute whose definition is
+    a logical expression resulting in a TRUE/FALSE result. For example, the
+    following are all Boolean Attributes:</para>
+
+    <programlisting>IsBoolTrue  := TRUE;
+IsFloridian := Person.per_st = 'FL';
+IsOldPerson := Person.Age &gt;= 65;</programlisting>
+  </sect2>
+
+  <sect2 id="Value_Attributes">
+    <title>Value Attribute<indexterm>
+        <primary>Value Attribute</primary>
+      </indexterm>s</title>
+
+    <para>A Value Attribute is defined as any Attribute whose expression is an
+    arithmetic or string expression with a single-valued result. For example,
+    the following are all Value Attributes:</para>
+
+    <programlisting>ValueTrue      := 1;
+FloridianCount := COUNT(Person(Person.per_st = 'FL'));
+OldAgeSum     := SUM(Person(Person.Age &gt;= 65),Person.Age);</programlisting>
+  </sect2>
+
+  <sect2 id="Set_Attributes">
+    <title>Set Attributes</title>
+
+    <para>A Set Attribute<indexterm>
+        <primary>Set Attribute</primary>
+      </indexterm> is defined as any Attribute whose expression is a set of
+    values, defined within square brackets<indexterm>
+        <primary>square brackets</primary>
+      </indexterm>. Constant set<indexterm>
+        <primary>Constant set</primary>
+      </indexterm>s are created as a set of explicitly declared constant
+    values<indexterm>
+        <primary>constant values</primary>
+      </indexterm> that must be declared within square brackets, whether that
+    set is defined as a separate attribute or simply included in-line in
+    another expression. All the constants must be of the same type.</para>
+
+    <programlisting>SetInts  := [1,2,3,4,5]; // an INTEGER set with 5 elements
+SetReals := [1.5,2.0,3.3,4.2,5.0];
+            // a REAL set with 5 elements
+SetStatusCodes := ['A','B','C','D','E'];
+            // a STRING set with 5 elements</programlisting>
+
+    <para>The elements in any explicitly declared set can also be composed of
+    arbitrary expressions. All the expressions must result in the same type
+    and must be constant expressions.</para>
+
+    <programlisting>SetExp := [1,2+3,45,SomeIntegerAttribute,7*3];
+                        // an INTEGER set with 5 elements</programlisting>
+
+    <para>Declared Sets can contain attributes and expressions<indexterm>
+        <primary>Sets can contain attributes and expressions</primary>
+      </indexterm> as well as constants as long as all the elements are of the
+    same result type. For example:</para>
+
+    <programlisting>StateCapitol(STRING2 state) :=
+          CASE(state, 'FL' =&gt; 'Tallahassee', 'Unknown');
+SetFloridaCities := ['Orlando', StateCapitol('FL'), 'Boca '+'Raton',
+          person[1].per_full_city];</programlisting>
+
+    <para>Set Attribute<indexterm>
+        <primary>Set Attribute</primary>
+      </indexterm>s can also be defined using the SET function<indexterm>
+        <primary>SET function</primary>
+      </indexterm> (which see). Sets defined this way may be used like any
+    other set.</para>
+
+    <programlisting>SetSomeField := SET(SomeFile, SomeField);
+          // a set of SomeField values</programlisting>
+
+    <para>Sets can also contain datasets for use with those functions (such
+    as: MERGE, JOIN, MERGEJOIN, or GRAPH) that require sets of datsets as
+    input parameters.</para>
+
+    <programlisting>SetDS := [ds1, ds2, ds3]; // a set of datasets</programlisting>
+  </sect2>
+
+  <sect2 id="Set_Ordering_and_Indexing">
+    <title>Set Ordering and Indexing <indexterm>
+        <primary>Set Ordering</primary>
+      </indexterm><indexterm>
+        <primary>Indexing</primary>
+      </indexterm></title>
+
+    <para>Sets are implicitly ordered and you may index into them to access
+    individual elements. Square brackets are used to specify the element
+    number to access. The first element is number one (1).</para>
+
+    <programlisting>MySet := [5,4,3,2,1];
+ReverseNum := MySet[2]; //indexing to MySet's element number 2,
+                       //so ReverseNum contains the value 4</programlisting>
+
+    <para>String<indexterm>
+        <primary>String</primary>
+      </indexterm>s (Character Sets<indexterm>
+        <primary>Character Sets</primary>
+      </indexterm>) may also be indexed to access individual or multiple
+    contiguous elements within the set of characters (a string is treated as
+    though it were a set of 1-character strings). An element number within
+    square brackets specifies an individual character to extract.</para>
+
+    <programlisting>MyString := 'ABCDE';
+MySubString := MyString[2]; // MySubString is 'B'</programlisting>
+
+    <para>Substrings may be extracted by using two periods to separate the
+    beginning and ending element numbers within the square brackets to specify
+    the substring<indexterm>
+        <primary>substring</primary>
+      </indexterm> (string slice<indexterm>
+        <primary>string slice</primary>
+      </indexterm>) to extract. Either the beginning or ending element number
+    may be omitted to indicate a substring from the beginning to the specified
+    element, or from the specified element through to the end.</para>
+
+    <programlisting>MyString := 'ABCDE';
+MySubString1 := MyString[2..4]; // MySubString1 is 'BCD'
+MySubString2 := MyString[ ..4]; // MySubString2 is 'ABCD'
+MySubString3 := MyString[2.. ]; // MySubString3 is 'BCDE'</programlisting>
+  </sect2>
+
+  <sect2 id="Record_Set_Attributes">
+    <title>Record Set Attributes</title>
+
+    <para>The term “Dataset”<indexterm>
+        <primary>Dataset</primary>
+      </indexterm> in ECL explicitly means a “physical” data file in the
+    supercomputer (on disk or in memory), while the term “Record
+    Set”<indexterm>
+        <primary>Record Set</primary>
+      </indexterm> indicates any set of records derived from a Dataset (or
+    another Record Set), usually based on some filter condition to limit the
+    result set to a subset of records. Record sets are also created as the
+    return result from one of the built-in functions that return result
+    sets.</para>
+
+    <para>A Record Set Attribute<indexterm>
+        <primary>Record Set Attribute</primary>
+      </indexterm> is defined as any Attribute whose expression is a filtered
+    dataset or record set, or any function that returns a record set. For
+    example, the following are all Record Set Attributes:</para>
+
+    <programlisting>FloridaPersons    := Person(Person.per_st = 'FL');
+OldFloridaPersons := FloridaPersons(Person.Age &gt;= 65);</programlisting>
+  </sect2>
+
+  <sect2 id="Record_Set_Ordering_and_Indexing">
+    <title>Record Set Ordering and Indexing</title>
+
+    <para>All Datasets and Record Sets are implicitly ordered and may be
+    indexed to access individual records within the set. Square brackets are
+    used to specify the element number to access, and the first element in any
+    set is number one (1).</para>
+
+    <para>Datasets (including child datasets) and Record Sets may use the same
+    method as described above for strings to access individual or multiple
+    contiguous records.</para>
+
+    <programlisting>MyRec1 := Person[1];     // first rec in dataset
+MyRec2 := Person[1..10]; // first ten recs in dataset
+MyRec4 := Person[2..];   // all recs except the first</programlisting>
+
+    <para><emphasis role="bold">Note:</emphasis> ds[1] and ds[1..1] are not
+    the same thing—ds[1..1] is a recordset (may be used in recordset context)
+    while ds[1] is a single row (may be used to reference single
+    fields).</para>
+
+    <para>And you can also access individual fields in a specified record with
+    a single index:</para>
+
+    <programlisting>MyField := Person[1].per_last_name; // last name in first rec</programlisting>
+
+    <para>Indexing a record set with a value that is out of bounds is defined
+    to return a row where all the fields contain blank/zero values. It is
+    often more efficient to index an out of bound value rather than writing
+    code that handles the special case of an out of bounds index value.</para>
+
+    <para>For example, the expression:</para>
+
+    <programlisting>IF(COUNT(ds) &gt; 0, ds[1].x, 0); </programlisting>
+
+    <para>is simpler as:</para>
+
+    <programlisting>ds[1].x    //note that this returns 0 if ds contains no records.
+</programlisting>
+
+    <para></para>
+  </sect2>
+
+  <sect2 id="TypeDef_Attributes">
+    <title>TypeDef Attributes</title>
+
+    <para>A TypeDef Attribute<indexterm>
+        <primary>TypeDef Attribute</primary>
+      </indexterm> is defined as any Attribute whose definition is a value
+    type, whether built-in or user-defined. For example, the following are all
+    TypeDef Attributes (except GetXLen):</para>
+
+    <programlisting>GetXLen(DATA x,UNSIGNED len) := TRANSFER(((DATA4)(x[1..len])),UNSIGNED4);
+
+EXPORT xstring(UNSIGNED len) := TYPE
+  EXPORT INTEGER PHYSICALLENGTH(DATA x) := GetXLen(x,len) + len;
+  EXPORT STRING LOAD(DATA x) := (STRING)x[(len+1)..GetXLen(x,len) + len];
+  EXPORT DATA STORE(STRING x):= TRANSFER(LENGTH(x),DATA4)[1..len] + (DATA)x;
+END;
+
+pstr := xstring(1); // typedef for user defined type
+pppstr := xstring(3);
+nameStr := STRING20; // typedef of a system type
+
+namesRecord := RECORD
+  pstr surname;
+  nameStr forename;
+  pppStr addr;
+  
+END;
+//A RECORD structure is also a typedef attribute (user-defined)</programlisting>
+  </sect2>
+</sect1>

+ 78 - 0
docs/ECLR_mods/Basics-AttributeVisibility.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Attribute_Visibility">
+  <title>Attribute Visibility<indexterm>
+      <primary>Attribute Visibility</primary>
+    </indexterm></title>
+
+  <para>ECL Attributes are organized into modules. Within a module, you may
+  define as many Attributes as needed. An IMPORT statement (see the <emphasis
+  role="bold">IMPORT </emphasis>keyword) identifies any other modules whose
+  visible Attributes will be available for use in the current attribute
+  definition.</para>
+
+  <programlisting>IMPORT AnotherModule; //imports attributes from AnotherModule
+Attribute1 := 5;     //as many definitions as needed</programlisting>
+
+  <para>The following fundamental attribute visibility scopes are available in
+  ECL: <emphasis role="bold">"Global," Module</emphasis>, and <emphasis
+  role="bold">Local</emphasis>.</para>
+
+  <sect2 id="Global_attribute_visibility">
+    <title>"Global"</title>
+
+    <para>Attributes defined as <emphasis
+    role="bold">EXPORT</emphasis><indexterm>
+        <primary>EXPORT</primary>
+      </indexterm> (see the <emphasis role="bold">EXPORT</emphasis> keyword)
+    are available throughout the module in which they are defined, and
+    throughout any other module that IMPORTs the module (see the <emphasis
+    role="bold">IMPORT</emphasis> keyword).</para>
+
+    <programlisting>EXPORT Attribute1 := 5;
+//make Attribute1 available to other modules and
+//also available throughout its own module</programlisting>
+  </sect2>
+
+  <sect2 id="Module">
+    <title>Module</title>
+
+    <para>The scope of the Attributes defined as <emphasis
+    role="bold">SHARED<indexterm>
+        <primary>SHARED</primary>
+      </indexterm></emphasis> (see the <emphasis role="bold">SHARED</emphasis>
+    keyword) is limited to that one module, and are available throughout the
+    module (unlike local Attributes). This allows you to keep private any
+    definitions that are only needed to implement internal
+    functionality.</para>
+
+    <programlisting>SHARED Attribute1 := 5;
+//Attribute1 available throughout its own module, only
+EXPORT Attribute2 := Attribute1 + 5;
+//make Attribute2 available to other modules and
+//also available throughout its own module</programlisting>
+  </sect2>
+
+  <sect2 id="Local">
+    <title>Local</title>
+
+    <para>An Attribute defined without either EXPORT or SHARED (see the
+    <emphasis role="bold">EXPORT </emphasis>and <emphasis
+    role="bold">SHARED</emphasis> keywords) is available only to the
+    subsequent Attributes until the next Attribute definition with EXPORT or
+    SHARED. This makes them private Attributes used only within the scope of
+    that EXPORT or SHARED Attribute. This allows you to keep private any
+    definitions that are only needed to implement internal functionality.
+    Local Attributes are referenced by the Attribute name alone; no
+    qualification is needed.</para>
+
+    <programlisting>MODULE abc;
+LocalAttr := 5;
+//local -- available through the end of Attribute1's definition, only
+SHARED Attribute1 := LocalAttr;
+//SHARED terminates scope for LocalAttr
+Attribute2 := Attribute1 + LocalAttr;
+//INVALID SYNTAX -- LocalAttr is out of scope here</programlisting>
+  </sect2>
+</sect1>

+ 99 - 0
docs/ECLR_mods/Basics-Constants.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Constants">
+  <title>Constants</title>
+
+  <sect2 id="String">
+    <title>String</title>
+
+    <para>All string literals must be contained within single quotation marks
+    ( ' ' ). All ECL code is UTF-8 encoded, which means that all strings are
+    also UTF-8 encoded, whether Unicode or non-Unicode strings. Therefore, you
+    must use a UTF-8<indexterm>
+        <primary>UTF-8</primary>
+      </indexterm> editor (such as the ECL IDE <indexterm>
+        <primary>ECL IDE</primary>
+      </indexterm> program).</para>
+
+    <para>To include the single quote character (apostrophe) in a constant
+    string, prepend a backslash (\). To include the backslash character (\) in
+    a constant string, use two backslashes (\\) together.</para>
+
+    <programlisting>STRING20 MyString2 := 'Fred\'s Place';
+                     //evaluated as: "Fred's Place"
+STRING20 MyString3 := 'Fred\\Ginger\'s Place';
+                    //evaluated as: "Fred\Ginger's Place"</programlisting>
+
+    <para>Other available escape characters are: \t tab \n new line \r
+    carriage return \nnn 3 octal digits (for any other character)</para>
+
+    <para><emphasis role="bold">Hexadecimal<indexterm>
+        <primary>Hexadecimal</primary>
+      </indexterm> string constants<indexterm>
+        <primary>string constants</primary>
+      </indexterm> </emphasis>must begin with a leading “x” character. Only
+    valid hexadecimal values (0-9, A-F) may be in the character string and
+    there must be an even number of characters.</para>
+
+    <programlisting>DATA2 MyHexString := x'0D0A'; // a 2-byte hexadecimal string</programlisting>
+
+    <para><emphasis role="bold">Data string<indexterm>
+        <primary>Data string</primary>
+      </indexterm> constants<indexterm>
+        <primary>constants</primary>
+      </indexterm> </emphasis>must begin with a leading “D” character. This is
+    directly equivalent to casting the string constant to DATA.</para>
+
+    <programlisting>MyDataString := D'abcd'; // same as: (DATA)'abcd'</programlisting>
+
+    <para><emphasis role="bold">Unicode string<indexterm>
+        <primary>Unicode string</primary>
+      </indexterm> constants </emphasis>must begin with a leading “U”
+    character. Characters between the quotes are utf8-encoded and the type of
+    the constant is UNICODE.</para>
+
+    <programlisting>MyUnicodeString := U'abcd'; // same as: (UNICODE)'abcd'
+MyUnicodeString := U'abcd\353'; // becomes 'abcdë'</programlisting>
+
+    <para><emphasis role="bold">VARSTRING string constants<indexterm>
+        <primary>VARSTRING string constants</primary>
+      </indexterm> </emphasis>must begin with a leading “V” character. The
+    terminating null byte is implied and type of the constant is
+    VARSTRING.</para>
+
+    <programlisting>MyVarString := V'abcd'; // same as: (VARSTRING)'abcd'</programlisting>
+
+    <para><emphasis role="bold">QSTRING string constants<indexterm>
+        <primary>QSTRING string constants</primary>
+      </indexterm> </emphasis>must begin with a leading “Q” character. The
+    terminating null byte is implied and type of the constant is
+    VARSTRING.</para>
+
+    <programlisting>MyQString := Q'ABCD'; // same as: (QSTRING)'ABCD'</programlisting>
+  </sect2>
+
+  <sect2 id="Numeric">
+    <title>Numeric</title>
+
+    <para>Numeric constants containing a decimal portion are treated as REAL
+    values and those without are treated as INTEGER<indexterm>
+        <primary>INTEGER</primary>
+      </indexterm> (see <emphasis role="bold">Value Types</emphasis>). Integer
+    constants may be decimal, hexadecimal, or binary values.
+    Hexadecimal<indexterm>
+        <primary>Hexadecimal</primary>
+      </indexterm> values are specified with either a leading “0x” or a
+    trailing “x” character. Binary values<indexterm>
+        <primary>Binary values</primary>
+      </indexterm> are specified with either a leading “0b” or a trailing “b”
+    character.</para>
+
+    <programlisting>MyInt1 := 10; // value of MyInt1 is the INTEGER value 10
+MyInt2 := 0x0A; // value of MyInt2 is the INTEGER value 10
+MyInt3 := 0Ax; // value of MyInt3 is the INTEGER value 10
+MyInt4 := 0b1010; // value of MyInt4 is the INTEGER value 10
+MyInt5 := 1010b; // value of MyInt5 is the INTEGER value 10
+MyReal := 10.0; // value of MyReal is the REAL value 10.0</programlisting>
+  </sect2>
+</sect1>

+ 152 - 0
docs/ECLR_mods/Basics-FieldandAttribute.xml

@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Field_and_Attribute_Qualification">
+  <title>Field and Attribute Qualification</title>
+
+  <sect2 id="Imported_Attributes">
+    <title>Imported Attributes</title>
+
+    <para><emphasis role="bold">EXPORTed<indexterm>
+        <primary>EXPORTed</primary>
+      </indexterm> Attributes<indexterm>
+        <primary>EXPORTed Attributes</primary>
+      </indexterm> defined within another module and IMPORTed<indexterm>
+        <primary>IMPORTed</primary>
+      </indexterm> (see the </emphasis><emphasis role="bold">EXPORT
+    </emphasis>and <emphasis role="bold">IMPORT</emphasis> keywords) are
+    available for use in the attribute definition that contains the IMPORT.
+    Imported Attributes must be fully qualified by their Module name and
+    Attribute name, using dot syntax<indexterm>
+        <primary>dot syntax</primary>
+      </indexterm> (module.attribute).</para>
+
+    <programlisting>IMPORT abc;                //make all exported attributes in the abc module available
+EXPORT Attribute1 := 5;    //make Attribute1 available to other modules
+Attribute2 := abc.Attribute2 + Attribute1;  // object qualification needed for Attributes from abc module</programlisting>
+  </sect2>
+
+  <sect2 id="Fields_in_Datasets">
+    <title>Fields in Datasets</title>
+
+    <para>Each Dataset counts as a qualified scope and the fields within them
+    are fully qualified by their Dataset (or record set) name and Field name,
+    using dot syntax (dataset.field). Similarly, the result set of the
+    TABLE<indexterm>
+        <primary>TABLE</primary>
+      </indexterm> built-in function (see the <emphasis
+    role="bold">TABLE</emphasis> keyword) also acts as a qualified scope. The
+    name of the record set to which a field belongs is the object name:</para>
+
+    <programlisting>Young := YearOf(Person.per_dbrth) &lt; 1950;
+MySet := Person(Young);</programlisting>
+
+    <para>When naming a Dataset as part of an Attribute definition, the fields
+    of that Attribute (or record set) come into scope. If Parameterized
+    Attributes (functions) are nested, only the innermost scope is available.
+    That is, all the fields of a Dataset (or derived record set) are in scope
+    in the filter expression. This is also true for expressions parameters of
+    any built-in function that names a Dataset or derived record set as a
+    parameter.</para>
+
+    <programlisting>MySet1 := Person(YearOf(dbrth) &lt; 1950);
+// MySet1 is the set of Person records who were born before 1950</programlisting>
+
+    <para></para>
+
+    <programlisting>MySet2 := Person(EXISTS(OpenTrades(AgeOf(trd_dla) &lt; AgeOf(Person.per_dbrth))));</programlisting>
+
+    <para></para>
+
+    <programlisting>// OpenTrades is a pre-defined record set.
+//All Trades fields are in scope in the OpenTrades record set filter 
+//expression, but Person is required here to bring Person.per_dbrth
+// into scope
+//This example compares each trades' Date of Last Activity to the
+// related person’s Date Of Birth</programlisting>
+
+    <para>Any field in a Record Set <emphasis role="underline">can</emphasis>
+    be qualified with either the Dataset name the Record Set is based on, or
+    any other Record Set name based on the same base dataset. For
+    example:</para>
+
+    <programlisting>memtrade.trd_drpt
+nondup_trades.trd_drpt
+trades.trd_drpt</programlisting>
+
+    <para>all refer to the same field in the memtrade dataset.</para>
+
+    <para>For consistency, you should typically use the base dataset name for
+    qualification. You can also use the current Record Set's name in any
+    context where the base dataset name would be confusing.</para>
+  </sect2>
+
+  <sect2 id="Scope_Resolution_Operator">
+    <title>Scope Resolution Operator</title>
+
+    <para>Identifiers are looked up in the following order:</para>
+
+    <para>1. The currently active dataset, if any</para>
+
+    <para>2. The current attribute being defined, and any parameters it is
+    based on</para>
+
+    <para>3. Any attributes or parameters of any MODULE or FUNCTION structure
+    that contains the current attribute</para>
+
+    <para>This might mean that the attribute or parameter you want to access
+    isn't picked because it is hidden as in a parameter or private attribute
+    name clashing with the name of a dataset field.</para>
+
+    <para>It would be better to rename the parameter or private attribute so
+    the name clash cannot occur, but sometimes this is not possible.</para>
+
+    <para>You may direct access to a different match by qualifying the field
+    name with the scope resolution operator (the carat (^) character), using
+    it once for each step in the order listed above that you need to
+    skip.</para>
+
+    <para>This example shows the qualification order necessary to reach a
+    specific attribute/parameter:</para>
+
+    <para><programlisting>ds := DATASET([1], { INTEGER SomeValue });
+
+INTEGER SomeValue := 10; //local definition
+
+myModule(INTEGER SomeValue) := MODULE
+
+  EXPORT anotherFunction(INTEGER SomeValue) := FUNCTION
+    tbl := TABLE(ds,{SUM(GROUP, someValue), // 1 - DATASET field
+                     SUM(GROUP, ^.someValue), // 84 - FUNCTION parameter
+                     SUM(GROUP, ^^.someValue), // 42 - MODULE parameter
+                     SUM(GROUP, ^^^.someValue), // 10 - local attribute
+                 0});
+     RETURN<indexterm>
+          <primary>RETURN</primary>
+        </indexterm> tbl;
+   END;
+
+   EXPORT result := anotherFunction(84);
+   END;
+
+OUTPUT(myModule(42).result);</programlisting></para>
+
+    <para>In this example there are four instances of the name
+    "SomeValue":</para>
+
+    <para>a field in a DATASET.</para>
+
+    <para>a local attribute</para>
+
+    <para>a parameter to a MODULE structure</para>
+
+    <para>a parameter to a FUNCTION structure</para>
+
+    <para>The code in the TABLE function<indexterm>
+        <primary>TABLE function</primary>
+      </indexterm> shows how to reference each separate instance.</para>
+
+    <para>While this syntax allows exceptions where you need it, creating
+    another attribute with a different name is the preferred solution.</para>
+  </sect2>
+</sect1>

+ 370 - 0
docs/ECLR_mods/Basics-FunctionAttributes.xml

@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Function_Attributes__Parameter_Passing">
+  <title>Function Definitions<indexterm>
+      <primary>Functions</primary>
+    </indexterm> (Parameter Passing<indexterm>
+      <primary><emphasis role="bold">Parameter Passing</emphasis></primary>
+    </indexterm>)</title>
+
+  <para>All of the basic Definition types can also become functions by
+  defining them to accept passed parameters (arguments<indexterm>
+      <primary>arguments</primary>
+    </indexterm>). The fact that it receives parameters doesn't change the
+  essential nature of the Definition's type, it simply makes it more
+  flexible.</para>
+
+  <para>Parameter definitions always appear in parentheses attached to the
+  Definition's name. You may define the function to receive as many parameters
+  as needed to create the desired functionality by simply separating each
+  succeeding parameter definition with a comma.</para>
+
+  <para>The format of parameter definitions is as follows:</para>
+
+  <para>DefinitionName<emphasis role="bold">( [
+  </emphasis><emphasis>ValueType</emphasis><emphasis role="bold"> ]
+  </emphasis><emphasis>AliasName</emphasis><emphasis role="bold"> [
+  =</emphasis><emphasis>DefaultValue</emphasis><emphasis role="bold"> ] ) :=
+  </emphasis>expression<emphasis role="bold">;</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec align="left" colwidth="122.40pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>ValueType</emphasis></entry>
+
+          <entry>Optional. Specifies the type of data being passed. If
+          omitted, the default is INTEGER (see <emphasis role="bold">Value
+          Types<indexterm>
+              <primary><emphasis role="bold">Value Types</emphasis></primary>
+            </indexterm></emphasis>). This also may include the CONST keyword
+          (see <emphasis role="bold">CONST<indexterm>
+              <primary>CONST</primary>
+            </indexterm></emphasis>) to indicate that the passed value will
+          always be treated as a constant.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>AliasName</emphasis></entry>
+
+          <entry>Names the parameter for use in the expression.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>DefaultValue</emphasis></entry>
+
+          <entry>Optional. Provides the value to use in the expression if the
+          parameter is omitted. The <emphasis>DefaultValue</emphasis> may be
+          the keyword ALL if the ValueType is SET (see the <emphasis
+          role="bold">SET<indexterm>
+              <primary>SET</primary>
+            </indexterm></emphasis> keyword) to indicate all possible values
+          for that type of set, or empty square brackets<indexterm>
+              <primary>square brackets</primary>
+            </indexterm> ([ ]) to indicate no possible value for that type of
+          set.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>expression</emphasis></entry>
+
+          <entry>The function's operation for which the parameters are
+          used.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <sect2 id="Simple_Value_Type_Parameters">
+    <title>Simple Value Type Parameters</title>
+
+    <para>If the optional <emphasis>ValueType</emphasis> is any of the simple
+    types (BOOLEAN, INTEGER, REAL, DECIMAL, STRING, QSTRING, UNICODE, DATA,
+    VARSTRING, VARUNICODE), the <emphasis>ValueType</emphasis> may include the
+    CONST keyword (see <emphasis role="bold">CONST</emphasis>) to indicate
+    that the passed value will always be treated as a constant (typically used
+    only in ECL prototypes of external functions).</para>
+
+    <programlisting>ValueAttribute := 15;
+FirstFunction(INTEGER x=5) := x + 5;
+          //takes an integer parameter named "x" and "x" is used in the
+          //arithmetic expression to indicate the usage of the parameter
+          
+SecondAttribute := FirstFunction(ValueAttribute);
+          // The value of SecondAttribute is 20
+          
+ThirdAttribute := FirstFunction();
+          // The value of ThirdAttribute is 10, omitting the parameter</programlisting>
+  </sect2>
+
+  <sect2 id="SET_Parameters">
+    <title>SET Parameters</title>
+
+    <para>The <emphasis>DefaultValue</emphasis> for SET parameters<indexterm>
+        <primary>SET parameters</primary>
+      </indexterm> may be a default set of values, the keyword ALL to indicate
+    all possible values for that type of set, or empty square brackets ([ ])
+    to indicate no possible value for that type of set (and empty set).</para>
+
+    <programlisting>SET OF INTEGER1 SetValues := [5,10,15,20];
+
+IsInSetFunction(SET OF INTEGER1 x=SetValues,y) := y IN x;
+
+OUTPUT(IsInSetFunction([1,2,3,4],5)); //false
+OUTPUT(IsInSetFunction(,5)); // true</programlisting>
+  </sect2>
+
+  <sect2 id="Passing_DATASET_Parameters">
+    <title>Passing DATASET Parameters</title>
+
+    <para>Passing a DATASET or a derived recordset as a parameter may be
+    accomplished using the following syntax:</para>
+
+    <para><emphasis>DefinitionName</emphasis><emphasis role="bold">(
+    DATASET<indexterm>
+        <primary>DATASET parameter</primary>
+      </indexterm>(</emphasis><emphasis> recstruct </emphasis><emphasis
+    role="bold">) </emphasis><emphasis>AliasName</emphasis><emphasis
+    role="bold"> ) := </emphasis><emphasis>expression</emphasis><emphasis
+    role="bold">;</emphasis></para>
+
+    <para>The required<emphasis> recstruct</emphasis> names the RECORD
+    structure attribute that defines the layout of fields in the passed
+    DATASET parameter. The <emphasis>recstruct</emphasis> may alternatively
+    use the RECORDOF function. The required<emphasis> AliasName</emphasis>
+    names the dataset for use in the function and is used in the Definition's
+    <emphasis>expression</emphasis> to indicate where in the operation the
+    passed parameter is to be used. See the <emphasis role="bold">DATASET as a
+    Value Type</emphasis> discussion in the DATASET documentation for further
+    examples.</para>
+
+    <programlisting>    MyRec := {STRING1 Letter};
+    
+    SomeFile := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'}],MyRec);
+
+    FilteredDS(DATASET(MyRec) ds) := ds(Letter NOT IN ['A','C','E']);
+            //passed dataset referenced as “ds” in expression
+
+    OUTPUT(FilteredDS(SomeFile));</programlisting>
+  </sect2>
+
+  <sect2 id="Passing_Typeless_Parameters">
+    <title>Passing Typeless Parameters</title>
+
+    <para>Passing parameters of any type may be accomplished using the keyword
+    ANY<indexterm>
+        <primary>ANY</primary>
+      </indexterm> as the passed value type:</para>
+
+    <para><emphasis>DefinitionName</emphasis> <emphasis role="bold">(
+    ANY</emphasis> <emphasis>AliasName</emphasis> <emphasis role="bold"> ) :=
+    </emphasis><emphasis>expression</emphasis><emphasis
+    role="bold">;</emphasis></para>
+
+    <programlisting>a := 10;
+b := 20;
+c := '1';
+d := '2';
+e := '3';
+f := '4';
+s1 := [c,d];
+s2 := [e,f];
+
+ds1 := DATASET(s1,{STRING1 ltr});
+ds2 := DATASET(s2,{STRING1 ltr});
+
+MyFunc(ANY l, ANY r) := l + r;
+
+MyFunc(a,b);      //returns 30
+MyFunc(a,c);      //returns '101'
+MyFunc(c,d);      //returns '12'
+MyFunc(s1,s2);    //returns a set: ['1','2','3','4']
+MyFunc(ds1,ds2);  //returns 4 records: '1', '2', '3', and '4'
+</programlisting>
+  </sect2>
+
+  <sect2 id="Passing_Function_Parameters">
+    <title>Passing Function Parameters</title>
+
+    <para>Passing a Function as a parameter may be accomplished using either
+    of the following syntax options as the <emphasis>ValueType</emphasis> for
+    the parameter:</para>
+
+    <para><emphasis>FunctionName</emphasis>(<emphasis
+    role="bold"></emphasis><emphasis>parameters</emphasis><emphasis
+    role="bold"></emphasis>)<emphasis></emphasis></para>
+
+    <para><emphasis>PrototypeName</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>FunctionName</emphasis></entry>
+
+            <entry>The name of a function, the type of which may be passed as
+            a parameter.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>parameters</emphasis></entry>
+
+            <entry>The parameter definitions for the
+            <emphasis>FunctionName</emphasis> parameter.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>PrototypeName</emphasis></entry>
+
+            <entry>The name of a previously defined function to use as the
+            type of function that may be passed as a parameter.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para>The following code provides examples of both methods:</para>
+
+    <programlisting>//a Function prototype:
+INTEGER actionPrototype(INTEGER v1, INTEGER v2) := 0;
+
+INTEGER aveValues(INTEGER v1, INTEGER v2) := (v1 + v2) DIV 2;
+INTEGER addValues(INTEGER v1, INTEGER v2) := v1 + v2;
+INTEGER multiValues(INTEGER v1, INTEGER v2) := v1 * v2;
+
+//a Function prototype using a function prototype:
+INTEGER applyPrototype(INTEGER v1, actionPrototype actionFunc) := 0;
+
+//using the Function prototype and a default value:
+INTEGER applyValue2(INTEGER v1,
+                    actionPrototype actionFunc = aveValues) :=
+                    actionFunc(v1, v1+1)*2;
+                       
+//Defining the Function parameter inline, witha default value:
+INTEGER applyValue4(INTEGER v1,
+                    INTEGER actionFunc(INTEGER v1,INTEGER v2) = aveValues)
+               := actionFunc(v1, v1+1)*4; 
+INTEGER doApplyValue(INTEGER v1,
+                     INTEGER actionFunc(INTEGER v1, INTEGER v2))
+        := applyValue2(v1+1, actionFunc);
+       
+//producing simple results:
+OUTPUT(applyValue2(1));                           // 2
+OUTPUT(applyValue2(2));                           // 4
+OUTPUT(applyValue2(1, addValues));                // 6
+OUTPUT(applyValue2(2, addValues));                // 10
+OUTPUT(applyValue2(1, multiValues));              // 4
+OUTPUT(applyValue2(2, multiValues));              // 12
+OUTPUT(doApplyValue(1, multiValues));             // 12
+OUTPUT(doApplyValue(2, multiValues));             // 24
+
+
+          
+//An attribute taking function parameters which themselves
+//have parameters that are functions...
+
+STRING doMany(INTEGER v1,
+              INTEGER firstAction(INTEGER v1,
+                                  INTEGER actionFunc(INTEGER v1,INTEGER v2)),
+              INTEGER secondAction(INTEGER v1,
+                                   INTEGER actionFunc(INTEGER v1,INTEGER v2)),
+              INTEGER actionFunc(INTEGER v1,INTEGER v2)) 
+       := (STRING)firstAction(v1, actionFunc) + ':' + (STRING)secondaction(v1, actionFunc);
+
+OUTPUT(doMany(1, applyValue2, applyValue4, addValues));
+     // produces "6:12"
+     
+OUTPUT(doMany(2, applyValue4, applyValue2,multiValues));
+     // produces "24:12" </programlisting>
+  </sect2>
+
+  <sect2 id="Passing_NAMED_Parameters">
+    <title>Passing NAMED Parameters</title>
+
+    <para>Passing values to a function defined to receive multiple parameters,
+    many of which have default values (and are therefore omittable), is
+    usually accomplished by “counting commas” to ensure that the values you
+    choose to pass are passed to the correct parameter by the parameter's
+    position in the list. This method becomes untenable when there are many
+    optional parameters.</para>
+
+    <para>The easier method is to use the following NAMED parameter syntax,
+    which eliminates the need to include extraneous commas as place holders to
+    put the passed values in the proper parameters:</para>
+
+    <para>Attr := FunctionName<emphasis role="bold">( [ NAMED<indexterm>
+        <primary>NAMED</primary>
+      </indexterm> ] </emphasis><emphasis>AliasName</emphasis><emphasis
+    role="bold"> := </emphasis><emphasis>value </emphasis><emphasis
+    role="bold">);</emphasis></para>
+
+    <informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec align="left" colwidth="122.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>NAMED</emphasis></entry>
+
+            <entry>Optional. Required only when the <emphasis>AliasName
+            </emphasis>clashes with a reserved word.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>AliasName</emphasis></entry>
+
+            <entry>The names of the parameter in the attribute's function
+            definition.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>value</emphasis></entry>
+
+            <entry>The value to pass to the parameter.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable>
+
+    <para>This syntax is used in the call to the function and allows you to
+    pass values to specific parameters by their
+    <emphasis>AliasName</emphasis>, without regard for their position in the
+    list. All unnamed parameters passed must precede any NAMED
+    parameters.</para>
+
+    <programlisting>outputRow(BOOLEAN showA = FALSE, BOOLEAN showB = FALSE,
+          BOOLEAN showC = FALSE, STRING aValue = 'abc',
+          INTEGER bValue = 10, BOOLEAN cValue = TRUE) :=
+  OUTPUT(IF(showA,' a='+aValue,'')+
+         IF(showB,' b='+(STRING)bValue,'')+
+         IF(showc,' c='+(STRING)cValue,''));
+
+outputRow();                    //produce blanks
+outputRow(TRUE);                //produce "a=abc"
+outputRow(,,TRUE);              //produce "c=TRUE"
+outputRow(NAMED showB := TRUE); //produce “b=10”
+
+outputRow(TRUE, NAMED aValue := 'Changed value');
+                                //produce “a=Changed value”
+
+outputRow(,,,'Changed value2',NAMED showA := TRUE);
+                                //produce "a=Changed value2"
+
+outputRow(showB := TRUE);       //produce “b=10”
+
+outputRow(TRUE, aValue := 'Changed value');
+outputRow(,,,'Changed value2',showA := TRUE);
+</programlisting>
+  </sect2>
+</sect1>

+ 83 - 0
docs/ECLR_mods/Basics-Overview.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Overview" role="nobrk">
+  <title>Overview</title>
+
+  <para><emphasis role="bold">E</emphasis>nterprise <emphasis
+  role="bold">C</emphasis>ontrol <emphasis role="bold">L</emphasis>anguage
+  (ECL)<indexterm>
+      <primary><emphasis role="bold">ECL</emphasis></primary>
+    </indexterm> has been designed specifically for huge data projects using
+  the LexisNexis High Performance Computer Cluster (HPCC)<indexterm>
+      <primary><emphasis role="bold">HPCC</emphasis></primary>
+    </indexterm>. ECL’s extreme scalability comes from a design that allows
+  you to leverage every query you create for re-use in subsequent queries as
+  needed. To do this, ECL takes a Dictionary approach to building queries
+  wherein each ECL definition defines an Attribute expression. Each previously
+  defined Attribute can then be used in succeeding ECL
+  definitions—<emphasis>the language extends itself as you use
+  it</emphasis>.</para>
+
+  <sect2 id="Attributes_versus_Actions">
+    <title>Definitions versus Actions</title>
+
+    <para>Functionally, there are two types of ECL code: Definitions (AKA
+    Attribute definitions) and executable Actions. Actions are not valid for
+    use in expressions because they do not return values. Most ECL code is
+    composed of Attribute definitions.</para>
+
+    <para>Attribute definitions only define <emphasis>what</emphasis> is to be
+    done, they do not actually execute. This means that the ECL programmer
+    should think in terms of writing code that specifies
+    <emphasis>what</emphasis> to do rather than <emphasis>how</emphasis> to do
+    it. This is an important concept in that, the programmer is telling the
+    supercomputer <emphasis>what</emphasis> needs to happen and not directing
+    <emphasis>how </emphasis>it must be accomplished. This frees the
+    super-computer to optimize the actual execution in any way it needs to
+    produce the desired result.</para>
+
+    <para>A second consideration is: the order that Attributes are defined in
+    source code does not define their execution order—ECL is a non-procedural
+    language<indexterm>
+        <primary>non-procedural language</primary>
+      </indexterm>. When an Action (such as OUTPUT) executes, all the
+    Attributes it needs to use (drilling down to the lowest level Attributes
+    upon which others are built) are compiled and optimized—in other words,
+    unlike other programming languages, there is no inherent execution order
+    implicit in the order that Attribute definitions appear in source code
+    (although there is a necessary order for compilation to occur without
+    error—forward reference<indexterm>
+        <primary>forward reference</primary>
+      </indexterm>s are not allowed). This concept of “orderless execution”
+    requires a different mindset from standard, order-dependent programming
+    languages because it makes the code appear to execute “all at
+    once.”</para>
+  </sect2>
+
+  <sect2 id="Syntax_Issues">
+    <title>Syntax Issues</title>
+
+    <para>ECL is not case-sensitive. White space is ignored, allowing
+    formatting for readability as needed.</para>
+
+    <para>Comments in ECL code are supported. Block comments must be delimited
+    with /* and */.</para>
+
+    <programlisting>/* this is a block comment - the terminator can be on the same line
+or any succeeding line – everything in between is ignored */</programlisting>
+
+    <para>Single-line comments must begin with //.</para>
+
+    <programlisting>// this is a one-line comment</programlisting>
+
+    <para>ECL uses the standard <emphasis>object.property</emphasis> syntax
+    used by many other programming languages (however, ECL is not an
+    object-oriented language) to qualify Attribute scope and disambiguate
+    field references within tables:</para>
+
+    <programlisting>ModuleName.Attribute //reference an attribute from another module</programlisting>
+
+    <programlisting>Dataset.Field       //reference a field in a dataset or recordset</programlisting>
+  </sect2>
+</sect1>

+ 76 - 0
docs/ECLR_mods/Basics-RecordSetFiltring.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="Recordset_Filtering">
+  <title>Recordset Filtering</title>
+
+  <para>Filters<indexterm>
+      <primary>Filters</primary>
+    </indexterm> are conditional expressions contained within the parentheses
+  following the Dataset or Record Set<indexterm>
+      <primary>Record Set</primary>
+    </indexterm> name. Multiple filter conditions may be specified by
+  separating each filter expression with a comma (,). All filter conditions
+  separated by commas must be TRUE for a record to be included, which makes
+  the comma an implicit AND operator (see <emphasis role="bold">Logical
+  Operators</emphasis>).</para>
+
+  <programlisting>MyRecordSet := Person(per_last_name &gt;= 'T', per_last_name &lt; 'U');
+     // MyRecordSet contains people whose last name begins with “T”
+     // the comma is an implicit AND while also functioning as
+     // an expression separator (implicit parentheses)
+
+
+MyRecordSet := Person(per_last_name &gt;= 'T' AND per_last_name &lt; 'U');
+// exactly the same logical expression as above
+
+RateGE7trds := Trades(trd_rate &gt;= '7');
+
+ValidTrades := Trades(NOT rmsTrade.Mortgage AND
+                      NOT rmsTrade.HasNarrative(rmsTrade.snClosed));</programlisting>
+
+  <para>Boolean Attribute<indexterm>
+      <primary>Boolean Attribute</primary>
+    </indexterm> definitions should be used as recordset filters for maximum
+  flexibility, readability and re-usability instead of hard-coding in a Record
+  Set definition. For example, use:</para>
+
+  <programlisting>IsRevolv := trades.trd_type = 'R'
+                OR (~ValidType(trades.trd_type)
+                   AND trades.trd_acct[1] IN ['4','5','6']);
+       
+isBank := trades.trd_ind_code IN SetBankIndCodes;
+
+IsBankCard := IsBank AND IsRevolv;
+
+WithinDate(INTEGER1 months) := ValidDate(trades.trd_drpt) AND
+                               trades.trd_drpt_mos &lt;= months;
+
+BankCardTrades := trades(isBankCard AND WithinDate(6));</programlisting>
+
+  <para>instead of:</para>
+
+  <programlisting>BankCardTrades := trades(trades.trd_ind_code IN SetBankIndCodes,
+                                         (trades.trd_type = 'R' OR
+                                         (~ValidType(trades.trd_type) AND
+                                         trades.trd_acct[1] IN ['4', '5', '6'])),
+                                         ValidDate(trades.trd_drpt),
+                                         trades.trd_drpt_mos &lt;= 6);</programlisting>
+
+  <para>Commas used to separate filter conditions in a recordset filter
+  definition act as both an implicit AND operation <emphasis
+  role="underline">and</emphasis> a set of parentheses around the individual
+  filters being separated. This results in a tighter binding than if AND is
+  used instead of a comma without parentheses. For example, the filter
+  expression in this Attribute definition::</para>
+
+  <programlisting>BankMortTrades := trades(isBankCard OR isMortgage, isOpen);</programlisting>
+
+  <para>is evaluated as if it were written:</para>
+
+  <programlisting>(isBankCard OR isMortgage) AND isOpen</programlisting>
+
+  <para>and not as:</para>
+
+  <programlisting>isBankCard OR isMortgage AND isOpen</programlisting>
+</sect1>

+ 47 - 0
docs/ECLR_mods/BltInFunc-ABS.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ABS">
+  <title>ABS</title>
+
+  <para><emphasis role="bold">ABS<indexterm>
+      <primary>ABS</primary>
+    </indexterm><indexterm>
+      <primary>ABS function</primary>
+    </indexterm>(</emphasis><emphasis>expression</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.75pt" />
+
+        <colspec colwidth="309.05pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The value (REAL or INTEGER) for which to return the
+            absolute value.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ABS returns a single value of the same type as the
+            expression.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ABS </emphasis>function returns the absolute
+  value of the <emphasis>expression</emphasis> (always a non-negative
+  number).</para>
+
+  <para>Example:</para>
+
+  <programlisting>AbsVal1 := ABS(1); // returns 1
+AbsVal2 := ABS(-1); // returns 1
+</programlisting>
+</sect1>

+ 46 - 0
docs/ECLR_mods/BltInFunc-ACOS.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ACOS">
+  <title>ACOS</title>
+
+  <para><emphasis role="bold">ACOS<indexterm>
+      <primary>ACOS</primary>
+    </indexterm><indexterm>
+      <primary>ACOS function</primary>
+    </indexterm>(</emphasis><emphasis>cosine</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.35pt" />
+
+        <colspec colwidth="309.45pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>cosine</emphasis></entry>
+
+            <entry>The REAL cosine value for which to find the
+            arccosine.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ACOS returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ACOS </emphasis>function returns the
+  arccosine (inverse) of the <emphasis>cosine</emphasis>, in radians.</para>
+
+  <para>Example:</para>
+
+  <programlisting>ArcCosine := ACOS(CosineAngle);
+</programlisting>
+
+  <para>See Also: <link linkend="COS">COS</link>, <link linkend="SIN">SIN</link>, <link linkend="TAN">TAN</link>, <link linkend="ASIN">ASIN</link>, <link linkend="ATAN">ATAN</link>, <link linkend="COSH">COSH</link>, <link linkend="SINH">SINH</link>, <link linkend="TANH">TANH</link></para>
+</sect1>

+ 220 - 0
docs/ECLR_mods/BltInFunc-AGGREGATE.xml

@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="AGGREGATE">
+  <title>AGGREGATE</title>
+
+  <para><emphasis role="bold">AGGREGATE<indexterm>
+      <primary>AGGREGATE</primary>
+    </indexterm><indexterm>
+      <primary>AGGREGATE function</primary>
+    </indexterm>(</emphasis> <emphasis>recordset,
+  resultrec,maintransform</emphasis> <emphasis role="bold">[</emphasis>
+  <emphasis>, mergetransform</emphasis> <emphasis
+  role="bold">(RIGHT1<indexterm>
+      <primary>RIGHT1</primary>
+    </indexterm>,RIGHT2<indexterm>
+      <primary>RIGHT2</primary>
+    </indexterm>) ] [,</emphasis> <emphasis>groupingfields</emphasis>
+  <emphasis role="bold">] [, LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm> | FEW<indexterm>
+      <primary>FEW</primary>
+    </indexterm> | MANY<indexterm>
+      <primary>MANY</primary>
+    </indexterm>] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="85.75pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>resultrec</emphasis></entry>
+
+            <entry>The RECORD structure of the result record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>maintransform</emphasis></entry>
+
+            <entry>The TRANSFORM function to call for each matching pair of
+            records in the <emphasis>recordset</emphasis>. This is implicitly
+            a local operation on each node.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>mergetransform</emphasis></entry>
+
+            <entry>Optional. The TRANSFORM function to call to globally merge
+            the result records from the <emphasis>maintransform</emphasis>. If
+            omitted, the compiler will attempt to deduce the merge from the
+            <emphasis>maintransform</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>groupingfields</emphasis></entry>
+
+            <entry>Optional. A comma-delimited list of fields in the
+            <emphasis>recordset</emphasis> to group by. Each field must be
+            prefaced with the keyword LEFT. If omitted, then all records
+            match.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>Optional. Specifies the operation is performed on each
+            supercomputer node independently, without requiring interaction
+            with all other nodes to acquire data; the operation maintains the
+            distribution of any previous DISTRIBUTE. Valid only if the
+            <emphasis>mergetransform</emphasis> is omitted.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">FEW</emphasis></entry>
+
+            <entry>Optional. Indicates that the expression will result in
+            fewer than 10,000 records. This allows optimization to produce a
+            significantly faster result.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">MANY</emphasis></entry>
+
+            <entry>Optional. Indicates that the expression will result in more
+            than 10,000 records.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>AGGREGATE returns a record set.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">AGGREGATE </emphasis>function is similar to
+  ROLLUP except its output format does not need to match the input format. It
+  also has similarity to TABLE in that the <emphasis>groupingfields</emphasis>
+  (if present) determine the matching records such that you will get one
+  result for each unique value of the <emphasis>groupingfields</emphasis>. The
+  input <emphasis>recordset</emphasis> does not need to have been sorted by
+  the <emphasis>groupingfields</emphasis>.</para>
+
+  <para>The operation is implicitly local, in that the
+  <emphasis>maintransform</emphasis> is called to process records locally on
+  each node, and the result records on each node are then merged to produce
+  the global result. The </para>
+
+  <sect2 id="TRANSFORM_Function_Requirements_Aggregate">
+    <title>TRANSFORM Function Requirements - AGGREGATE</title>
+
+    <para>The <emphasis>maintransform</emphasis> must take at least two
+    parameters: a LEFT record of the same format as the input
+    <emphasis>recordset </emphasis>and a RIGHT record of the same format as
+    the <emphasis>resultrec</emphasis>. The format of the resulting record set
+    must be the <emphasis>resultrec</emphasis>. LEFT refers to the next input
+    record and RIGHT the result of the previous transform.</para>
+
+    <para>The <emphasis>mergetransform</emphasis> must take at least two
+    parameters: RIGHT1 and RIGHT2 records of the same format as the
+    <emphasis>resultrec</emphasis>. The format of the resulting record set
+    must be the <emphasis>resultrec</emphasis>. RIGHT1 refers to the result of
+    the <emphasis>maintransform</emphasis> on one node and RIGHT2 the result
+    of the <emphasis>maintransform</emphasis> on another.</para>
+
+    <para>The <emphasis>mergetransform</emphasis> is generated for expressions
+    of the form:</para>
+
+    <programlisting>  SELF.x := &lt;RIGHT.x &lt;op&gt; f(LEFT)
+  SELF.x := f(LEFT)  &lt;op&gt; RIGHT.x</programlisting>
+
+    <para>where the &lt;op&gt; is: MAX, MIN, SUM, +, &amp;, |, ^, *</para>
+  </sect2>
+
+  <sect2 id="How_Aggregate_Works">
+    <title>How AGGREGATE Works</title>
+
+    <para>In the <emphasis>maintransform</emphasis>, LEFT refers to the next
+    input record and RIGHT the result of the previous transform.</para>
+
+    <para>There are 4 interesting cases:</para>
+
+    <para>(a) If no records match (and the operation isn't grouped), the
+    output is a single record with all the fields set to blank values.</para>
+
+    <para>(b) If a single record matches, the first record that matches calls
+    the <emphasis>maintransform</emphasis> as you would expect.</para>
+
+    <para>(c) If multiple records match on a single node, subsequent records
+    that match call the <emphasis>maintransform</emphasis> but any field
+    expression in the <emphasis>maintransform</emphasis> that does not
+    reference the RIGHT record is not processed. Therefore the value for that
+    field is set by the first matching record matched instead of the
+    last.</para>
+
+    <para>(d) If multiple records match on multiple nodes, then step (c)
+    performs on each node, and then the summary records are merged. This
+    requires a <emphasis>mergetransform</emphasis> that takes two records of
+    type RIGHT. Whenever possible the code generator tries to deduce the
+    <emphasis>mergetransform</emphasis> from the
+    <emphasis>maintransform</emphasis>. If it can't, then the user will need
+    to specify one.</para>
+
+    <programlisting>inRecord := RECORD 
+  UNSIGNED box; 
+  STRING text{MAXLENGTH(10)}; 
+END; 
+inTable := DATASET('in', inRecord, THOR);
+      
+//Example 1: Produce a list of box contents by concatenating a string:
+      
+outRecord1 := RECORD 
+  UNSIGNED box; 
+  STRING contents{MAXLENGTH(200)}; 
+END; 
+outRecord1 t1(inRecord l, outRecord1 r) := TRANSFORM 
+  SELF.box := l.box; 
+  SELF.contents := r.contents + IF(r.contents &lt;&gt; '', ',', '') + l.text; 
+END; 
+      
+outRecord1 t2(outRecord1 r1, outRecord1 r2) := TRANSFORM 
+  SELF.box := r1.box; 
+  SELF.contents := r1.contents + ',' + r2.contents; 
+END; 
+OUTPUT(AGGREGATE(inTable, outRecord1, t1(LEFT, RIGHT), t2(RIGHT1, RIGHT2), LEFT.box));
+      
+//This example could eliminate the merge transform if the SELF.contents expression in
+//the t1 TRANSFORM were simpler, like this:
+//     SELF.contents := r.contents + ',' + l.text;
+//which would make the AGGREGATE function like this:
+//   OUTPUT(AGGREGATE(inTable, outRecord1, t1(LEFT, RIGHT), LEFT.box));
+
+      
+//Example 2: A PIGMIX style grouping operation:
+outRecord2 := RECORD 
+  UNSIGNED box; 
+  DATASET(inRecord) items; 
+END; 
+outRecord2 t3(inRecord l, outRecord1 r) := TRANSFORM 
+  SELF.box := l.box; 
+  SELF.items:= r.items + l; 
+END; 
+OUTPUT(AGGREGATE(inTable, outRecord1, t3(LEFT, RIGHT), LEFT.box));</programlisting>
+
+    <para>See Also: <link linkend="TRANSFORM_Structure">TRANSFORM
+    Structure</link>, <link linkend="RECORD_Structure">RECORD
+    Structure</link>, <link linkend="ROLLUP">ROLLUP</link>, <link
+    linkend="TABLE">TABLE</link></para>
+  </sect2>
+</sect1>

+ 47 - 0
docs/ECLR_mods/BltInFunc-ALLNODES.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ALLNODES">
+  <title>ALLNODES</title>
+
+  <para><emphasis role="bold">ALLNODES<indexterm>
+      <primary>ALLNODES</primary>
+    </indexterm><indexterm>
+      <primary>ALLNODES function</primary>
+    </indexterm>(</emphasis><emphasis>operation</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.70pt" />
+
+        <colspec colwidth="310.10pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>operation</emphasis></entry>
+
+            <entry>The name of an attribute or in-line code that results in a
+            DATASET or INDEX.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ALLNODES returns a record set or index.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ALLNODES </emphasis>function specifies that
+  the <emphasis>operation</emphasis> is performed on all nodes in parallel.
+  <emphasis role="bold">Available for use only in Roxie.</emphasis></para>
+
+  <para>Example:</para>
+
+  <programlisting>ds := ALLNODES(JOIN(SomeData,LOCAL(SomeIndex), LEFT.ID = RIGHT.ID));
+</programlisting>
+
+  <para>See Also: THISNODE, LOCAL, NOLOCAL</para>
+</sect1>

+ 91 - 0
docs/ECLR_mods/BltInFunc-APPLY.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="APPLY">
+  <title>APPLY</title>
+
+  <para><emphasis role="bold">[</emphasis><emphasis>attrname</emphasis>
+  :=<emphasis role="bold"> ] APPLY<indexterm>
+      <primary>APPLY</primary>
+    </indexterm><indexterm>
+      <primary>APPLY function</primary>
+    </indexterm>(</emphasis><emphasis>dataset, actionlist </emphasis><emphasis
+  role="bold">[ , BEFORE<indexterm>
+      <primary>BEFORE</primary>
+    </indexterm>( </emphasis><emphasis>actionlist </emphasis><emphasis
+  role="bold">) ]</emphasis><emphasis role="bold"> [ , AFTER<indexterm>
+      <primary>AFTER</primary>
+    </indexterm>( </emphasis><emphasis>actionlist </emphasis><emphasis
+  role="bold">) ] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="81.65pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>attrname</emphasis></entry>
+
+            <entry>Optional. The action name, which turns the action into an
+            attribute definition, therefore not executed until the
+            <emphasis>attrname</emphasis> is used as an action.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>dataset</emphasis></entry>
+
+            <entry>The set of records to apply the action to. This must be the
+            name of a physical dataset of a type that supports this
+            operation.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>actionlist</emphasis></entry>
+
+            <entry>A comma-delimited list of the operations to perform on the
+            dataset. Typically, this is an external service (see SERVICE
+            Structure<indexterm>
+                <primary>SERVICE Structure</primary>
+              </indexterm>). This may not be an OUTPUT or any function that
+            triggers a child query.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">BEFORE</emphasis></entry>
+
+            <entry>Specifies executing the enclosed
+            <emphasis>actionlist</emphasis> before the first dataset row is
+            processed. Not yet implemented in Thor, valid only in hthor and
+            Roxie.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">AFTER</emphasis></entry>
+
+            <entry>Specifies executing the enclosed
+            <emphasis>actionlist</emphasis> after the last dataset row is
+            processed. Not yet implemented in Thor, valid only in hthor and
+            Roxie.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">APPLY </emphasis>action performs all the
+  specified actions in the <emphasis>actionlist</emphasis> on each record of
+  the nominated <emphasis>dataset</emphasis>. The actions execute in the order
+  they appear in the <emphasis>actionlist</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>EXPORT x :=  SERVICE
+  echo(const string src):library='myfuncs',entrypoint='rtlEcho';
+END;
+APPLY(person,x.echo(last_name + ':' + first_name));
+ // concatenate each person's lastname and firstname and echo it
+</programlisting>
+
+  <para>See Also: <link linkend="SERVICE_Structure">SERVICE Structure</link>, <link linkend="DATASET">DATASET</link></para>
+</sect1>

+ 47 - 0
docs/ECLR_mods/BltInFunc-ASCII.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ASCII">
+  <title>ASCII</title>
+
+  <para><emphasis role="bold">ASCII<indexterm>
+      <primary>ASCII</primary>
+    </indexterm><indexterm>
+      <primary>ASCII function</primary>
+    </indexterm>(</emphasis><emphasis>recordset</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.75pt" />
+
+        <colspec colwidth="310.05pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ASCII returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ASCII </emphasis>function returns the
+  <emphasis>recordset </emphasis>with all STRING fields translated from EBCDIC
+  to ASCII.</para>
+
+  <para>Example:</para>
+
+  <para><programlisting>AsciiRecs := ASCII(SomeEBCDICInput);</programlisting></para>
+
+  <para>See Also: <link linkend="EBCDIC">EBCDIC</link></para>
+</sect1>

+ 44 - 0
docs/ECLR_mods/BltInFunc-ASIN.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ASIN">
+  <title>ASIN</title>
+
+  <para><emphasis role="bold">ASIN<indexterm>
+      <primary>ASIN</primary>
+    </indexterm><indexterm>
+      <primary>ASIN function</primary>
+    </indexterm>(</emphasis><emphasis>sine</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.65pt" />
+
+        <colspec colwidth="309.15pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>sine</emphasis></entry>
+
+            <entry>The REAL sine value for which to find the arcsine.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ASIN returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ASIN </emphasis>function returns the arcsine
+  (inverse) of the <emphasis>sine</emphasis>, in radians.</para>
+
+  <para>Example:</para>
+
+  <para><programlisting>ArcSine := ASIN(SineAngle);</programlisting></para>
+
+  <para>See Also: <link linkend="ACOS">ACOS</link>, <link linkend="COS">COS</link>, <link linkend="SIN">SIN</link>, <link linkend="TAN">TAN</link>, <link linkend="ATAN">ATAN</link>, <link linkend="COSH">COSH</link>, <link linkend="SINH">SINH</link>, <link linkend="TANH">TANH</link></para>
+</sect1>

+ 134 - 0
docs/ECLR_mods/BltInFunc-ASSERT.xml

@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ASSERT">
+  <title>ASSERT</title>
+
+  <para><emphasis role="bold">ASSERT<indexterm>
+      <primary>ASSERT</primary>
+    </indexterm>( </emphasis><emphasis>condition </emphasis><emphasis
+  role="bold">[ </emphasis><emphasis>, message </emphasis><emphasis
+  role="bold">] [ </emphasis>, <emphasis role="bold">FAIL<indexterm>
+      <primary>FAIL</primary>
+    </indexterm> ] [ </emphasis>, <emphasis role="bold">CONST<indexterm>
+      <primary>CONST</primary>
+    </indexterm> ])</emphasis><emphasis role="bold">ASSERT(
+  </emphasis><emphasis>recset, condition </emphasis><emphasis role="bold">[
+  </emphasis><emphasis>, message </emphasis><emphasis role="bold">] [
+  </emphasis>, <emphasis role="bold">FAIL ] [ </emphasis>, <emphasis
+  role="bold">CONST ])</emphasis><emphasis role="bold"><indexterm>
+      <primary>ASSERT function</primary>
+    </indexterm></emphasis></para>
+
+  <para><emphasis role="bold">ASSERT( </emphasis><emphasis>recset,
+  assertlist</emphasis><emphasis role="bold"> )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.65pt" />
+
+        <colspec colwidth="308.15pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>condition</emphasis></entry>
+
+            <entry>The logical expression that should be always be
+            true.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>message</emphasis></entry>
+
+            <entry>Optional. The error to display in the workunit. If omitted,
+            a message is generated from the approximate location in the code
+            and the condition being checked.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">FAIL</emphasis></entry>
+
+            <entry>Optional. Specifies an exception is generated, immediately
+            terminating the workunit.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">CONST</emphasis></entry>
+
+            <entry>Optional. Specifies the condition is evaluated during code
+            generation.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>recset</emphasis></entry>
+
+            <entry>The set of records for which to check the condition against
+            each record.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>assertlist</emphasis></entry>
+
+            <entry>A comma-delimited list of ASSERTs of the first form, used
+            to check multiple conditions against each record in the
+            <emphasis>recset</emphasis>.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ASSERT </emphasis>action evaluates the
+  <emphasis>condition</emphasis>, and if false, posts the
+  <emphasis>message</emphasis> in the workunit. The workunit terminates
+  immediately if the FAIL option is present.</para>
+
+  <para>Form one is the scalar form, evaluating the
+  <emphasis>condition</emphasis> once. Form two evaluates the
+  <emphasis>condition</emphasis> once for each record in the
+  <emphasis>recset</emphasis>. Form three is a variant of form two that nests
+  multiple form one ASSERTs so that each condition is checked against each
+  record in the <emphasis>recset</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>val1 := 1;
+val2 := 1;
+val3 := 2;
+val4 := 2 : STORED('val4');
+ASSERT(val1 = val2);
+ASSERT(val1 = val2, 'Abc1');
+ASSERT(val1 = val3);
+ASSERT(val1 = val3, 'Abc2');
+ASSERT(val1 = val4);
+ASSERT(val1 = val4, 'Abc3');
+ds := DATASET([1,2],{INTEGER val1}) : GLOBAL;
+ // global stops advanced constant folding (if ever done)
+ds1 := ASSERT(ds, val1 = val2);
+ds2 := ASSERT(ds1, val1 = val2, 'Abc4');
+ds3 := ASSERT(ds2, val1 = val3);
+ds4 := ASSERT(ds3, val1 = val3, 'Abc5');
+ds5 := ASSERT(ds4, val1 = val4);
+ds6 := ASSERT(ds5, val1 = val4, 'Abc6');
+OUTPUT(ds6);
+ds7 := ASSERT(ds(val1 != 99),
+    ASSERT(val1 = val2),
+    ASSERT(val1 = val2, 'Abc7'),
+    ASSERT(val1 = val3),
+    ASSERT(val1 = val3, 'Abc8'),
+    ASSERT(val1 = val4),
+    ASSERT(val1 = val4, 'Abc9'));
+OUTPUT(ds7);
+rec := RECORD
+  INTEGER val1;
+  STRING text;
+END;
+rec t(ds l) := TRANSFORM
+  ASSERT(l.val1 &lt;= 3);
+  SELF.text := CASE(l.val1,1=&gt;'One',2=&gt;'Two',3=&gt;'Three','Zero');
+  SELF := l;
+END;
+OUTPUT(PROJECT(ds, t(LEFT)));
+</programlisting>
+
+  <para>See Also: <link linkend="FAIL">FAIL</link>, <link linkend="ERROR">ERROR</link></para>
+</sect1>

+ 52 - 0
docs/ECLR_mods/BltInFunc-ASTRING.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ASSTRING">
+  <title>ASSTRING</title>
+
+  <para><emphasis role="bold">ASSTRING<indexterm>
+      <primary>ASSTRING</primary>
+    </indexterm>(</emphasis><emphasis>bitmap</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.00pt" />
+
+        <colspec colwidth="309.80pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>bitmap</emphasis></entry>
+
+            <entry>The value to treat as a string.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ASSTRING returns a single STRING value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ASSTRING </emphasis>function<indexterm>
+      <primary>ASSTRING function</primary>
+    </indexterm> returns the <emphasis>bitmap</emphasis> as a string. This is
+  equivalent to
+  TRANSFER(<emphasis>bitmap</emphasis>,STRING<emphasis>n</emphasis>) where
+  <emphasis>n</emphasis> is the same number of bytes as the data in the
+  <emphasis>bitmap</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>INTEGER1 MyInt := 65; //MyInt is an integer whose value is 65
+MyVal1 := ASSTRING(MyInt); //MyVal1 is “A” (ASCII 65)
+ // this is directly equivalent to:
+ // STRING1 MyVal1 := TRANSFER(MyInt,STRING1);INTEGER1 MyVal3 := (INTEGER)MyVal1; 
+ //MyVal3 is 0 (zero) because “A” is not a numeric character
+</programlisting>
+
+  <para>See Also: <link linkend="TRANSFER">TRANSFER</link>, <link linkend="Type_Casting">Type Casting</link></para>
+</sect1>

+ 45 - 0
docs/ECLR_mods/BltInFunc-ATAN.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ATAN">
+  <title>ATAN</title>
+
+  <para><emphasis role="bold">ATAN<indexterm>
+      <primary>ATAN</primary>
+    </indexterm><indexterm>
+      <primary>ATAN function</primary>
+    </indexterm>(</emphasis><emphasis>tangent</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.20pt" />
+
+        <colspec colwidth="309.60pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>tangent</emphasis></entry>
+
+            <entry>The REAL tangent value for which to find the
+            arctangent.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ATAN returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ATAN </emphasis>function returns the
+  arctangent (inverse) of the <emphasis>tangent</emphasis>, in radians.</para>
+
+  <para>Example:</para>
+
+  <programlisting>ArcTangent := ATAN(TangentAngle); </programlisting>
+
+  <para>See Also: <link linkend="ATAN2">ATAN2</link>, <link linkend="ACOS">ACOS</link>, <link linkend="COS">COS</link>, <link linkend="ASIN">ASIN</link>, <link linkend="SIN">SIN</link>, <link linkend="TAN">TAN</link>, <link linkend="COSH">COSH</link>, <link linkend="SINH">SINH</link>, <link linkend="TANH">TANH</link></para>
+</sect1>

+ 54 - 0
docs/ECLR_mods/BltInFunc-ATAN2.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ATAN2">
+  <title>ATAN2</title>
+
+  <para><emphasis role="bold">ATAN2<indexterm>
+      <primary>ATAN2</primary>
+    </indexterm><indexterm>
+      <primary>ATAN2 function</primary>
+    </indexterm>(</emphasis><emphasis>y, x</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.95pt" />
+
+        <colspec colwidth="309.85pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>y</emphasis></entry>
+
+            <entry>The REAL numerator value for the tangent.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>x</emphasis></entry>
+
+            <entry>The REAL denominator value for the tangent.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ATAN2 returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ATAN2 </emphasis>function returns the
+  arctangent (inverse) of the calculated tangent, in radians. This is similar
+  to the ATAN function<indexterm>
+      <primary>ATAN function</primary>
+    </indexterm> but more accurate and handles the situations where
+  <emphasis>x</emphasis> or <emphasis>y</emphasis> is zero.</para>
+
+  <para>Example:</para>
+
+  <para>ArcTangent := ATAN2(TangentNumerator, TangentDenominator);</para>
+
+  <para>See Also: <link linkend="ATAN">ATAN</link>, <link linkend="ACOS">ACOS</link>, <link linkend="COS">COS</link>, <link linkend="ASIN">ASIN</link>, <link linkend="SIN">SIN</link>, <link linkend="TAN">TAN</link>, <link linkend="COSH">COSH</link>, <link linkend="SINH">SINH</link>, <link linkend="TANH">TANH</link></para>
+</sect1>

+ 78 - 0
docs/ECLR_mods/BltInFunc-AVE.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="AVE">
+  <title>AVE</title>
+
+  <para><emphasis role="bold">AVE<indexterm>
+      <primary>AVE</primary>
+    </indexterm><indexterm>
+      <primary>AVE function</primary>
+    </indexterm>(</emphasis><emphasis>recordset, value </emphasis><emphasis
+  role="bold">[, KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm> ])</emphasis><emphasis role="bold"></emphasis></para>
+
+  <para><emphasis
+  role="bold">AVE(</emphasis><emphasis>valuelist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.85pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set. This also may be
+            the keyword GROUP to indicate averaging the field values in a
+            group.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>value</emphasis></entry>
+
+            <entry>The expression to find the average value of.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">KEYED</emphasis></entry>
+
+            <entry>Optional. Specifies the activity is part of an index read
+            operation, which allows the optimizer to generate optimal code for
+            the operation.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuelist</emphasis></entry>
+
+            <entry>A comma-delimited list of expressions to find the average
+            value of. This may also be a SET of values.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>Return:<emphasis> </emphasis>AVE returns a single value.</para>
+
+  <para>The <emphasis role="bold">AVE </emphasis>function either returns the
+  average <emphasis>value</emphasis> (arithmetic mean) from the specified
+  <emphasis>recordset </emphasis>or the <emphasis>valuelist</emphasis>. It is
+  defined to return zero if the <emphasis>recordset</emphasis> is
+  empty.</para>
+
+  <para>Example:</para>
+
+  <programlisting>AvgBal1 := AVE(Trades,Trades.trd_bal);
+AvgVal2 := AVE(4,8,16,2,1); //returns 6.2
+SetVals := [4,8,16,2,1];
+AvgVal3 := AVE(SetVals);    //returns 6.2
+</programlisting>
+
+  <para>See Also: <link linkend="MIN">MIN</link>, <link linkend="MAX">MAX</link></para>
+</sect1>

+ 509 - 0
docs/ECLR_mods/BltInFunc-BUILD.xml

@@ -0,0 +1,509 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="BUILD">
+  <title>BUILD</title>
+
+  <para><emphasis>[</emphasis><emphasis>attrname</emphasis> :=<emphasis
+  role="bold"> ] BUILD<indexterm>
+      <primary>BUILD</primary>
+    </indexterm>(</emphasis><emphasis>baserecset</emphasis><emphasis
+  role="bold">, [</emphasis><emphasis> indexrec </emphasis><emphasis
+  role="bold">] , </emphasis><emphasis>indexfile </emphasis><emphasis
+  role="bold">[, </emphasis><emphasis>options </emphasis><emphasis
+  role="bold">] );</emphasis></para>
+
+  <para><emphasis role="bold">[</emphasis><emphasis>attrname</emphasis>
+  :=<emphasis role="bold">
+  ]BUILD(</emphasis><emphasis>baserecset</emphasis><emphasis
+  role="bold">,</emphasis><emphasis> keys</emphasis><emphasis
+  role="bold">,</emphasis><emphasis> payload</emphasis><emphasis role="bold">,
+  </emphasis><emphasis>indexfile </emphasis><emphasis role="bold">[,
+  </emphasis><emphasis>options </emphasis><emphasis role="bold">]
+  );</emphasis></para>
+
+  <para><emphasis role="bold">[</emphasis><emphasis>attrname</emphasis>
+  :=<emphasis role="bold"> ] BUILD(</emphasis><emphasis> indexdef
+  </emphasis><emphasis role="bold">[, </emphasis><emphasis>options
+  </emphasis><emphasis role="bold">] );</emphasis></para>
+
+  <para><emphasis role="bold">BUILD(</emphasis><emphasis> library
+  </emphasis><emphasis role="bold">);</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.50pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>attrname</emphasis></entry>
+
+            <entry>Optional. The action name, which turns the action into an
+            attribute definition, therefore not executed until the
+            <emphasis>attrname</emphasis> is used as an action.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>baserecset</emphasis></entry>
+
+            <entry>The set of data records for which the index file will be
+            created. This may be a record set derived from the base data with
+            the key fields and file position.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>indexrec</emphasis></entry>
+
+            <entry>Optional. The RECORD structure of the fields in the
+            indexfile that contains key and file position information for
+            referencing into the <emphasis>baserecset</emphasis>. Field names
+            and types must match the <emphasis>baserecset</emphasis> fields
+            (REAL and DECIMAL value type fields are not supported). This may
+            also contain additional fields not present in the
+            <emphasis>baserecset</emphasis> (computed fields). If omitted, all
+            fields in the <emphasis>baserecset</emphasis> are used. The last
+            field must be the name of an UNSIGNED8 field defined using the
+            {virtual(filepposition)} function in the DATASET declaration of
+            the <emphasis>baserecset</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>keys</emphasis></entry>
+
+            <entry>The RECORD structure of fields in the
+            <emphasis>indexfile</emphasis> that contains key and file position
+            information for referencing into the
+            <emphasis>baserecset</emphasis>. Field names and types must match
+            the <emphasis>baserecset</emphasis> fields (REAL and DECIMAL value
+            type fields are not supported). This may also contain additional
+            fields not present in the <emphasis>baserecset</emphasis>. If
+            omitted, all fields in the <emphasis>baserecset</emphasis> are
+            used.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>payload</emphasis></entry>
+
+            <entry>The RECORD structure of the <emphasis>indexfile</emphasis>
+            that contains additional fields not used as keys . If the name of
+            the <emphasis>baserecset</emphasis> is in the structure, it
+            specifies “all other fields not already named in the keys
+            parameter.” This may contain fields not present in the
+            <emphasis>baserecset</emphasis> (computed fields). These fields do
+            not take up space in the non-leaf nodes of the index and cannot be
+            referenced in a KEYED() filter clause</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>indexfile</emphasis></entry>
+
+            <entry>A string constant containing the logical filename of the
+            index to produce. See the Scope &amp; Logical Filenames article
+            for more on logical filenames.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>options</emphasis></entry>
+
+            <entry>Optional. One or more of the options listed below.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>indexdef</emphasis></entry>
+
+            <entry>The name of the INDEX attribute to build.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>library</emphasis></entry>
+
+            <entry>The name of a MODULE attribute with the LIBRARY
+            option.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The first three forms of the <emphasis role="bold">BUILD
+  </emphasis>action create index files. Indexes are automatically compressed,
+  minimizing overhead associated with using indexed record access. The keyword
+  BUILDINDEX may be used in place of BUILD in these forms.</para>
+
+  <para>The fourth form creates an external query library<indexterm>
+      <primary>query library</primary>
+    </indexterm>—a workunit that implements the specified
+  <emphasis>library</emphasis>. This is similar to creating a .DLL in Windows
+  programming, or a .SO in Linux.</para>
+
+  <sect2 id="Index_BUILD_Options">
+    <title>Index BUILD Options</title>
+
+    <para>The following options are available on all three INDEX forms of
+    BUILD (only):</para>
+
+    <para><emphasis role="bold">[, CLUSTER<indexterm>
+        <primary>CLUSTER</primary>
+      </indexterm>(</emphasis><emphasis> target </emphasis><emphasis
+    role="bold">)] [, SORTED<indexterm>
+        <primary>SORTED</primary>
+      </indexterm>] [, DISTRIBUTE<indexterm>
+        <primary>DISTRIBUTE</primary>
+      </indexterm>( </emphasis><emphasis>key</emphasis><emphasis role="bold">
+    ) [ , MERGE<indexterm>
+        <primary>MERGE</primary>
+      </indexterm> ] ]</emphasis><emphasis role="bold">[, DATASET<indexterm>
+        <primary>DATASET</primary>
+      </indexterm>( </emphasis><emphasis>basedataset</emphasis><emphasis
+    role="bold"> )] [, OVERWRITE<indexterm>
+        <primary>OVERWRITE</primary>
+      </indexterm>]</emphasis><emphasis role="bold">[, FEW<indexterm>
+        <primary>FEW</primary>
+      </indexterm>] [, LOCAL<indexterm>
+        <primary>LOCAL</primary>
+      </indexterm>] [, NOROOT<indexterm>
+        <primary>NOROOT</primary>
+      </indexterm>] [, DISTRIBUTED<indexterm>
+        <primary>DISTRIBUTED</primary>
+      </indexterm>]</emphasis><emphasis role="bold">[, COMPRESSED<indexterm>
+        <primary>COMPRESSION</primary>
+      </indexterm>( LZW<indexterm>
+        <primary>LZW</primary>
+      </indexterm> | ROW<indexterm>
+        <primary>ROW</primary>
+      </indexterm> | FIRST<indexterm>
+        <primary>FIRST</primary>
+      </indexterm>) ] [, WIDTH<indexterm>
+        <primary>WIDTH</primary>
+      </indexterm>(</emphasis><emphasis> nodes </emphasis><emphasis
+    role="bold">) ] [, DEDUP<indexterm>
+        <primary>DEDUP</primary>
+      </indexterm>]</emphasis></para>
+
+    <para><informaltable colsep="0" frame="none" rowsep="0">
+        <tgroup cols="2">
+          <colspec colwidth="95.85pt" />
+
+          <colspec />
+
+          <tbody>
+            <row>
+              <entry><emphasis role="bold">CLUSTER</emphasis></entry>
+
+              <entry>Specifies writing the <emphasis>indexfile</emphasis> to
+              the specified list of target clusters. If omitted, the
+              <emphasis>indexfile</emphasis> is written to the cluster on
+              which the workunit executes. The number of physical file parts
+              written to disk is always determined by the number of nodes in
+              the cluster on which the workunit executes, regardless of the
+              number of nodes on the target cluster(s) unless the WIDTH option
+              is also specified.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>target</emphasis></entry>
+
+              <entry>A comma-delimited list of string constants containing the
+              names of the clusters to write the
+              <emphasis>indexfile</emphasis> to. The names must be listed as
+              they appear on the ECL Watch Activity page or returned by the
+              Std.System.Thorlib.Group() function, optionally with square
+              brackets containing a comma-delimited list of node-numbers
+              (1-based) and/or ranges (specified with a dash, as in n-m) to
+              indicate the specific set of nodes to write to.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">SORTED</emphasis></entry>
+
+              <entry>Specifies that the <emphasis>baserecset</emphasis> is
+              already sorted, implying that the automatic sort based on all
+              the <emphasis>indexrec</emphasis> fields is not required before
+              the index is created.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">DISTRIBUTE</emphasis></entry>
+
+              <entry>Specifies building the <emphasis>indexfile</emphasis>
+              based on the distribution of the key.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>key</emphasis></entry>
+
+              <entry>The name of an existing INDEX attribute
+              definition.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">MERGE</emphasis></entry>
+
+              <entry>Optional. Specifies merging the resulting index into the
+              specified key.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">DATASET</emphasis></entry>
+
+              <entry>This is only needed when the
+              <emphasis>baserecset</emphasis> is the result of an operation
+              (such as a JOIN) whose result makes it ambiguous as to which
+              physical dataset is being indexed (in other words, use this
+              option only when you receive an error that it cannot be
+              deduced). Naming the <emphasis>basedataset</emphasis> ensures
+              that the proper record links are used in the index.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>basedataset</emphasis></entry>
+
+              <entry>The name of the DATASET attribute from which the
+              <emphasis>baserecset</emphasis> is derived.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">OVERWRITE</emphasis></entry>
+
+              <entry>Specifies overwriting the <emphasis>indexfile</emphasis>
+              if it already exists.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">FEW</emphasis></entry>
+
+              <entry>Specifies the <emphasis>indexfile</emphasis> is created
+              as a single one-part file. Used only for small datasets
+              (typically lookup-type files, such as 2-character state codes).
+              This option is now deprecated in favor of using the
+              WIDTH(1).</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>indexdef</emphasis></entry>
+
+              <entry>The name of an existing INDEX attribute definition that
+              provides the <emphasis>baserecset</emphasis>,
+              <emphasis>indexrec</emphasis>, and
+              <emphasis>indexfile</emphasis> parameters to use.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+              <entry>Specifies the operation is performed on each
+              supercomputer node independently, without requiring interaction
+              with all other nodes to acquire data; the operation maintains
+              the distribution of any previous DISTRIBUTE function.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">NOROOT</emphasis></entry>
+
+              <entry>Specifies that the index is not globally sorted, and
+              there is no root index to indicate which part of the index will
+              contain a particular entry. This may be useful in Roxie queries
+              in conjunction with ALLNODES use.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">DISTRIBUTED</emphasis></entry>
+
+              <entry>Specifies both the LOCAL and NOROOT options (congruent
+              with the DISTRIBUTED option on an INDEX declaration, which
+              specifies the index was built with the LOCAL and NOROOT
+              options).</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">COMPRESSED</emphasis></entry>
+
+              <entry>Specifies the type of compression used. If omitted, the
+              default is LZW, a variant of the Lempel-Ziv-Welch algorithm.
+              Specifying ROW compresses index entries based on differences
+              between contiguous rows (for use with fixed-length records,
+              only), and is recommended for use in circumstances where
+              speedier decompression time is more important than the amount of
+              compression achieved. FIRST compresses common leading elements
+              of the key (recommended only for timing comparison use).</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">WIDTH</emphasis></entry>
+
+              <entry>Specifies writing the <emphasis>indexfile</emphasis> to a
+              different number of physical file parts than the number of nodes
+              in the cluster on which the workunit executes. If omitted, the
+              default is the number of nodes in the cluster on which the
+              workunit executes. This option is primarily to create indexes on
+              a large Thor that are destined to be deployed to a smaller Roxie
+              (making the Roxie queries more efficient).</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>nodes</emphasis></entry>
+
+              <entry>The number of physical file parts to write. If set to one
+              (1), this operates exactly the same as the FEW option,
+              above.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis role="bold">DEDUP</emphasis></entry>
+
+              <entry>Specifies that duplicate entries are eliminated from the
+              INDEX.</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable></para>
+  </sect2>
+
+  <sect2 id="BUILD_an_Access_Index">
+    <title>BUILD an Access Index</title>
+
+    <para><emphasis role="bold">[</emphasis><emphasis>attrname</emphasis>
+    :=<emphasis role="bold"> ]
+    BUILD(</emphasis><emphasis>baserecset</emphasis><emphasis role="bold">,
+    [</emphasis><emphasis> indexrec </emphasis><emphasis role="bold">] ,
+    </emphasis><emphasis>indexfile </emphasis><emphasis role="bold">[,
+    </emphasis><emphasis>options </emphasis><emphasis role="bold">]
+    );</emphasis></para>
+
+    <para>Form 1 creates an index file to allow keyed access to the
+    <emphasis>baserecset</emphasis>. The index is used primarily by the FETCH
+    and JOIN (with the KEYED option) operations.</para>
+
+    <para>Example:</para>
+
+    <programlisting>Vehicles := DATASET('vehicles',
+     {STRING2 st,
+      STRING20 city,
+      STRING20 lname,
+      UNSIGNED8 filepos{virtual(fileposition)}},
+     FLAT);
+BUILD(Vehicles,{lname,filepos},'vkey::lname');
+ //build key into Vehicles dataset on last name
+</programlisting>
+  </sect2>
+
+  <sect2 id="BUILD_a_Payload_Index">
+    <title>BUILD a Payload Index</title>
+
+    <para><emphasis role="bold">[</emphasis><emphasis>attrname</emphasis>
+    :=<emphasis role="bold"> ]
+    BUILD(</emphasis><emphasis>baserecset</emphasis><emphasis
+    role="bold">,</emphasis><emphasis> keys</emphasis><emphasis
+    role="bold">,</emphasis><emphasis> payload</emphasis><emphasis
+    role="bold">, </emphasis><emphasis>indexfile </emphasis><emphasis
+    role="bold">[, </emphasis><emphasis>options </emphasis><emphasis
+    role="bold">] );</emphasis></para>
+
+    <para>Form 2 creates an index file containing extra <emphasis>payload
+    </emphasis>fields in addition to the <emphasis>keys</emphasis>. This form
+    is used primarily to create indexes used by “half-key” JOIN operations to
+    eliminate the need to directly access the <emphasis>baserecset</emphasis>,
+    thus increasing performance over the “full-keyed” version of the same
+    operation (done with the KEYED option on the JOIN).</para>
+
+    <para>By default, the <emphasis>payload</emphasis> fields are sorted
+    during the BUILDINDEX operation to minimize space on the leaf nodes of the
+    key. This sorting can be controlled by using
+    <emphasis>sortIndexPayload</emphasis> in a #OPTION statement.</para>
+
+    <para>Example:</para>
+
+    <programlisting>Vehicles := DATASET('vehicles',
+     {STRING2 st,
+      STRING20 city,
+      STRING20 lname,
+      UNSIGNED8 filepos{virtual(fileposition)}},
+      FLAT);
+BUILD(Vehicles,{st,city},{lname},'vkey::st.city');
+ //build key into Vehicles dataset on state and city
+ //payload the last name</programlisting>
+  </sect2>
+
+  <sect2 id="BUILD_from_an_INDEX_Definition">
+    <title>BUILD from an INDEX Definition</title>
+
+    <para><emphasis role="bold">[</emphasis><emphasis>attrname</emphasis>
+    :=<emphasis role="bold"> ] BUILD(</emphasis><emphasis> indexdef
+    </emphasis><emphasis role="bold">[, </emphasis><emphasis>options
+    </emphasis><emphasis role="bold">] );</emphasis></para>
+
+    <para>Form 3 creates an index file by using a previously defined INDEX
+    definition.</para>
+
+    <para>Example:</para>
+
+    <programlisting>nameKey := INDEX(mainTable,{surname,forename,filepos},'name.idx');
+BUILD(nameKey); //gets all info from the INDEX definition
+</programlisting>
+  </sect2>
+
+  <sect2 id="BUILD_a_Query_Library">
+    <title>BUILD a Query Library</title>
+
+    <para><emphasis role="bold">BUILD(</emphasis><emphasis> library
+    </emphasis><emphasis role="bold">);</emphasis></para>
+
+    <para>Form 4 creates an external query library <emphasis role="bold">for
+    use in hthor or Roxie, only</emphasis>.</para>
+
+    <para>A query library allows a set of related attributes to be packaged as
+    a self contained unit so the code can be shared between different
+    workunits. This reduces the time required to deploy a set of attributes,
+    and also reduces the memory footprint for the set of queries within Roxie
+    that use the <emphasis>library</emphasis>. Also, functionality in the
+    <emphasis>library</emphasis> can be updated without having to re-deploy
+    all the queries that use that functionality.</para>
+
+    <para>Query libraries are suitable for packaging together sets of
+    functions that are closely related. They aren't suited for including
+    attributes defined as MACROs—the meaning of a macro isn't known until its
+    parameters are substituted.</para>
+
+    <para>The name form of #WORKUNIT<indexterm>
+        <primary>#WORKUNIT</primary>
+      </indexterm> names the workunit that BUILD creates as the external
+    library. That name is the external library name used by the LIBRARY
+    function<indexterm>
+        <primary>LIBRARY function</primary>
+      </indexterm> (which provides access to the library from within the query
+    that uses the <emphasis>library</emphasis>). <emphasis role="bold">Since
+    the workunit itself is the external query library,
+    BUILD(</emphasis><emphasis role="bold">library</emphasis><emphasis
+    role="bold">) must be the only action in the workunit.</emphasis></para>
+
+    <para>Example:</para>
+
+    <programlisting>NamesRec := RECORD
+  INTEGER1  NameID;
+  STRING20  FName;
+  STRING20  LName;
+END;
+FilterLibIface1(DATASET(namesRec) ds, STRING search) := INTERFACE
+  EXPORT DATASET(namesRec) matches;
+  EXPORT DATASET(namesRec) others;
+END;
+
+FilterDsLib1(DATASET(namesRec) ds, STRING search) :=
+      MODULE,LIBRARY(FilterLibIface1)
+  EXPORT matches := ds(Lname  = search);
+  EXPORT others  := ds(Lname != search);
+END;
+#WORKUNIT('name','Ppass.FilterDsLib')
+BUILD(FilterDsLib1);
+</programlisting>
+
+    <para>See Also: <link linkend="INDEX_record_structure">INDEX</link>, <link
+    linkend="JOIN">JOIN</link>, <link linkend="FETCH">FETCH</link>, <link
+    linkend="MODULE_Structure">MODULE</link>, <link
+    linkend="INTERFACE_Structure">INTERFACE</link>, <link
+    linkend="LIBRARY">LIBRARY</link>, <link
+    linkend="DISTRIBUTE">DISTRIBUTE</link>, <link
+    linkend="_WORKUNIT">#WORKUNIT</link></para>
+  </sect2>
+</sect1>

+ 101 - 0
docs/ECLR_mods/BltInFunc-CASE.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CASE">
+  <title>CASE</title>
+
+  <para><emphasis role="bold">CASE<indexterm>
+      <primary>CASE</primary>
+    </indexterm><indexterm>
+      <primary>CASE function</primary>
+    </indexterm>(</emphasis><emphasis>expression, caseval =&gt; value,
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>… , caseval =&gt;
+  value </emphasis><emphasis role="bold">]</emphasis><emphasis>
+  </emphasis><emphasis role="bold">[,</emphasis><emphasis> elsevalue
+  </emphasis><emphasis role="bold">] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.75pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>An expression that results in a single value.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>caseval</emphasis></entry>
+
+            <entry>A value to compare against the result of the
+            expression.</entry>
+          </row>
+
+          <row>
+            <entry>=&gt;</entry>
+
+            <entry>The “results in” operator—valid only in CASE, MAP and
+            CHOOSESETS.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>value</emphasis></entry>
+
+            <entry>The value to return. This may be a single value, a set of
+            values, a record set, or an action.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>elsevalue</emphasis></entry>
+
+            <entry>Optional. The value to return when the result of the
+            expression does not match any of the <emphasis>caseval</emphasis>
+            values. May be omitted if all return values are actions (the
+            default would then be no action), or all return values are record
+            sets (the default would then be an empty record set).</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CASE returns a single value, a set of values, a record set,
+            or an action.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CASE </emphasis>function evaluates the
+  <emphasis>expression</emphasis> and returns the <emphasis>value</emphasis>
+  whose <emphasis>caseval </emphasis>matches the <emphasis>expression
+  </emphasis>result. If none match, it returns the
+  <emphasis>elsevalue</emphasis>.</para>
+
+  <para>There may be as many <emphasis>caseval </emphasis>=&gt;
+  <emphasis>value</emphasis> parameters as necessary to specify all the
+  expected values of the <emphasis>expression</emphasis> (there must be at
+  least one). All return <emphasis>value </emphasis>parameters must be of the
+  same type.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyExp := 1+2;
+MyChoice := CASE(MyExp, 1 =&gt; 9, 2 =&gt; 8, 3 =&gt; 7, 4 =&gt; 6, 5);
+  // returns a value of 7 for the caseval of 3
+MyRecSet := CASE(MyExp, 1 =&gt; Person(per_st = 'FL'),
+    2 =&gt; Person(per_st = 'GA'),
+    3 =&gt; Person(per_st = 'AL'),
+    4 =&gt; Person(per_st = 'SC'),
+    Person);
+  // returns set of Alabama Persons for the caseval of 3
+MyAction := CASE(MyExp, 1 =&gt; FAIL('Failed for reason 1'),
+    2 =&gt; FAIL('Failed for reason 2'),
+    3 =&gt; FAIL('Failed for reason 3'),
+    4 =&gt; FAIL('Failed for reason 4'),    FAIL('Failed for unknown reason'));
+  // for the caseval of 3, Fails for reason 3</programlisting>
+
+  <para>See Also: <link linkend="MAP">MAP</link>, <link linkend="CHOOSE">CHOOSE</link>, <link linkend="IF">IF</link>, <link linkend="REJECTED">REJECTED</link>, <link linkend="WHICH">WHICH</link></para>
+</sect1>

+ 72 - 0
docs/ECLR_mods/BltInFunc-CHOOSE.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CHOOSE">
+  <title>CHOOSE</title>
+
+  <para><emphasis role="bold">CHOOSE<indexterm>
+      <primary>CHOOSE</primary>
+    </indexterm><indexterm>
+      <primary>CHOOSE function</primary>
+    </indexterm>(</emphasis><emphasis>expression, value,… , value,
+  elsevalue</emphasis><emphasis role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.50pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>An arithmetic expression that results in a positive integer
+            and determines which value parameter to return.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>value</emphasis></entry>
+
+            <entry>The values to return. There may be as many value parameters
+            as necessary to specify all the expected values of the expression.
+            This may not be a record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>elsevalue</emphasis></entry>
+
+            <entry>The value to return when the expression returns an
+            out-of-range value. The last parameter is always the
+            <emphasis>elsevalue</emphasis>. This may not be a record
+            set.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CHOOSE returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CHOOSE </emphasis>function evaluates the
+  <emphasis>expression</emphasis> and returns the <emphasis>value</emphasis>
+  parameter whose ordinal position in the list of parameters corresponds to
+  the result of the <emphasis>expression</emphasis>. If none match, it returns
+  the <emphasis>elsevalue</emphasis>. All <emphasis>values</emphasis> and the
+  <emphasis>elsevalue</emphasis> must be of the same type.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyExp := 1+2;
+MyChoice := CHOOSE(MyExp,9,8,7,6,5); // returns 7
+MyChoice := CHOOSE(MyExp,1,2,3,4,5);  // returns 3
+MyChoice := CHOOSE(MyExp,15,14,13,12,11);  // returns 13
+WorstRate := CHOOSE(IntRate,1,2,3,4,5,6,6,6,6,0);
+ // WorstRate receives 6 if the IntRate is 7, 8, or 9
+</programlisting>
+
+  <para>See Also: <link linkend="CASE">CASE</link>, <link linkend="IF">IF</link>, <link linkend="MAP">MAP</link></para>
+</sect1>

+ 81 - 0
docs/ECLR_mods/BltInFunc-CHOOSEN.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CHOOSEN">
+  <title>CHOOSEN</title>
+
+  <para><emphasis role="bold">CHOOSEN<indexterm>
+      <primary>CHOOSEN</primary>
+    </indexterm><indexterm>
+      <primary>CHOOSEN function</primary>
+    </indexterm>(</emphasis><emphasis>recordset, n </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, startpos </emphasis><emphasis
+  role="bold">] [, FEW<indexterm>
+      <primary>FEW</primary>
+    </indexterm>])</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.10pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>n</emphasis></entry>
+
+            <entry>The number of records to return. If zero (0), no records
+            are returned, and if ALL or CHOOSEN:ALL, all records are returned.
+            The CHOOSEN:ALL option is a constant that may be used in any
+            expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>startpos</emphasis></entry>
+
+            <entry>Optional. The ordinal position in the recordset of the
+            first record to return. If omitted, the default is one
+            (1).</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">FEW</emphasis></entry>
+
+            <entry>Optional. Specifies internally converting to a TOPN
+            operation if n is a variable number (an attribute or passed
+            parameter) and the input recordset comes from a SORT.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CHOOSEN returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CHOOSEN </emphasis>function
+  (choose-<emphasis>n</emphasis>) returns the first <emphasis>n</emphasis>
+  number of records, beginning with the record at the
+  <emphasis>startpos</emphasis>, from the specified
+  <emphasis>recordset</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>AllRecs   := CHOOSEN(Person,ALL); // returns all recs from Person
+FirstFive := CHOOSEN(Person,5);   // returns first 5 recs from Person
+NextFive  := CHOOSEN(Person,5,6); // returns next 5 recs from Person
+LimitRecs := CHOOSEN(Person,IF(MyLimit&lt;&gt;0,MyLimit,CHOOSEN:ALL));
+</programlisting>
+
+  <para>See Also: <link linkend="SAMPLE">SAMPLE</link>, <link linkend="CHOOSESETS">CHOOSESETS</link></para>
+</sect1>

+ 121 - 0
docs/ECLR_mods/BltInFunc-CHOOSETS.xml

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CHOOSESETS">
+  <title>CHOOSESETS</title>
+
+  <para><emphasis role="bold">CHOOSESETS<indexterm>
+      <primary>CHOOSESETS</primary>
+    </indexterm><indexterm>
+      <primary>CHOOSESETS function</primary>
+    </indexterm>(</emphasis><emphasis> recset, condition  =&gt; n
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, o
+  </emphasis><emphasis role="bold">][ </emphasis><emphasis>,
+  </emphasis><emphasis role="bold">EXCLUSIVE</emphasis><emphasis><indexterm>
+      <primary>EXCLUSIVE</primary>
+    </indexterm> </emphasis><emphasis role="bold">|</emphasis><emphasis>
+  </emphasis><emphasis role="bold">LAST<indexterm>
+      <primary>LAST</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis
+  role="bold">|</emphasis><emphasis> </emphasis><emphasis
+  role="bold">ENTH<indexterm>
+      <primary>ENTH</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis role="bold">]
+  )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="87.05pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>condition</emphasis></entry>
+
+            <entry>The logical expression that defines which records to
+            include in the result set.</entry>
+          </row>
+
+          <row>
+            <entry>=&gt;</entry>
+
+            <entry>The “results in” operator—valid only in CHOOSESETS, CASE,
+            and MAP.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>n</emphasis></entry>
+
+            <entry>The maximum number of records to return. If zero (0), no
+            records that meet the condition are returned.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>o</emphasis></entry>
+
+            <entry>Optional. The maximum number of records to return that meet
+            none of the conditions specified.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">EXCLUSIVE</emphasis></entry>
+
+            <entry>Optional. Specifies the condition parameters are mutually
+            exclusive.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LAST</emphasis></entry>
+
+            <entry>Optional. Specifies choosing the last n records that meet
+            the condition instead of the first n. This option is implicitly
+            EXCLUSIVE.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">ENTH</emphasis></entry>
+
+            <entry>Optional. Specifies choosing a sample of records that meet
+            the condition instead of the first n. This option is implicitly
+            EXCLUSIVE.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CHOOSESETS returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CHOOSESETS </emphasis>function returns a set
+  of records from the <emphasis>recset</emphasis>. The result set is limited
+  to <emphasis>n</emphasis> number of records that meet each
+  <emphasis>condition </emphasis>listed. CHOOSESETS may take as many
+  <emphasis>condition =&gt; n</emphasis> parameters as needed to exactly
+  specify the desired set of records. This is a shorthand way of concatenating
+  the result sets of multiple CHOOSEN function calls to the same
+  <emphasis>recset</emphasis> with different filter conditions<emphasis>,
+  </emphasis>but CHOOSESETS executes significantly faster. This technique is
+  also know as a “cutback.”</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyResultSet := CHOOSESETS(Person,
+      per_first_name = 'RICHARD' =&gt; 100,
+      per_first_name = 'GWENDOLYN' =&gt; 200, 100)
+// returns a set containing 100 Richards, 200 Gwendolyns, 100 others
+</programlisting>
+
+  <para>See Also: <link linkend="CHOOSEN">CHOOSEN</link>, <link linkend="SAMPLE">SAMPLE</link></para>
+</sect1>

+ 34 - 0
docs/ECLR_mods/BltInFunc-CLUSTERSIZE.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CLUSTERSIZE">
+  <title>CLUSTERSIZE<indexterm>
+      <primary>CLUSTERSIZE</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">CLUSTERSIZE</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.40pt" />
+
+        <colspec colwidth="310.40pt" />
+
+        <tbody>
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CLUSTERSIZE returns a single INTEGER value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CLUSTERSIZE </emphasis>compile time constant
+  returns the number of nodes in the cluster. This is the same value as
+  returned by the Std.System.ThorLib.Nodes() function..</para>
+
+  <para>Example:</para>
+
+  <programlisting>OUTPUT(CLUSTERSIZE)</programlisting>
+</sect1>

+ 220 - 0
docs/ECLR_mods/BltInFunc-COMBINE.xml

@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="COMBINE">
+  <title>COMBINE</title>
+
+  <para><emphasis role="bold">COMBINE<indexterm>
+      <primary>COMBINE function</primary>
+    </indexterm>(</emphasis><emphasis> leftrecset, rightrecset
+  </emphasis><emphasis role="bold">[</emphasis>,<emphasis> transform
+  </emphasis><emphasis role="bold">]</emphasis><emphasis
+  role="bold">[,LOCAL])</emphasis></para>
+
+  <para><emphasis role="bold">COMBINE<indexterm>
+      <primary>COMBINE</primary>
+    </indexterm>(</emphasis><emphasis> leftrecset, rightrecset,
+  </emphasis><emphasis role="bold">GROUP<indexterm>
+      <primary>GROUP</primary>
+    </indexterm> </emphasis>,<emphasis> transform </emphasis><emphasis
+  role="bold">[,LOCAL]<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm> </emphasis><emphasis role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.50pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>leftrecset</emphasis></entry>
+
+            <entry>The LEFT record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>rightrecset</emphasis></entry>
+
+            <entry>The RIGHT record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>transform</emphasis></entry>
+
+            <entry>The TRANSFORM function call. If omitted, COMBINE returns
+            all fields from both the <emphasis>leftrecset</emphasis> and
+            <emphasis>rightrecset</emphasis>, with the second of any duplicate
+            named fields removed.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>The LOCAL option is required when COMBINE is used on Thor
+            (and implicit in hThor/Roxie).</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">GROUP</emphasis></entry>
+
+            <entry>Specifies the <emphasis>rightrecset</emphasis> has been
+            GROUPed. If this is not the case, an error occurs.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>COMBINE returns a record set.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">COMBINE </emphasis>function combines
+  <emphasis>leftrecset</emphasis> and <emphasis>rightrecset</emphasis> on a
+  record-by-record basis in the order in which they appear in each.</para>
+
+  <sect2 id="TRANSFORM_Function_Requirements">
+    <title>COMBINE TRANSFORM Function Requirements</title>
+
+    <para>For form 1, the transform function must take at least two
+    parameters: a LEFT record which must be in the same format as the
+    <emphasis>leftrecset</emphasis> and a RIGHT record which must be in the
+    same format as the <emphasis>rightrecset</emphasis>. The format of the
+    resulting record set may be different from the inputs.</para>
+
+    <para>For form 2, the transform function must take at least three
+    parameters: a LEFT record which must be in the same format as the
+    <emphasis>leftrecset</emphasis>, a RIGHT record which must be in the same
+    format as the <emphasis>rightrecset,</emphasis> and a ROWS(RIGHT) whose
+    format must be a DATASET(RECORDOF(<emphasis>rightrecset</emphasis>))
+    parameter. The format of the resulting record set may be different from
+    the inputs.</para>
+  </sect2>
+
+  <sect2 id="COMBINE_Form_1">
+    <title>COMBINE Form 1</title>
+
+    <para>Form 1 of COMBINE produces its result by passing each record from
+    <emphasis>leftrecset</emphasis> along with the record in the same ordinal
+    position within <emphasis>rightrecset</emphasis> to the
+    <emphasis>transform</emphasis> to produce a single output record. Grouping
+    (if any) on the <emphasis>leftrecset</emphasis> is preserved. An error
+    occurs if <emphasis>leftrecset</emphasis> and
+    <emphasis>rightrecset</emphasis> contain a different number of
+    records.</para>
+
+    <para>Example:</para>
+
+    <programlisting>inrec := RECORD
+  UNSIGNED6 did;
+END;
+outrec := RECORD(inrec)
+  STRING20  name;
+  STRING10  ssn;
+  UNSIGNED8  dob;
+END;
+ds := DATASET([1,2,3,4,5,6], inrec);
+i1 := DATASET([{1, 'Kevin'}, {2, 'Richard'}, {5,'Nigel'}],
+    { UNSIGNED6 did, STRING10 name });
+i2 := DATASET([{3, '123462'}, {5, '1287234'}, {6,'007001002'}],
+    { UNSIGNED6 did, STRING10 ssn });
+i3 := DATASET([{1, 19700117}, {4, 19831212}, {6,20000101}],
+    { UNSIGNED6 did, UNSIGNED8 dob}); 
+j1 := JOIN(ds, i1, LEFT.did = RIGHT.did, LEFT OUTER, LOOKUP);
+j2 := JOIN(ds, i2, LEFT.did = RIGHT.did, LEFT OUTER, LOOKUP);
+j3 := JOIN(ds, i3, LEFT.did = RIGHT.did, LEFT OUTER, LOOKUP);
+combined1 := COMBINE(j1, 
+                     j2,   
+             TRANSFORM(outRec,
+      SELF := LEFT;
+      SELF := RIGHT;
+      SELF := []));
+combined2 := COMBINE(combined1,
+                   j3,
+             TRANSFORM(outRec,
+      SELF.dob := RIGHT.dob;
+      SELF := LEFT));
+</programlisting>
+  </sect2>
+
+  <sect2 id="COMBINE_Form_2">
+    <title>COMBINE Form 2</title>
+
+    <para>Form 2 of COMBINE produces its result by passing each record from
+    <emphasis>leftrecset,</emphasis> the group in the same ordinal position
+    within <emphasis>rightrecset </emphasis>(along with the first record in
+    the group) to the <emphasis>transform</emphasis> to produce a single
+    output record. Grouping (if any) on the <emphasis>leftrecset</emphasis> is
+    preserved. An error occurs if the number of records in the
+    <emphasis>leftrecset</emphasis> differs from the number of groups in the
+    <emphasis>rightrecset</emphasis>.</para>
+
+    <para>Example:</para>
+
+    <programlisting>inrec := {UNSIGNED6 did};
+outrec := RECORD(inrec)
+  STRING20 name;
+  UNSIGNED score;
+END;
+nameRec := RECORD
+  STRING20 name;
+END;
+ 
+resultRec := RECORD(inrec)
+  DATASET(nameRec) names;
+END;
+ds := DATASET([1,2,3,4,5,6], inrec);
+dsg := GROUP(ds, ROW);
+i1 := DATASET([ {1, 'Kevin', 10},
+   {2, 'Richard', 5},
+   {5,'Nigel', 2},
+   {0, '', 0} ], outrec);
+i2 := DATASET([ {1, 'Kevin Halligan', 12},
+   {2, 'Richard Chapman', 15},
+   {3, 'Jake Smith', 20},
+   {5,'Nigel Hicks', 100},
+   {0, '', 0} ], outrec);
+i3 := DATASET([ {1, 'Halligan', 8},
+   {2, 'Richard', 8},
+   {6, 'Pete', 4},
+   {6, 'Peter', 8},
+   {6, 'Petie', 1},
+   {0, '', 0} ], outrec);
+j1 := JOIN( dsg,
+  i1,
+  LEFT.did = RIGHT.did,
+  TRANSFORM(outrec, SELF := LEFT; SELF := RIGHT),
+  LEFT OUTER, MANY LOOKUP);
+j2 := JOIN( dsg,
+  i2,
+  LEFT.did = RIGHT.did,
+  TRANSFORM(outrec, SELF := LEFT; SELF := RIGHT),
+  LEFT OUTER,
+  MANY LOOKUP);
+j3 := JOIN( dsg,
+  i3,
+  LEFT.did = RIGHT.did,
+  TRANSFORM(outrec, SELF := LEFT; SELF := RIGHT),
+  LEFT OUTER,
+  MANY LOOKUP);
+combined := REGROUP(j1, j2, j3);
+resultRec t(inrec l, DATASET(RECORDOF(combined)) r) := TRANSFORM
+ self.names := PROJECT(r, TRANSFORM(nameRec, SELF := LEFT));
+ self := l;
+ END;
+res1 := COMBINE(dsg,combined,GROUP,t(LEFT, ROWS(RIGHT)(score != 0)));
+//A variation using rows in a child query.
+resultRec t2(inrec l, DATASET(RECORDOF(combined)) r) := TRANSFORM
+ SELF.names := PROJECT(SORT(r, -score),
+        TRANSFORM(nameRec, SELF := LEFT));
+ SELF := l;
+ END;
+res2 := COMBINE(dsg,combined,GROUP,t2(LEFT,ROWS(RIGHT)(score != 0)));
+</programlisting>
+
+    <para>See Also: <link linkend="GROUP">GROUP</link>, <link linkend="REGROUP">REGROUP</link></para>
+  </sect2>
+</sect1>

+ 124 - 0
docs/ECLR_mods/BltInFunc-CORRELATION.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CORRELATION">
+  <title>CORRELATION</title>
+
+  <para><emphasis role="bold">CORRELATION<indexterm>
+      <primary>CORRELATION</primary>
+    </indexterm><indexterm>
+      <primary>CORRELATION function</primary>
+    </indexterm>(</emphasis><emphasis> recset, valuex, valuey
+  </emphasis><emphasis role="bold">[ </emphasis><emphasis>,
+  expresssion</emphasis><emphasis role="bold">] [, KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm> ] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.95pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set. This also may be
+            the GROUP keyword to indicate operating on the elements in each
+            group, when used in a RECORD structure to generate crosstab
+            statistics.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuex</emphasis></entry>
+
+            <entry>A numeric field or expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuey</emphasis></entry>
+
+            <entry>A numeric field or expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>Optional. A logical expression indicating which records to
+            include in the calculation. Valid only when the
+            <emphasis>recset</emphasis> parameter is the keyword
+            GROUP.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">KEYED</emphasis></entry>
+
+            <entry>Optional. Specifies the activity is part of an index read
+            operation, which allows the optimizer to generate optimal code for
+            the operation.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CORRELATION returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CORRELATION </emphasis>function returns the
+  Pearson's Product Moment Correlation Coefficient between
+  <emphasis>valuex</emphasis> and <emphasis>valuey</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>
+pointRec := { REAL x, REAL y };
+analyse( ds) := MACRO
+#uniquename(stats)
+%stats% := TABLE(ds, { c     := COUNT(GROUP),
+    sx    := SUM(GROUP, x),
+    sy    := SUM(GROUP, y),
+    sxx   := SUM(GROUP, x * x),
+    sxy   := SUM(GROUP, x * y),
+    syy   := SUM(GROUP, y * y),
+    varx  := VARIANCE(GROUP, x);
+    vary  := VARIANCE(GROUP, y);
+    varxy := COVARIANCE(GROUP, x, y);
+    rc    := CORRELATION(GROUP, x, y) });
+OUTPUT(%stats%);
+// Following should be zero
+OUTPUT(%stats%, { varx - (sxx-sx*sx/c)/c,
+   vary - (syy-sy*sy/c)/c,
+   varxy - (sxy-sx*sy/c)/c,
+   rc - (varxy/SQRT(varx*vary)) });
+OUTPUT(%stats%, { 'bestFit: y=' +
+   (STRING)((sy-sx*varxy/varx)/c) +
+   ' + ' +
+   (STRING)(varxy/varx)+'x' });
+ENDMACRO;
+ds1 := DATASET([{1,1},{2,2},{3,3},{4,4},{5,5},{6,6}], pointRec);
+ds2 := DATASET([ {1.93896e+009, 2.04482e+009},
+   {1.77971e+009, 8.54858e+008},
+   {2.96181e+009, 1.24848e+009},
+   {2.7744e+009,  1.26357e+009},
+   {1.14416e+009, 4.3429e+008},
+   {3.38728e+009, 1.30238e+009},
+   {3.19538e+009, 1.71177e+009} ], pointRec);
+ds3 := DATASET([ {1, 1.00039},
+   {2, 2.07702},
+   {3, 2.86158},
+   {4, 3.87114},
+   {5, 5.12417},
+   {6, 6.20283} ], pointRec);
+analyse(ds1);
+analyse(ds2);
+analyse(ds3);
+</programlisting>
+
+  <para>See Also: <link linkend="VARIANCE">VARIANCE</link>, <link linkend="COVARIANCE">COVARIANCE</link></para>
+</sect1>

+ 55 - 0
docs/ECLR_mods/BltInFunc-COS.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="COS">
+  <title>COS</title>
+
+  <para><emphasis role="bold">COS<indexterm>
+      <primary>COS</primary>
+    </indexterm><indexterm>
+      <primary>COS function</primary>
+    </indexterm>(</emphasis><emphasis>angle</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.70pt" />
+
+        <colspec colwidth="309.10pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>angle</emphasis></entry>
+
+            <entry>The REAL radian value for which to find the cosine.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>COS returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">COS </emphasis>function returns the cosine
+  of the <emphasis>angle</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>Rad2Deg := 57.295779513082; //number of degrees in a radian
+
+Deg2Rad := 0.0174532925199; //number of radians in a degree
+
+Angle45 := 45 * Deg2Rad;    //translate 45 degrees into radians
+
+Cosine45 := COS(Angle45);   //get cosine of the 45 degree angle
+</programlisting>
+
+  <para>See Also: <link linkend="ACOS">ACOS</link>, <link
+  linkend="SIN">SIN</link>, <link linkend="TAN">TAN</link>, <link
+  linkend="ASIN">ASIN</link>, <link linkend="ATAN">ATAN</link>, <link
+  linkend="COSH">COSH</link>, <link linkend="SINH">SINH</link>, <link
+  linkend="TANH">TANH</link></para>
+</sect1>

+ 57 - 0
docs/ECLR_mods/BltInFunc-COSH.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="COSH">
+  <title>COSH</title>
+
+  <para><emphasis role="bold">COSH<indexterm>
+      <primary>COSH</primary>
+    </indexterm><indexterm>
+      <primary>COSH function</primary>
+    </indexterm>(</emphasis><emphasis>angle</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.25pt" />
+
+        <colspec colwidth="309.55pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>angle</emphasis></entry>
+
+            <entry>The REAL radian value for which to find the hyperbolic
+            cosine.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>COSH returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">COSH </emphasis>function returns the
+  hyperbolic cosine of the <emphasis>angle</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>Rad2Deg := 57.295779513082; //number of degrees in a radian
+
+Deg2Rad := 0.0174532925199; //number of radians in a degree
+
+Angle45 := 45 * Deg2Rad;    //translate 45 degrees into radians
+
+HyperbolicCosine45 := COSH(Angle45);
+                            //get hyperbolic cosine of the 45 degree angle
+</programlisting>
+
+  <para>See Also: <link linkend="ACOS">ACOS</link>, <link
+  linkend="SIN">SIN</link>, <link linkend="TAN">TAN</link>, <link
+  linkend="ASIN">ASIN</link>, <link linkend="ATAN">ATAN</link>, <link
+  linkend="COS">COS</link>, <link linkend="SINH">SINH</link>, <link
+  linkend="TANH">TANH</link></para>
+</sect1>

+ 97 - 0
docs/ECLR_mods/BltInFunc-COUNT.xml

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="COUNT">
+  <title>COUNT</title>
+
+  <para><emphasis role="bold">COUNT<indexterm>
+      <primary>COUNT function</primary>
+    </indexterm>(</emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">[ </emphasis><emphasis>, expression </emphasis><emphasis
+  role="bold">] [, KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm> ])</emphasis><emphasis role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">COUNT<indexterm>
+      <primary>COUNT</primary>
+    </indexterm>(</emphasis><emphasis>valuelist </emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.85pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set. This also may be
+            the GROUP keyword to indicate counting the number of elements in a
+            group, when used in a RECORD structure to generate crosstab
+            statistics.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>Optional. A logical expression indicating which records to
+            include in the count. Valid only when the recordset parameter is
+            the keyword GROUP to indicate counting the number of elements in a
+            group.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">KEYED</emphasis></entry>
+
+            <entry>Optional. Specifies the activity is part of an index read
+            operation, which allows the optimizer to generate optimal code for
+            the operation.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuelist</emphasis></entry>
+
+            <entry>A comma-delimited list of expressions to count. This may
+            also be a SET of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>COUNT returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">COUNT</emphasis> function returns the number
+  of records in the specified <emphasis>recordset </emphasis>or
+  <emphasis>valuelist</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyCount := COUNT(Trades(Trades.trd_rate IN ['3', '4', '5']));
+   // count the number of records in the Trades record
+   // set whose trd_rate field contains 3, 4, or 5
+R1 := RECORD
+  person.per_st;
+  person.per_sex;
+  Number := COUNT(GROUP);
+   //total in each state/sex category
+  Hanks := COUNT(GROUP,person.per_first_name = 'HANK');
+   //total of “Hanks” in each state/sex category
+  NonHanks := COUNT(GROUP,person.per_first_name &lt;&gt; 'HANK');
+   //total of “Non-Hanks” in each state/sex category
+END;
+T1 := TABLE(person, R1,  per_st, per_sex);
+Cnt1    := COUNT(4,8,16,2,1); //returns 5
+SetVals := [4,8,16,2,1];
+Cnt2    := COUNT(SetVals); //returns 5
+</programlisting>
+
+  <para>See Also: <link linkend="SUM">SUM</link>, <link linkend="AVE">AVE</link>, <link linkend="MIN">MIN</link>, <link linkend="MAX">MAX</link>, <link linkend="GROUP">GROUP</link>, <link linkend="TABLE">TABLE</link></para>
+</sect1>

+ 128 - 0
docs/ECLR_mods/BltInFunc-COVARIANCE.xml

@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="COVARIANCE">
+  <title>COVARIANCE</title>
+
+  <para><emphasis role="bold">COVARIANCE<indexterm>
+      <primary>COVARIANCE</primary>
+    </indexterm><indexterm>
+      <primary>COVARIANCE function</primary>
+    </indexterm>(</emphasis><emphasis> recset, valuex, valuey
+  </emphasis><emphasis role="bold">[ </emphasis><emphasis>,
+  expresssion</emphasis><emphasis role="bold">] [, KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm> ])</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.15pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set. This also may be
+            the GROUP keyword to indicate operating on the elements in each
+            group, when used in a RECORD structure to generate crosstab
+            statistics.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuex</emphasis></entry>
+
+            <entry>A numeric field or expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuey</emphasis></entry>
+
+            <entry>A numeric field or expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>Optional. A logical expression indicating which records to
+            include in the calculation. Valid only when the recset parameter
+            is the keyword GROUP.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">KEYED</emphasis></entry>
+
+            <entry>Optional. Specifies the activity is part of an index read
+            operation, which allows the optimizer to generate optimal code for
+            the operation.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>COVARIANCE returns a single REAL value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">COVARIANCE </emphasis>function returns the
+  extent to which <emphasis>valuex</emphasis> and <emphasis>valuey
+  </emphasis>co-vary.</para>
+
+  <para>Example:</para>
+
+  <programlisting>pointRec := { REAL x, REAL y };
+analyse( ds) := MACRO
+#uniquename(stats)
+%stats% := TABLE(ds, { c     := COUNT(GROUP),
+    sx    := SUM(GROUP, x),
+    sy    := SUM(GROUP, y),
+    sxx   := SUM(GROUP, x * x),
+    sxy   := SUM(GROUP, x * y),
+    syy   := SUM(GROUP, y * y),
+    varx  := VARIANCE(GROUP, x);
+    vary  := VARIANCE(GROUP, y);
+    varxy := COVARIANCE(GROUP, x, y);
+    rc    := CORRELATION(GROUP, x, y) });
+OUTPUT(%stats%);
+
+// Following should be zero
+OUTPUT(%stats%, { varx - (sxx-sx*sx/c)/c,
+   vary - (syy-sy*sy/c)/c,
+   varxy - (sxy-sx*sy/c)/c,
+   rc - (varxy/SQRT(varx*vary)) });
+
+OUTPUT(%stats%, { 'bestFit: y=' +
+   (STRING)((sy-sx*varxy/varx)/c) +
+   ' + ' +
+   (STRING)(varxy/varx)+'x' });
+ENDMACRO;
+
+ds1 := DATASET([ {1,1},{2,2},{3,3},{4,4},{5,5},{6,6} ], pointRec);
+
+ds2 := DATASET([ {1.93896e+009, 2.04482e+009},
+   {1.77971e+009, 8.54858e+008},
+   {2.96181e+009, 1.24848e+009},
+   {2.7744e+009,  1.26357e+009},
+   {1.14416e+009, 4.3429e+008},
+   {3.38728e+009, 1.30238e+009},
+   {3.19538e+009, 1.71177e+009} ], pointRec);
+
+ds3 := DATASET([ {1, 1.00039},
+   {2, 2.07702},
+   {3, 2.86158},
+   {4, 3.87114},
+   {5, 5.12417},
+   {6, 6.20283} ], pointRec);
+
+analyse(ds1);
+analyse(ds2);
+analyse(ds3);
+</programlisting>
+
+  <para>See Also: <link linkend="VARIANCE">VARIANCE</link>, <link linkend="CORRELATION">CORRELATION</link></para>
+</sect1>

+ 119 - 0
docs/ECLR_mods/BltInFunc-CRON.xml

@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="CRON">
+  <title>CRON</title>
+
+  <para><emphasis role="bold">CRON<indexterm>
+      <primary>CRON</primary>
+    </indexterm><indexterm>
+      <primary>CRON function</primary>
+    </indexterm>(</emphasis><emphasis> time </emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.25pt" />
+
+        <colspec colwidth="309.55pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>time</emphasis></entry>
+
+            <entry>A string expression containing a unix-standard cron
+            time.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>CRON defines a single timer event.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">CRON</emphasis> function defines a timer
+  event for use within the WHEN workflow service<indexterm>
+      <primary>WHEN workflow service</primary>
+    </indexterm> or WAIT function. This is synonymous with EVENT(‘CRON’,
+  <emphasis>time</emphasis>).</para>
+
+  <para>The <emphasis>time </emphasis>parameter is unix-standard cron time,
+  expressed in UTC (aka Greenwich Mean Time) as a string containing the
+  following, space-delimited components:</para>
+
+  <para><emphasis>minute hour dom month dow</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="77.85pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>minute</emphasis></entry>
+
+            <entry>An integer value for the minute of the hour. Valid values
+            are from 0 to 59.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>hour</emphasis></entry>
+
+            <entry>An integer value for the hour. Valid values are from 0 to
+            23 (using the 24 hour clock).</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>dom</emphasis></entry>
+
+            <entry>An integer value for the day of the month. Valid values are
+            from 0 to 31.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>month</emphasis></entry>
+
+            <entry>An integer value for the month. Valid values are from 0 to
+            12.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>dow</emphasis></entry>
+
+            <entry>An integer value for the day of the week. Valid values are
+            from 0 to 7 (where both 0 and 7 represent Sunday).</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>Any <emphasis>time</emphasis> component that you do not want to pass
+  is replaced by an asterisk (*). You may define ranges of times using a dash
+  (-), lists using a comma (,), and ‘once every n’ using a slash (/). For
+  example, 6-18/3 in the hour field will fire the timer every three hours
+  between 6am and 6pm, and 0-6/3,18-23/3 will fire the timer every three hours
+  between 6pm and 6am.</para>
+
+  <para>Example:</para>
+
+  <programlisting>EXPORT events := MODULE
+  EXPORT dailyAtMidnight := CRON('0 0 * * *');
+  EXPORT dailyAt( INTEGER hour,
+   INTEGER minute=0) :=
+  EVENT('CRON',
+   (STRING)minute + ' ' + (STRING)hour + ' * * *');
+  EXPORT dailyAtMidday := dailyAt(12, 0);
+  EXPORT EveryThreeHours :=  CRON('0 0-23/3 * * *');
+END;
+
+BUILD(teenagers) : WHEN(events.dailyAtMidnight);
+BUILD(oldies)    : WHEN(events.dailyAt(6));
+BUILD(NewStuff)    : WHEN(events.EveryThreeHours);
+</programlisting>
+
+  <para>See Also: <link linkend="EVENT">EVENT</link>, <link linkend="WHEN">WHEN</link>, <link linkend="WAIT">WAIT</link>, <link linkend="NOTIFY">NOTIFY</link></para>
+</sect1>

+ 202 - 0
docs/ECLR_mods/BltInFunc-DEDUP.xml

@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DEDUP">
+  <title>DEDUP<indexterm>
+      <primary>DEDUP</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">DEDUP<indexterm>
+      <primary>DEDUP function</primary>
+    </indexterm>(</emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">[,</emphasis><emphasis> condition </emphasis><emphasis
+  role="bold">[, ALL<indexterm>
+      <primary>ALL</primary>
+    </indexterm>[, HASH<indexterm>
+      <primary>HASH</primary>
+    </indexterm>]] [, KEEP<indexterm>
+      <primary>KEEP</primary>
+    </indexterm> </emphasis><emphasis>n </emphasis><emphasis role="bold">]
+  [</emphasis>,<emphasis> keeper </emphasis><emphasis role="bold">] ]
+  [</emphasis><emphasis>, </emphasis><emphasis role="bold">LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm>])</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.95pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process, typically sorted in the same
+            order that the expression will test. This may be the name of a
+            dataset or derived record set, or any expression that results in a
+            derived record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>condition</emphasis></entry>
+
+            <entry>Optional. A comma-delimited list of expressions or key
+            fields in the recordset that defines “duplicate” records. The
+            keywords LEFT and RIGHT may be used as dataset qualifiers for
+            fields in the recordset. If the condition is omitted, every
+            recordset field becomes the match condition. You may use the
+            keyword RECORD (or WHOLE RECORD) to indicate all fields in that
+            structure, and/or you may use the keyword EXCEPT to list non-dedup
+            fields in the structure.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">ALL</emphasis></entry>
+
+            <entry>Optional. Matches the condition against all records, not
+            just adjacent records. This option may change the output order of
+            the resulting records.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">HASH</emphasis></entry>
+
+            <entry>Optional. Specifies the ALL operation is performed using
+            hash tables.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">KEEP</emphasis></entry>
+
+            <entry>Optional. Specifies keeping n number of duplicate records.
+            If omitted, the default behavior is to KEEP 1. Not valid with the
+            ALL option present.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>n</emphasis></entry>
+
+            <entry>The number of duplicate records to keep.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>keeper</emphasis></entry>
+
+            <entry>Optional. The keywords LEFT or RIGHT. LEFT (the default, if
+            omitted) keeps the first record encountered and RIGHT keeps the
+            last.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>Optional. Specifies the operation is performed on each
+            supercomputer node independently, without requiring interaction
+            with all other nodes to acquire data; the operation maintains the
+            distribution of any previous DISTRIBUTE.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>DEDUP returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">DEDUP</emphasis> function evaluates the
+  <emphasis>recordset</emphasis> for duplicate records, as defined by the
+  <emphasis>condition</emphasis> parameter, and returns a unique return set.
+  This is similar to the DISTINCT statement in SQL<indexterm>
+      <primary>DISTINCT statement in SQL</primary>
+    </indexterm>. The <emphasis>recordset</emphasis> should be sorted, unless
+  ALL is specified.</para>
+
+  <para>If a <emphasis>condition </emphasis>parameter is a single value
+  (<emphasis>field</emphasis>), DEDUP does a simple field-level de-dupe
+  equivalent to
+  LEFT.<emphasis>field</emphasis>=RIGHT.<emphasis>field</emphasis>. The
+  <emphasis>condition </emphasis>is evaluated for each pair of adjacent
+  records in the record set. If the <emphasis>condition </emphasis>returns
+  TRUE, the <emphasis>keeper</emphasis> record is kept and the other
+  removed.</para>
+
+  <para>The <emphasis role="bold">ALL</emphasis> option means that every
+  record pair is evaluated rather than only those pairs adjacent to each
+  other, irrespective of sort order. The evaluation is such that, for records
+  1, 2, 3, 4, the record pairs that are compared to each other are:</para>
+
+  <para>(1,2),(1,3),(1,4),(2,1),(2,3),(2,4),(3,1),(3,2),(3,4),(4,1),(4,2),(4,3)</para>
+
+  <para>This means two compares happen for each pair, allowing the
+  <emphasis>condition </emphasis>to be non-commutative.</para>
+
+  <para><emphasis role="bold">KEEP</emphasis> <emphasis>n</emphasis>
+  effectively means leaving <emphasis>n</emphasis> records of each duplicate
+  type. This is useful for sampling. The <emphasis role="bold">LEFT</emphasis>
+  <emphasis>keeper</emphasis> value (implicit if neither LEFT nor RIGHT are
+  specified) means that if the left and right records meet the de-dupe
+  criteria (that is, they “match”), the left record is kept. If the <emphasis
+  role="bold">RIGHT</emphasis> <emphasis>keeper</emphasis> appears instead,
+  the right is kept. In both cases, the next comparison involves the de-dupe
+  survivor; in this way, many duplicate records can collapse into one.</para>
+
+  <sect2 id="Complex_Record_Set_Conditions">
+    <title>Complex Record Set Conditions</title>
+
+    <para>The DEDUP function<indexterm>
+        <primary>DEDUP function</primary>
+      </indexterm> with the ALL option is useful in determining complex
+    recordset conditions between records in the same recordset. Although DEDUP
+    is traditionally used to eliminate duplicate records next to each other in
+    the recordset, the conditional expression combined with the ALL option
+    extends this capability. The ALL option causes each record to be compared
+    according to the conditional expression to every other record in the
+    recordset. This capability is most effective with small recordsets; larger
+    recordsets should also use the HASH option.</para>
+
+    <para>Example:</para>
+
+    <programlisting>LastTbl := TABLE(Person,{per_last_name});
+Lasts   := SORT(LastTbl,per_last_name);
+MySet   := DEDUP(Lasts,per_last_name);
+      // unique last names -- this is exactly equivalent to:
+      //MySet := DEDUP(Lasts,LEFT.per_last_name=RIGHT.per_last_name);
+      // also exactly equivalent to:
+      //MySet := DEDUP(Lasts);
+NamesTbl1 := TABLE(Person,{per_last_name,per_first_name});
+Names1    := SORT(NamesTbl1,per_last_name,per_first_name);
+MyNames1  := DEDUP(Names1,RECORD);
+      //dedup by all fields -- this is exactly equivalent to:
+      //MyNames1  := DEDUP(Names,per_last_name,per_first_name);
+      // also exactly equivalent to:
+      //MyNames1 := DEDUP(Names1);
+NamesTbl2 := TABLE(Person,{per_last_name,per_first_name, per_sex});
+Names2    := SORT(NamesTbl,per_last_name,per_first_name);
+MyNames2  := DEDUP(Names,RECORD, EXCEPT per_sex);
+      //dedup by all fields except per_sex
+      // this is exactly equivalent to:
+      //MyNames2 := DEDUP(Names, EXCEPT per_sex);
+
+/* In the following example, we want to determine how many ‘AN’ or ‘AU’ type inquiries 
+have occurred within 3 days of a ‘BB’ type inquiry. 
+The COUNT of inquiries in the deduped recordset is subtracted from the COUNT 
+of the inquiries in the original recordset to provide the result.*/
+INTEGER abs(INTEGER i) := IF ( i &lt; 0, -i, i );
+WithinDays(ldrpt,lday,rdrpt,rday,days) :=
+  abs(DaysAgo(ldrpt,lday)-DaysAgo(rdrpt,rday)) &lt;= days;
+DedupedInqs := DEDUP(inquiry, LEFT.inq_ind_code='BB' AND
+     RIGHT.inq_ind_code IN ['AN','AU'] AND
+                          WithinDays(LEFT.inq_drpt,
+           LEFT.inq_drpt_day,
+           RIGHT.inq_drpt,
+           RIGHT.inq_drpt_day,3),
+        ALL );
+InqCount := COUNT(Inquiry) - COUNT(DedupedInqs);
+OUTPUT(person(InqCount &gt;0),{InqCount});  </programlisting>
+
+    <para>See Also: <link linkend="SORT">SORT</link>, <link linkend="ROLLUP">ROLLUP</link>, <link linkend="TABLE">TABLE</link>, <link linkend="FUNCTION_Structure">FUNCTION Structure</link></para>
+  </sect2>
+</sect1>

+ 63 - 0
docs/ECLR_mods/BltInFunc-DEFINE.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DEFINE">
+  <title>DEFINE<indexterm>
+      <primary>DEFINE</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">DEFINE<indexterm>
+      <primary>DEFINE function</primary>
+    </indexterm>(</emphasis><emphasis> pattern, symbol </emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.35pt" />
+
+        <colspec colwidth="309.45pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>pattern</emphasis></entry>
+
+            <entry>The name of a RULE parsing pattern.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>symbol</emphasis></entry>
+
+            <entry>A string constant specifying the name to use in the USE
+            option on a PARSE function or the USE function in a RULE parsing
+            pattern.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>DEFINE creates a RULE pattern.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">DEFINE </emphasis>function defines a
+  <emphasis>symbol</emphasis> for the specified <emphasis>pattern
+  </emphasis>that may be forward referenced in previously defined parsing
+  pattern attributes. This is the only type of forward reference<indexterm>
+      <primary>forward reference</primary>
+    </indexterm> allowed in ECL.</para>
+
+  <para>Example:</para>
+
+  <programlisting>RULE a := USE('symbol');
+ //uses the 'symbol'pattern defined later - b
+RULE b := 'pattern';
+ //defines a rule pattern
+RULE s := DEFINE(b,'symbol');
+ //associate the “b” rule with the
+ //'symbol' for forward reference by rule “a”
+</programlisting>
+
+  <para>See Also: <link linkend="PARSE">PARSE</link>, <link linkend="PARSE_Pattern_Value_Types">PARSE Pattern Value Types</link></para>
+</sect1>

+ 244 - 0
docs/ECLR_mods/BltInFunc-DENORMALIZE.xml

@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DENORMALIZE">
+  <title>DENORMALIZE<indexterm>
+      <primary>DENORMALIZE</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">DENORMALIZE<indexterm>
+      <primary>DENORMALIZE function</primary>
+    </indexterm>(</emphasis><emphasis>parentrecset, childrecset, condition,
+  transform </emphasis><emphasis role="bold"> [,LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm>] [,NOSORT<indexterm>
+      <primary>NOSORT</primary>
+    </indexterm>])</emphasis><emphasis role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">DENORMALIZE(</emphasis><emphasis>parentrecset,
+  childrecset, condition, </emphasis><emphasis
+  role="bold">GROUP</emphasis><emphasis><indexterm>
+      <primary>GROUP</primary>
+    </indexterm>, transform </emphasis><emphasis role="bold"> [,LOCAL]
+  [,NOSORT])</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="82.25pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>parentrecset</emphasis></entry>
+
+            <entry>The set of parent records to process, already in the format
+            that will contain the denormalized parent and child
+            records.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>childrecset</emphasis></entry>
+
+            <entry>The set of child records to process.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>condition</emphasis></entry>
+
+            <entry>An expression that specifies how to match records between
+            the <emphasis>parentrecset</emphasis> and
+            <emphasis>childrecset</emphasis>.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>transform</emphasis></entry>
+
+            <entry>The TRANSFORM function to call.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>Optional. Specifies the operation is performed on each
+            supercomputer node independently, without requiring interaction
+            with all other nodes to acquire data; the operation maintains the
+            distribution of any previous DISTRIBUTE.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">NOSORT</emphasis></entry>
+
+            <entry>Optional. Specifies the operation is performed without
+            sorting the <emphasis>parentrecset</emphasis> or
+            <emphasis>childrecset</emphasis> —both must already be sorted so
+            matching records in both are in order. This allows programmer
+            control of the order of the child records.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">GROUP</emphasis></entry>
+
+            <entry>Specifies grouping the <emphasis>childrecset</emphasis>
+            records based on the join condition so all the related child
+            records are passed as a dataset parameter to the transform.
+            </entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>DENORMALIZE returns a record set.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">DENORMALIZE </emphasis>function is used to
+  form a combined record out of a parent and any number of children. It acts
+  very similar to a JOIN except that where JOIN with one parent and three
+  children would call the <emphasis>transform</emphasis> three times and
+  produce three outputs, DENORMALIZE calls the <emphasis>transform</emphasis>
+  three times where the input to the first <emphasis>transform</emphasis> is
+  the parent and one child, the input to the second
+  <emphasis>transform</emphasis> is the output of the first
+  <emphasis>transform</emphasis> and another child, and the input to the third
+  <emphasis>transform</emphasis> is the output from the second
+  <emphasis>transform</emphasis> and the remaining child. Also like JOIN, the
+  order in which the <emphasis>childrecset</emphasis> records are sent to the
+  <emphasis>transform</emphasis> is undefined.</para>
+
+  <sect2 id="TRANSFORM_Function_Requirements_Denormalize">
+    <title>DENORMALIZE TRANSFORM Function Requirements</title>
+
+    <para>For form one, the <emphasis>transform</emphasis> function must take
+    at least two parameters: a LEFT<indexterm>
+        <primary>LEFT</primary>
+      </indexterm> record of the same format as the combined
+    <emphasis>parentrecset</emphasis> and <emphasis>childrecset</emphasis>
+    (the resulting de-normalized record structure), and a RIGHT<indexterm>
+        <primary>RIGHT</primary>
+      </indexterm> record of the same format as the
+    <emphasis>childrecset</emphasis>. An optional third parameter may be
+    specified: an integer COUNTER<indexterm>
+        <primary>COUNTER</primary>
+      </indexterm> specifying the number of times the
+    <emphasis>transform</emphasis> has been called for the current set of
+    parent/child pairs (defined by the <emphasis>condition</emphasis> values).
+    The result of the <emphasis>transform</emphasis> function must be a record
+    set of the same format as the LEFT record.</para>
+
+    <para>For form two, the <emphasis>transform</emphasis> function must take
+    at least two parameters: a LEFT record of the same format as the combined
+    <emphasis>parentrecset</emphasis> and <emphasis>childrecset</emphasis>
+    (the resulting de-normalized record structure), and ROWS(RIGHT) dataset of
+    the same format as the <emphasis>childrecset</emphasis>. The result of the
+    <emphasis>transform</emphasis> function must be a record set of the same
+    format as the LEFT record.</para>
+
+    <para>Example:</para>
+
+    <programlisting>//Form 1 example:
+NormRec := RECORD
+  STRING20  thename;
+  STRING20  addr;
+END;
+NamesRec := RECORD
+  UNSIGNED1  numRows;
+  STRING20  thename; 
+  STRING20  addr1 := '';
+  STRING20  addr2 := '';
+  STRING20  addr3 := '';
+  STRING20  addr4 := '';
+END;
+NamesTable := DATASET([ {0,'Kevin'},{0,'Liz'},{0,'Mr Nobody'},
+                        {0,'Anywhere'}], NamesRec);
+NormAddrs := DATASET([{'Kevin','10 Malt Lane'},
+                      {'Liz','10 Malt Lane'},
+                      {'Liz','3 The cottages'},
+                      {'Anywhee','Here'},
+                      {'Anywhere','There'},
+                      {'Anywhere','Near'},
+                      {'Anywhere','Far'}],NormRec);
+NamesRec DeNormThem(NamesRec L, NormRec R, INTEGER C) := TRANSFORM
+    SELF.NumRows := C;
+    SELF.addr1 := IF (C=1, R.addr, L.addr1);
+    SELF.addr2 := IF (C=2, R.addr, L.addr2);
+    SELF.addr3 := IF (C=3, R.addr, L.addr3);
+    SELF.addr4 := IF (C=4, R.addr, L.addr4);
+    SELF := L;
+END;
+DeNormedRecs := DENORMALIZE(NamesTable, NormAddrs,
+                            LEFT.thename = RIGHT.thename,
+                            DeNormThem(LEFT,RIGHT,COUNTER));
+OUTPUT(DeNormedRecs);
+
+//Form 2 example:
+NormRec := RECORD
+  STRING20  thename;
+  STRING20  addr;
+END;
+NamesRec := RECORD
+  UNSIGNED1  numRows;
+  STRING20  thename;
+  DATASET(NormRec) addresses;
+END;
+NamesTable := DATASET([ {0,'Kevin',[]},{0,'Liz',[]},
+                        {0,'Mr Nobody',[]},{0,'Anywhere',[]}],
+                      NamesRec);
+NormAddrs := DATASET([{'Kevin','10 Malt Lane'},
+                      {'Liz','10 Malt Lane'},
+                      {'Liz','3 The cottages'},
+                      {'Anywhere','Here'},
+                      {'Anywhere','There'},
+                      {'Anywhere','Near'},
+                      {'Anywhere','Far'}],NormRec);
+NamesRec DeNormThem(NamesRec L, DATASET(NormRec) R) := TRANSFORM
+    SELF.NumRows := COUNT(R);
+    SELF.addresses := R;
+    SELF := L;
+END;
+DeNormedRecs := DENORMALIZE(NamesTable, NormAddrs,
+                           LEFT.thename = RIGHT.thename,
+                           GROUP,
+                           DeNormThem(LEFT,ROWS(RIGHT)));
+OUTPUT(DeNormedRecs);
+
+// NOSORT example
+MyRec := RECORD
+  STRING1 Value1;
+  STRING1 Value2;
+END;
+ParentFile := DATASET([{'A','C'},{'B','B'},{'C','A'}],MyRec);
+ChildFile  := DATASET([{'A','Z'},{'A','T'},{'B','S'},{'B','Y'},
+                       {'C','X'},{'C','W'}],MyRec);
+MyOutRec := RECORD
+  ParentFile.Value1;
+  ParentFile.Value2;
+  STRING1 CVal2_1 := '';
+  STRING1 CVal2_2 := '';
+END;
+P_Recs := TABLE(ParentFile, MyOutRec);
+MyOutRec DeNormThem(MyOutRec L, MyRec R, INTEGER C) := TRANSFORM
+ SELF.CVal2_1 := IF(C = 1, R.Value2, L.CVal2_1);
+ SELF.CVal2_2 := IF(C = 2, R.Value2, L.CVal2_2);
+ SELF := L;
+END;
+DeNormedRecs := DENORMALIZE(P_Recs, ChildFile,
+                            LEFT.Value1 = RIGHT.Value1,
+                            DeNormThem(LEFT,RIGHT,COUNTER),NOSORT);
+OUTPUT(DeNormedRecs);
+/* DeNormedRecs result set is:
+ Rec#  Value1 PVal2  CVal2_1  CVal2_2
+ 1       A      C      Z         T
+ 2       B      B      Y         S
+ 3       C      A      X         W
+ */
+</programlisting>
+
+    <para>See Also: <link linkend="TRANSFORM_Structure">TRANSFORM
+    Structure</link>, <link
+    linkend="RECORD_Structure">RECORD Structure</link>, <link
+    linkend="NORMALIZE">NORMALIZE</link></para>
+  </sect2>
+</sect1>

+ 204 - 0
docs/ECLR_mods/BltInFunc-DISTRIBUTE.xml

@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DISTRIBUTE">
+  <title>DISTRIBUTE<indexterm>
+      <primary>DISTRIBUTE</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">DISTRIBUTE<indexterm>
+      <primary>DISTRIBUTE function</primary>
+    </indexterm>(</emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">)</emphasis><emphasis role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset,
+  expression </emphasis><emphasis role="bold">)</emphasis><emphasis
+  role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset, index
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, joincondition
+  </emphasis><emphasis role="bold">] )</emphasis><emphasis
+  role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset,
+  </emphasis><emphasis role="bold"> SKEW<indexterm>
+      <primary>SKEW</primary>
+    </indexterm>(</emphasis><emphasis> minskew </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, maxskew</emphasis><emphasis role="bold">
+  ] ) )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="82.20pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to distribute.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>An integer expression that specifies how to distribute the
+            recordset, usually using one the HASH functions for
+            efficiency.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>index</emphasis></entry>
+
+            <entry>The name of an INDEX attribute definition, which provides
+            the appropriate distribution.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>joincondition</emphasis></entry>
+
+            <entry>Optional. A logical expression that specifies how to link
+            the records in the recordset and the index. The keywords LEFT and
+            RIGHT may be used as dataset qualifiers for fields in the
+            recordset and index.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">SKEW</emphasis></entry>
+
+            <entry>Specifies the allowable data skew values.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>minskew</emphasis></entry>
+
+            <entry>A floating point number in the range of zero (0.0) to one
+            (1.0) specifying the minimum skew to allow (0.1=10%).</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>maxskew</emphasis></entry>
+
+            <entry>Optional. A floating point number in the range of zero
+            (0.0) to one (1.0) specifying the maximum skew to allow
+            (0.1=10%).</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>DISTRIBUTE returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">DISTRIBUTE</emphasis> function
+  re-distributes records from the <emphasis>recordset</emphasis> across all
+  the nodes of the cluster.</para>
+
+  <sect2 id="Random_DISTRIBUTE">
+    <title>“Random” DISTRIBUTE</title>
+
+    <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset
+    </emphasis><emphasis role="bold">)</emphasis></para>
+
+    <para>This form redistributes the <emphasis>recordset</emphasis>
+    “randomly” so there is no data skew across nodes, but without the
+    disadvantages the RANDOM() function could introduce. This is functionally
+    equivalent to distributing by a hash of the entire record.</para>
+  </sect2>
+
+  <sect2 id="Expression_DISTRIBUTE">
+    <title>Expression DISTRIBUTE</title>
+
+    <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset,
+    expression </emphasis><emphasis role="bold">)</emphasis></para>
+
+    <para>This form redistributes the <emphasis>recordset</emphasis> based on
+    the specified <emphasis>expression, </emphasis>typically one of the HASH
+    functions. Only the bottom 32-bits of the <emphasis>expression</emphasis>
+    value are used, so either HASH or HASH32 are the optimal choices. Records
+    for which the <emphasis>expression</emphasis> evaluates the same will end
+    up on the same node. DISTRIBUTE implicitly performs a modulus operation if
+    an <emphasis>expression</emphasis> value is not in the range of the number
+    of nodes available.</para>
+  </sect2>
+
+  <sect2 id="Index-based_DISTRIBUTE">
+    <title>Index-based DISTRIBUTE</title>
+
+    <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset,
+    index </emphasis><emphasis role="bold">[</emphasis><emphasis>,
+    joincondition </emphasis><emphasis role="bold">] )</emphasis></para>
+
+    <para>This form redistributes the <emphasis>recordset</emphasis> based on
+    the existing distribution of the specified <emphasis>index</emphasis>,
+    where the linkage between the two is determined by the
+    <emphasis>joincondition</emphasis>. Records for which the
+    <emphasis>joncondition</emphasis> is true will end up on the same
+    node.</para>
+  </sect2>
+
+  <sect2 id="Skew-based_DISTRIBUTE">
+    <title>Skew-based DISTRIBUTE</title>
+
+    <para><emphasis role="bold">DISTRIBUTE(</emphasis><emphasis>recordset,
+    </emphasis><emphasis role="bold">SKEW(</emphasis><emphasis> minskew
+    </emphasis><emphasis role="bold">[</emphasis><emphasis>,
+    maxskew</emphasis><emphasis role="bold"> ] ) )</emphasis></para>
+
+    <para>This form redistributes the <emphasis>recordset,</emphasis> but only
+    if necessary. The purpose of this form is to replace the use of
+    DISTRIBUTE(<emphasis>recordset</emphasis>,RANDOM()) to simply obtain a
+    relatively even distribution of data across the nodes. This form will
+    always try to minimize the amount of data redistributed between the
+    nodes.</para>
+
+    <para>The skew of a dataset is calculated as:</para>
+
+    <para>MAX(ABS(AvgPartSize-PartSize[node])/AvgPartSize)</para>
+
+    <para>If the <emphasis>recordset</emphasis> is skewed less than
+    <emphasis>minskew </emphasis>then the DISTRIBUTE is a no-op. If
+    <emphasis>maxskew</emphasis> is specified and the skew on any node exceeds
+    this, the job fails with an error message (specifying the first node
+    number exceeding skew), otherwise the data is redistributed to ensure that
+    the data is distributed with less skew than
+    <emphasis>minskew</emphasis>.</para>
+
+    <para>Example:</para>
+
+    <programlisting>MySet1 := DISTRIBUTE(Person); //”random” distribution - no skew
+MySet2 := DISTRIBUTE(Person,HASH32(Person.per_ssn));
+ //all people with the same SSN end up on the same node
+ //INDEX example:
+mainRecord := RECORD
+  INTEGER8 sequence;
+  STRING20 forename; 
+  STRING20 surname;
+  UNSIGNED8 filepos{virtual(fileposition)};
+END;
+mainTable := DATASET('~keyed.d00',mainRecord,THOR);
+nameKey := INDEX(mainTable, {surname,forename,filepos}, 'name.idx');
+incTable := DATASET('~inc.d00',mainRecord,THOR);
+x := DISTRIBUTE(incTable, nameKey,
+                LEFT.surname = RIGHT.surname AND
+                LEFT.forename = RIGHT.forename);
+OUTPUT(x);
+
+//SKEW example:
+Jds := JOIN(somedata,otherdata,LEFT.sysid=RIGHT.sysid);
+Jds_dist1 := DISTRIBUTE(Jds,SKEW(0.1));
+ //ensures skew is less than 10%
+Jds_dist2 := DISTRIBUTE(Jds,SKEW(0.1,0.5));
+ //ensures skew is less than 10%
+ //and fails if skew exceeds 50% on any node
+</programlisting>
+
+    <para>See Also: <link linkend="HASH32">HASH32</link>, <link
+    linkend="DISTRIBUTED">DISTRIBUTED</link>, <link
+    linkend="INDEX_record_structure">INDEX</link></para>
+  </sect2>
+</sect1>

+ 61 - 0
docs/ECLR_mods/BltInFunc-DISTRIBUTED.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DISTRIBUTED">
+  <title>DISTRIBUTED<indexterm>
+      <primary>DISTRIBUTED</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">DISTRIBUTED<indexterm>
+      <primary>DISTRIBUTED function</primary>
+    </indexterm>(</emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, expression </emphasis><emphasis
+  role="bold">] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.75pt" />
+
+        <colspec colwidth="309.05pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of distributed records.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>Optional. An expression that specifies how the recordset is
+            distributed.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>DISTRIBUTED returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">DISTRIBUTED</emphasis> function is a
+  compiler directive indicating that the records from the
+  <emphasis>recordset</emphasis> are already distributed across the nodes of
+  the Data Refinery based on the specified <emphasis>expression</emphasis>.
+  Records for which the <emphasis>expression</emphasis> evaluates the same are
+  on the same node.</para>
+
+  <para>If the <emphasis>expression</emphasis> is omitted, the function just
+  suppresses a warning that is sometimes generated that the
+  <emphasis>recordset</emphasis> hasn't been distributed</para>
+
+  <para>Example:</para>
+
+  <programlisting>MySet := DISTRIBUTED(Person,HASH32(Person.per_ssn));
+        //all people with the same SSN are already on the same node</programlisting>
+
+  <para>See Also: <link linkend="HASH32">HASH32</link>, <link linkend="DISTRIBUTE">DISTRIBUTE</link></para>
+</sect1>

+ 113 - 0
docs/ECLR_mods/BltInFunc-DISTRIBUTION.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="DISTRIBUTION">
+  <title>DISTRIBUTION<indexterm>
+      <primary>DISTRIBUTION</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">DISTRIBUTION<indexterm>
+      <primary>DISTRIBUTION function</primary>
+    </indexterm>(</emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, fields</emphasis><emphasis role="bold">
+  ] [</emphasis><emphasis>,</emphasis><emphasis role="bold"> NAMED<indexterm>
+      <primary>NAMED</primary>
+    </indexterm>( </emphasis><emphasis>name</emphasis><emphasis role="bold"> )
+  ] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="81.95pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records on which to run statistics.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>fields</emphasis></entry>
+
+            <entry>Optional. A comma-delimited list of fields in the recordset
+            to which to limit the action. If omitted, all fields are
+            included.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">NAMED</emphasis></entry>
+
+            <entry>Optional. Specifies the result name that appears in the
+            workunit.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>name</emphasis></entry>
+
+            <entry>A string constant containing the result label.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">DISTRIBUTION</emphasis> action produces a
+  crosstab report in XML format indicating how many unique records there are
+  in the <emphasis>recordset</emphasis> for each value in each field in the
+  <emphasis>recordset</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>SomeFile := DATASET([{'C','G'},{'C','C'},{'A','X'},{'B','G'}],
+     {STRING1 Value1,STRING1 Value2});
+DISTRIBUTION(SomeFile);
+/* The result comes back looking like this:
+&lt;XML&gt;
+&lt;Field name="Value1" distinct="3"&gt;
+ &lt;Value count="1"&gt;A&lt;/Value&gt;
+ &lt;Value count="1"&gt;B&lt;/Value&gt;
+ &lt;Value count="2"&gt;C&lt;/Value&gt;
+&lt;/Field&gt;
+&lt;Field name="Value2" distinct="3"&gt;
+ &lt;Value count="1"&gt;C&lt;/Value&gt;
+ &lt;Value count="2"&gt;G&lt;/Value&gt;
+ &lt;Value count="1"&gt;X&lt;/Value&gt;
+&lt;/Field&gt;
+&lt;/XML&gt;
+*/
+
+//******************************************
+namesRecord := RECORD
+  STRING20 surname;
+  STRING10 forename;
+  INTEGER2 age;
+END;
+
+namesTable := DATASET([
+  {'Halligan','Kevin',31},
+  {'Halligan','Liz',30},
+  {'Salter','Abi',10},
+  {'X','Z'}], namesRecord);
+
+DISTRIBUTION(namesTable, surname, forename, NAMED('Stats'));
+x := DATASET(ROW(TRANSFORM({STRING line},
+       SELF.line := WORKUNIT('Stats', STRING))));
+
+/* The result comes back looking like this:
+&lt;XML&gt;
+&lt;Field name="surname" distinct="3"&gt;
+ &lt;Value count="2"&gt;Halligan&lt;/Value&gt;
+ &lt;Value count="1"&gt;X&lt;/Value&gt;
+ &lt;Value count="1"&gt;Salter&lt;/Value&gt;
+&lt;/Field&gt;
+&lt;Field name="forename" distinct="4"&gt;
+ &lt;Value count="1"&gt;Abi&lt;/Value&gt;
+ &lt;Value count="1"&gt;Kevin&lt;/Value&gt;
+ &lt;Value count="1"&gt;Liz&lt;/Value&gt;
+ &lt;Value count="1"&gt;Z&lt;/Value&gt;
+&lt;/Field&gt;
+&lt;/XML&gt;
+*/
+</programlisting>
+</sect1>

+ 49 - 0
docs/ECLR_mods/BltInFunc-EBCDIC.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EBCDIC">
+  <title>EBCDIC<indexterm>
+      <primary>EBCDIC</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">EBCDIC<indexterm>
+      <primary>EBCDIC function</primary>
+    </indexterm>(</emphasis><emphasis>recordset</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.25pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>EBCDIC returns a set of records</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>..</para>
+
+  <para>The <emphasis role="bold">EBCDIC </emphasis>function returns the
+  <emphasis>recordset </emphasis>with all STRING fields translated from ASCII
+  to EBCDIC.</para>
+
+  <para>Example:</para>
+
+  <programlisting>EBCDICRecs := EBCDIC(SomeASCIIInput);</programlisting>
+
+  <para>See Also: <link linkend="ASCII">ASCII</link></para>
+</sect1>

+ 100 - 0
docs/ECLR_mods/BltInFunc-ENTH.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ENTH">
+  <title>ENTH<indexterm>
+      <primary>ENTH function</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">ENTH<indexterm>
+      <primary>ENTH</primary>
+    </indexterm>(</emphasis><emphasis>recordset, numerator
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, denominator
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, which
+  </emphasis><emphasis role="bold">] ] [</emphasis>,<emphasis role="bold">
+  LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm>] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="81.95pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to sample. This may be the name of a
+            dataset or a record set derived from some filter condition, or any
+            expression that results in a derived record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>numerator</emphasis></entry>
+
+            <entry>The number of records to return. The chosen records are
+            evenly spaced from throughout the recordset.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>denominator</emphasis></entry>
+
+            <entry>Optional. The size of each set from which to return
+            numerator number of records. If omitted, the denominator value is
+            the total number of records in the recordset.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>which</emphasis></entry>
+
+            <entry>Optional. An integer specifying the ordinal number of the
+            sample set to return. This is used to obtain multiple
+            non-overlapping samples from the same recordset. If the numerator
+            is not 1, then some records may overlap.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>Optional. Specifies that the sample is extracted on each
+            supercomputer node without regard to the number of records on
+            other nodes, significantly improving performance if exact results
+            are not required.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ENTH returns a set of records.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ENTH </emphasis>function returns a sample
+  set of records from the nominated <emphasis>recordset</emphasis>. ENTH
+  returns <emphasis>numerator</emphasis> number of records out of each
+  <emphasis>denominator</emphasis> set of records in the
+  <emphasis>recordset</emphasis>. Unless LOCAL is specified, records are
+  picked at exact intervals across all nodes of the supercomputer.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MySample1 := ENTH(Person,1,10,1); // 10% (1 out of every 10)
+MySample2 := ENTH(Person,15,100,1); // 15% (15 out of every 100)
+MySample3 := ENTH(Person,3,4,1); // 75% (3 out of every 4)
+
+SomeFile := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'},
+                     {'F'},{'G'},{'H'},{'I'},{'J'},
+                     {'K'},{'L'},{'M'},{'N'},{'O'},
+                     {'P'},{'Q'},{'R'},{'S'},{'T'},
+                     {'U'},{'V'},{'W'},{'X'},{'Y'}],
+     {STRING1 Letter});
+Set1 := ENTH(SomeFile,2,10,1); // returns E, J, O, T, Y
+</programlisting>
+
+  <para>See Also: <link linkend="CHOOSEN">CHOOSEN</link>, <link
+  linkend="SAMPLE">SAMPLE</link></para>
+</sect1>

+ 73 - 0
docs/ECLR_mods/BltInFunc-ERROR.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ERROR">
+  <title>ERROR<indexterm>
+      <primary>ERROR</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">ERROR<indexterm>
+      <primary>ERROR function</primary>
+    </indexterm> [ ( </emphasis><emphasis>errormessage</emphasis> <emphasis
+  role="bold">| </emphasis><emphasis>errorcode </emphasis><emphasis
+  role="bold">) ] ;</emphasis><emphasis role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">ERROR ( </emphasis><emphasis>errorcode
+  </emphasis>, <emphasis>errormessage</emphasis><emphasis role="bold">
+  </emphasis><emphasis role="bold">) ;</emphasis></para>
+
+  <para><emphasis role="bold">ERROR( </emphasis><emphasis>datatype
+  </emphasis><emphasis role="bold">[</emphasis>,<emphasis role="bold"> [
+  </emphasis><emphasis>errorcode </emphasis><emphasis role="bold">]
+  [</emphasis>, <emphasis>errormessage </emphasis><emphasis role="bold">] ] )
+  ;</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="82.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>errormessage</emphasis></entry>
+
+            <entry>Optional. A string constant containing the message to
+            display.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>errorcode</emphasis></entry>
+
+            <entry>Optional. An integer constant containing the error number
+            to display.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>datatype</emphasis></entry>
+
+            <entry>The value type or name of a RECORD structure. This may use
+            the TYPEOF function.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ERROR </emphasis>function immediately halts
+  processing on the workunit and displays the <emphasis>errorcode</emphasis>
+  and/or <emphasis>errormessage</emphasis>. The third form is available for
+  use in contexts where a value type or dataset is required. This function
+  does the same thing as the FAIL action<indexterm>
+      <primary>FAIL action</primary>
+    </indexterm>, but may be used in an expression context, such as within a
+  TRANSFORM function.</para>
+
+  <para>Example:</para>
+
+  <programlisting>outrec Xform(inrec L, inrec R) := TRANSFORM
+  SELF.key := IF(L.key &lt;= R.key, R.key,ERROR('Recs not in order'));
+END;
+</programlisting>
+
+  <para>See Also: <link linkend="FAILURE">FAILURE</link>, <link linkend="FAIL">FAIL</link></para>
+</sect1>

+ 152 - 0
docs/ECLR_mods/BltInFunc-EVALUATE.xml

@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EVALUATE">
+  <title>EVALUATE</title>
+
+  <sect2 id="EVALUATE_action">
+    <title>EVALUATE<indexterm>
+        <primary>EVALUATE</primary>
+      </indexterm> action</title>
+
+    <para><emphasis>[</emphasis><emphasis>attrname</emphasis> :=<emphasis
+    role="bold"> ] EVALUATE<indexterm>
+        <primary>EVALUATE action</primary>
+      </indexterm>(</emphasis><emphasis>expression</emphasis><emphasis
+    role="bold">) ;</emphasis></para>
+
+    <para><informaltable colsep="0" frame="none" rowsep="0">
+        <tgroup cols="2">
+          <colspec colwidth="80.60pt" />
+
+          <colspec />
+
+          <tbody>
+            <row>
+              <entry><emphasis>attrname</emphasis></entry>
+
+              <entry>Optional. The action name, which turns the action into an
+              attribute definition, therefore not executed until the
+              <emphasis>attrname</emphasis> is used as an action.</entry>
+            </row>
+
+            <row>
+              <entry>expression</entry>
+
+              <entry>The function to call in an action context.</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable></para>
+
+    <para>The <emphasis role="bold">EVALUATE</emphasis> action names an
+    <emphasis>expression</emphasis> (typically a function call) to execute in
+    an action context. This is mainly useful for calling functions that have
+    side-effects, where you don't care about the return value.</para>
+
+    <para>Example:</para>
+
+    <programlisting>myService := SERVICE
+ UNSIGNED4 doSomething(STRING text);
+END;
+
+ds := DATASET('MyFile', {STRING20 text} , THOR);
+
+APPLY(ds, EVALUATE(doSomething(ds.text)));
+ //calls the doSomething function once for each record in the ds
+ // dataset, ignoring the returned values from the function
+</programlisting>
+
+    <para>See Also: APPLY, SERVICE</para>
+  </sect2>
+
+  <sect2 id="EVALUATE_function">
+    <title>EVALUATE function</title>
+
+    <para><emphasis role="bold">EVALUATE(</emphasis><indexterm>
+        <primary>EVALUATE function</primary>
+      </indexterm><emphasis>onerecord, value</emphasis><emphasis
+    role="bold">)</emphasis></para>
+
+    <para><informaltable colsep="0" frame="none" rowsep="0">
+        <tgroup cols="2">
+          <colspec colwidth="79.15pt" />
+
+          <colspec colwidth="309.65pt" />
+
+          <tbody>
+            <row>
+              <entry><emphasis>onerecord</emphasis></entry>
+
+              <entry>A record set consisting of a single record.</entry>
+            </row>
+
+            <row>
+              <entry><emphasis>value</emphasis></entry>
+
+              <entry>The value to return. This may be any expression yielding
+              a value.</entry>
+            </row>
+
+            <row>
+              <entry>Return:</entry>
+
+              <entry>EVALUATE returns a single value.</entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable></para>
+
+    <para>The <emphasis role="bold">EVALUATE</emphasis> function returns the
+    <emphasis>value</emphasis> evaluated in the context of the
+    <emphasis>onerecord</emphasis> set (which must be a single record, only).
+    This function typically uses indexing to select a single record for the
+    <emphasis>onerecord</emphasis> recordset. The usage is to return a value
+    from a specific child record when operating at the parent record's scope
+    level. The advantage that EVALUATE has over using recordset indexing into
+    a single field is that the <emphasis>value</emphasis> returned can be any
+    expression and not just a single field from the child dataset.</para>
+  </sect2>
+
+  <sect2 id="Accessing_Field-level_Data_in_a_Specific_Record">
+    <title>Accessing Field-level Data in a Specific Record</title>
+
+    <para>To access field level data in a specific record, the recordset
+    indexing capability must be used to select a single record. The SORT
+    function and recordset filters are useful in selecting and ordering the
+    recordset so that the appropriate record can be selected.</para>
+
+    <para>Example:</para>
+
+    <programlisting>WorstCard := SORT(Cards,Std.Scoring);
+MyValue   := EVALUATE(WorstCard[1],Std.Utilization);
+ // WorstCard[1] uses indexing to get the first record
+ // in the sort order, then evaluates that record
+ // returning the Std.Utilization value
+
+ValidBalTrades := trades(ValidMoney(trades.trd_bal));
+HighestBals := SORT(ValidBalTrades,-trades.trd_bal);
+Highest_HC := EVALUATE(HighestBals[1],trades.trd_hc);
+ //return trd_hc field of the trade with the highest balance
+ // could also be coded as (using indexing):
+ // Highest_HC := HighestBals[1].trades.trd_hc;
+
+OUTPUT(Person,{per_last_name,per_first_name,Highest_HC});
+ //output that Highest_HC for each person
+ //This output operates at the scope of the Person record
+ // EVALUATE is needed to get the value from a Trades record
+ // because Trades is a Child of Person
+
+IsValidInd := trades.trd_ind_code IN ['FM','RE'];
+IsMortgage := IsValidInd OR trades.trd_rate = 'G';
+SortedTrades := SORT(trades(ValidDate(trades.trd_dopn),isMortgage),
+      trades.trd_dopn_mos);
+CurrentRate := MAP(~EXISTS(SortedTrades) =&gt; ' ',
+                   EVALUATE(SortedTrades[1], trades.trd_rate));
+
+OUTPUT(person,{CurrentRate});
+</programlisting>
+
+    <para>See Also: <link linkend="SORT">SORT</link></para>
+  </sect2>
+</sect1>

+ 85 - 0
docs/ECLR_mods/BltInFunc-EVENT.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EVENT">
+  <title>EVENT<indexterm>
+      <primary>EVENT</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">EVENT<indexterm>
+      <primary>EVENT function</primary>
+    </indexterm>(</emphasis><emphasis> event , subtype </emphasis><emphasis
+  role="bold"> )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.30pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>event</emphasis></entry>
+
+            <entry>A case-insensitive string constant naming the event to
+            trap.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>subtype</emphasis></entry>
+
+            <entry>A case-insensitive string constant naming the specific type
+            of event to trap. This may contain * and ? to wildcard-match the
+            event's sub-type.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>EVENT returns a single event.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">EVENT</emphasis> function returns a trigger
+  event, which may be used within the WHEN workflow service<indexterm>
+      <primary>WHEN workflow service</primary>
+    </indexterm> or the WAIT and NOTIFY actions.</para>
+
+  <para>Example:</para>
+
+  <programlisting>EventName := 'MyFileEvent';
+FileName  := 'test::myfile';
+
+IF (FileServices.FileExists(FileName),
+ FileServices.DeleteLogicalFile(FileName));
+ //deletes the file if it already exists
+
+FileServices.MonitorLogicalFileName(EventName,FileName);
+ //sets up monitoring and the event name
+ //to fire when the file is found
+
+OUTPUT('File Created') : WHEN(EVENT(EventName,'*'),COUNT(1));
+ //this OUTPUT occurs only after the event has fired
+
+afile := DATASET([{ 'A', '0'}], {STRING10 key,STRING10 val});
+OUTPUT(afile,,FileName);
+ //this creates a file that the DFU file monitor will find
+ //when it periodically polls
+
+//**********************************
+EXPORT events := MODULE
+  EXPORT dailyAtMidnight := CRON('0 0 * * *');
+  EXPORT dailyAt( INTEGER hour,
+   INTEGER minute=0) :=
+  EVENT('CRON',
+   (STRING)minute + ' ' + (STRING)hour + ' * * *');
+  EXPORT dailyAtMidday := dailyAt(12, 0);
+END;
+BUILD(teenagers): WHEN(events.dailyAtMidnight);
+BUILD(oldies)  : WHEN(events.dailyAt(6));
+</programlisting>
+
+  <para>See Also: <link linkend="EVENTNAME">EVENTNAME</link>, <link linkend="EVENTEXTRA">EVENTEXTRA</link>, <link linkend="CRON">CRON</link>, <link linkend="WHEN">WHEN</link>, <link linkend="WAIT">WAIT</link>, <link linkend="NOTIFY">NOTIFY</link></para>
+</sect1>

+ 53 - 0
docs/ECLR_mods/BltInFunc-EVENTEXTRA.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EVENTEXTRA">
+  <title>EVENTEXTRA</title>
+
+  <para><emphasis role="bold">EVENTEXTRA<indexterm>
+      <primary>EVENTEXTRA</primary>
+    </indexterm>( </emphasis><emphasis>tag</emphasis><emphasis role="bold">
+  )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.45pt" />
+
+        <colspec colwidth="310.35pt" />
+
+        <tbody>
+          <row>
+            <entry>Return:</entry>
+
+            <entry>EVENTNAME returns a single string value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">EVENTEXTRA</emphasis> function<indexterm>
+      <primary>EVENTEXTRA function</primary>
+    </indexterm> returns the contents of the <emphasis>tag</emphasis> from the
+  XML text in the EVENT function's second parameter.</para>
+
+  <para>Example:</para>
+
+  <programlisting>doMyService := FUNCTION
+  OUTPUT('Did a Service for: ' + 'EVENTNAME=' + EVENTNAME);
+  NOTIFY(EVENT('MyServiceComplete',
+               '&lt;Event&gt;&lt;returnTo&gt;FRED&lt;/returnTo&gt;&lt;/Event&gt;'),
+    EVENTEXTRA('returnTo'));
+  RETURN EVENTEXTRA('returnTo');
+END;
+
+doMyService : WHEN('MyService');
+
+// and a call
+NOTIFY('MyService',
+       '&lt;Event&gt;&lt;returnTo&gt;'+WORKUNIT+'&lt;/returnTo&gt;&lt;/Event&gt;');
+WAIT('MyServiceComplete');
+OUTPUT('WORKUNIT DONE')
+</programlisting>
+
+  <para>See Also: <link linkend="EVENT">EVENT</link>, <link linkend="EVENTNAME">EVENTNAME</link>, <link linkend="CRON">CRON</link>, <link linkend="WHEN">WHEN</link>, <link linkend="WAIT">WAIT</link>, <link linkend="NOTIFY">NOTIFY</link></para>
+</sect1>

+ 50 - 0
docs/ECLR_mods/BltInFunc-EVENTNAME.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EVENTNAME">
+  <title>EVENTNAME<indexterm>
+      <primary>EVENTNAME</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">EVENTNAME</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="78.45pt" />
+
+        <colspec colwidth="310.35pt" />
+
+        <tbody>
+          <row>
+            <entry>Return:</entry>
+
+            <entry>EVENTNAME returns a single string value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para><emphasis role="bold">EVENTNAME</emphasis> returns the name of the
+  trigger event.</para>
+
+  <para>Example:</para>
+
+  <programlisting>doMyService := FUNCTION
+  OUTPUT('Did a Service for: ' + 'EVENTNAME=' + EVENTNAME);
+  NOTIFY(EVENT('MyServiceComplete',
+               '&lt;Event&gt;&lt;returnTo&gt;FRED&lt;/returnTo&gt;&lt;/Event&gt;'),
+    EVENTEXTRA('returnTo'));
+  RETURN EVENTEXTRA('returnTo');
+END;
+
+doMyService : WHEN('MyService');
+
+// and a call
+NOTIFY('MyService',
+       '&lt;Event&gt;&lt;returnTo&gt;'+WORKUNIT+'&lt;/returnTo&gt;&lt;/Event&gt;');
+WAIT('MyServiceComplete');
+OUTPUT('WORKUNIT DONE')
+</programlisting>
+
+  <para>See Also: <link linkend="EVENT">EVENT</link>, <link linkend="EVENTEXTRA">EVENTEXTRA</link>, <link linkend="CRON">CRON</link>, <link linkend="WHEN">WHEN</link>, <link linkend="WAIT">WAIT</link>, <link linkend="NOTIFY">NOTIFY</link></para>
+</sect1>

+ 87 - 0
docs/ECLR_mods/BltInFunc-EXISTS.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EXISTS">
+  <title>EXISTS<indexterm>
+      <primary>EXISTS</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">EXISTS<indexterm>
+      <primary>EXISTS function</primary>
+    </indexterm>(</emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">[, KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm> ])</emphasis></para>
+
+  <para><emphasis
+  role="bold">EXISTS(</emphasis><emphasis>valuelist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.70pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to process. This may be the name of an
+            index, a dataset, or a record set derived from some filter
+            condition, or any expression that results in a derived record
+            set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">KEYED</emphasis></entry>
+
+            <entry>Optional. Specifies the activity is part of an index read
+            operation, which allows the optimizer to generate optimal code for
+            the operation.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>valuelist</emphasis></entry>
+
+            <entry>A comma-delimited list of expressions. This may also be a
+            SET of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>EXISTS returns a single BOOLEAN value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">EXISTS</emphasis> function returns true if
+  the number of records in the specified <emphasis>recordset</emphasis> is
+  &gt; 0, or the <emphasis>valuelist</emphasis> is populated. This is most
+  commonly used to detect whether a filter has filtered out all the
+  records.</para>
+
+  <para>When checking for an empty recordset, use the
+  EXISTS(<emphasis>recordset</emphasis>) function instead of the expression:
+  COUNT(<emphasis>recordset</emphasis>) &gt; 0. Using EXISTS results in more
+  efficient processing and better performance under those
+  circumstances.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyBoolean := EXISTS(Publics(pub_type = 'B'));
+TradesExistPersons := Person(EXISTS(Trades));
+NoTradesPerson := Person(NOT EXISTS(Trades));
+
+MinVal2 := EXISTS(4,8,16,2,1); //returns TRUE
+SetVals := [4,8,16,2,1];
+MinVal3 := EXISTS(SetVals);  //returns TRUE
+NullSet := [];
+MinVal3 := EXISTS(NullSet);  //returns FALSE
+</programlisting>
+
+  <para>See Also: <link linkend="DEDUP">DEDUP</link>, <link
+  linkend="Recordset_Filtering">Record Filters</link></para>
+</sect1>

+ 48 - 0
docs/ECLR_mods/BltInFunc-EXP.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="EXP">
+  <title>EXP<indexterm>
+      <primary>EXP</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">EXP<indexterm>
+      <primary>EXP function</primary>
+    </indexterm>(</emphasis><emphasis>n</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.50pt" />
+
+        <colspec colwidth="309.30pt" />
+
+        <tbody>
+          <row>
+            <entry>n</entry>
+
+            <entry>The real number to evaluate.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>EXP returns a single real value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">EXP </emphasis>function returns the natural
+  exponential value of the parameter (en). This is the opposite of the LN
+  function<indexterm>
+      <primary>LN function</primary>
+    </indexterm>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyPI := EXP(3.14159);
+Interim := ROUND(1000 * (EXP(MyPI)/(1 + EXP(MyPI))));</programlisting>
+
+  <para>See Also: <link linkend="LN">LN</link>, <link linkend="SQRT">SQRT</link>, <link linkend="POWER">POWER</link></para>
+</sect1>

+ 93 - 0
docs/ECLR_mods/BltInFunc-FAIL.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="FAIL">
+  <title>FAIL<indexterm>
+      <primary>FAIL</primary>
+    </indexterm></title>
+
+  <para><emphasis>[</emphasis><emphasis>attrname</emphasis> :=<emphasis
+  role="bold"> ] FAIL<indexterm>
+      <primary>FAIL function</primary>
+    </indexterm> [ (</emphasis><emphasis> errormessage </emphasis><emphasis
+  role="bold">|</emphasis><emphasis> errorcode </emphasis><emphasis
+  role="bold">) ] ;</emphasis></para>
+
+  <para><emphasis role="bold"></emphasis><emphasis
+  role="bold">[</emphasis><emphasis>attrname</emphasis> :=<emphasis
+  role="bold"> ] FAIL(</emphasis><emphasis> errorcode , errormessage
+  </emphasis><emphasis role="bold">) ;</emphasis></para>
+
+  <para><emphasis role="bold"></emphasis><emphasis
+  role="bold">[</emphasis><emphasis>attrname</emphasis> :=<emphasis
+  role="bold"> ] FAIL(</emphasis><emphasis> datatype </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, </emphasis><emphasis
+  role="bold">[</emphasis><emphasis> errorcode </emphasis><emphasis
+  role="bold">]</emphasis><emphasis> </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, errormessage </emphasis><emphasis
+  role="bold">] ] ) </emphasis>;</para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="82.40pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>attrname</emphasis></entry>
+
+            <entry>Optional. The action name, which turns the action into an
+            attribute definition, therefore not executed until the
+            <emphasis>attrname</emphasis> is used as an action.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>errormessage</emphasis></entry>
+
+            <entry>Optional. A string constant containing the message to
+            display.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>errorcode</emphasis></entry>
+
+            <entry>Optional. An integer constant containing the error number
+            to display.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>datatype</emphasis></entry>
+
+            <entry>The value type or name of a RECORD structure to
+            emulate.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">FAIL </emphasis>action immediately halts
+  processing on the workunit and displays the <emphasis>errorcode
+  </emphasis>and/or <emphasis>errormessage</emphasis>. The third form is
+  available for use in contexts where a value type or dataset is required.
+  FAIL may not be used in an expression context (such as within a
+  TRANSFORM)—use the ERROR function<indexterm>
+      <primary>ERROR function</primary>
+    </indexterm> for those situations.</para>
+
+  <para>Example:</para>
+
+  <programlisting>IF(header.version &lt;&gt; doxie.header_version_new,
+   FAIL('Mismatch -- header.version vs. doxie.header_version_new.'));
+
+FailedJob := FAIL('ouch, it broke');
+sPeople   := SORT(Person,Person.per_first_name);
+nUniques  := COUNT(DEDUP(sPeople,Person.per_first_name AND
+                   Person.address))
+          : FAILURE(FailedJob);
+MyRecSet  := IF(EXISTS(Person),Person,
+             FAIL(Person,99,’Person does not exist!!’));
+</programlisting>
+
+  <para>See Also: <link linkend="FAILURE">FAILURE</link>, <link linkend="ERROR">ERROR</link></para>
+</sect1>

+ 29 - 0
docs/ECLR_mods/BltInFunc-FAILCODE.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="FAILCODE">
+  <title>FAILCODE<indexterm>
+      <primary>FAILCODE function</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">FAILCODE<indexterm>
+      <primary>FAILCODE</primary>
+    </indexterm></emphasis></para>
+
+  <para>The <emphasis role="bold">FAILCODE </emphasis>function returns the
+  last failure code, for use in the FAILURE workflow service<indexterm>
+      <primary>FAILURE workflow service</primary>
+    </indexterm> or in the TRANSFORM structure<indexterm>
+      <primary>TRANSFORM structure</primary>
+    </indexterm> referenced in the ONFAIL option of SOAPCALL.</para>
+
+  <para>Example:</para>
+
+  <programlisting>SPeople := SORT(Person,Person.per_first_name);
+nUniques := COUNT(DEDUP(sPeople,Person.per_first_name AND
+                 Person.address))
+:FAILURE(Email.simpleSend(SystemsPersonnel,
+SystemsPersonel.email,FAILCODE));</programlisting>
+
+  <para>See Also: <link linkend="FAILURE">FAILURE</link>, <link linkend="FAILMESSAGE">FAILMESSAGE</link>, <link linkend="SOAPCALL">SOAPCALL</link></para>
+</sect1>

+ 46 - 0
docs/ECLR_mods/BltInFunc-FAILMESSAGE.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="FAILMESSAGE">
+  <title>FAILMESSAGE<indexterm>
+      <primary>FAILMESSAGE</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">FAILMESSAGE<indexterm>
+      <primary>FAILMESSAGE function</primary>
+    </indexterm> [( </emphasis><emphasis>tag</emphasis><emphasis role="bold">
+  )]</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="74.15pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>tag</emphasis></entry>
+
+            <entry>A string constant defining the name of XML tag containing
+            the text to return, typically extra information returned by
+            SOAPCALL. If omitted, the default is ‘text.’</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">FAILMESSAGE </emphasis>function returns the
+  last failure message for use in the FAILURE workflow service or the
+  TRANSFORM structure<indexterm>
+      <primary>TRANSFORM structure</primary>
+    </indexterm> referenced in the ONFAIL option of SOAPCALL.</para>
+
+  <para>Example:</para>
+
+  <programlisting>SPeople := SORT(Person,Person.per_first_name);
+nUniques := COUNT(DEDUP(sPeople,Person.per_first_name ANDPerson.address))
+:FAILURE(Email.simpleSend(SystemsPersonnel,
+        SystemsPersonel.email,FAILMESSAGE));</programlisting>
+
+  <para>See Also: <link linkend="RECOVERY">RECOVERY</link>, <link linkend="FAILCODE">FAILCODE</link>, <link linkend="SOAPCALL">SOAPCALL</link></para>
+</sect1>

+ 148 - 0
docs/ECLR_mods/BltInFunc-FETCH.xml

@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="FETCH">
+  <title>FETCH</title>
+
+  <para><emphasis role="bold">FETCH<indexterm>
+      <primary>FETCH</primary>
+    </indexterm><indexterm>
+      <primary>FETCH function</primary>
+    </indexterm>(</emphasis><emphasis>basedataset, index, position
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, transform
+  </emphasis><emphasis role="bold">]</emphasis><emphasis> </emphasis><emphasis
+  role="bold">[, LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm>] )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.80pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>basedataset</emphasis></entry>
+
+            <entry>The base DATASET attribute to process. Filtering is not
+            allowed.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>index</emphasis></entry>
+
+            <entry>The INDEX attribute that provides keyed access into the
+            <emphasis>basedataset</emphasis>. This will typically have a
+            filter expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>position</emphasis></entry>
+
+            <entry>An expression that provides the means of locating the
+            correct record in the <emphasis>basedataset</emphasis> (usually
+            the field within the index containing the fileposition
+            value).</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>transform</emphasis></entry>
+
+            <entry>The TRANSFORM function to call for each record fetched from
+            the <emphasis>basedataset</emphasis>. If omitted, FETCH returns a
+            set containing all fields from both the
+            <emphasis>basedataset</emphasis> and index, with the second of any
+            duplicate named fields removed.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>Optional. Specifies the operation is performed on each
+            supercomputer node independently, without requiring interaction
+            with all other nodes to acquire data; the operation maintains the
+            distribution of any previous DISTRIBUTE.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>FETCH returns a record set.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">FETCH </emphasis>function processes through
+  all records in the <emphasis>index </emphasis>in the order specified by the
+  <emphasis>index, </emphasis>fetching each related record from the
+  <emphasis>basedataset</emphasis> and performing the
+  <emphasis>transform</emphasis> function.</para>
+
+  <para>The <emphasis>index</emphasis> will typically have a filter expression
+  to specify the exact set of records to return from the
+  <emphasis>basedataset</emphasis>. If the filter expression defines a single
+  record in the <emphasis>basedataset</emphasis>, FETCH will return just that
+  one record. See KEYED/WILD for a discussion of INDEX filtering.</para>
+
+  <sect2 id="TRANSFORM_Function_Requirements_Fetch">
+    <title>FETCH TRANSFORM Function Requirements</title>
+
+    <para>The <emphasis>transform</emphasis> function<indexterm>
+        <primary>transform function</primary>
+      </indexterm> must take up to two parameters: a LEFT record that must be
+    of the same format as the <emphasis>basedataset</emphasis>, and an
+    optional RIGHT record that that must be of the same format as the
+    <emphasis>index</emphasis>. The optional second parameter is useful in
+    those instances where the index contains information not present in the
+    recordset.</para>
+
+    <para>Example:</para>
+
+    <programlisting>PtblRec := RECORD
+  STRING2  State := Person.per_st;
+  STRING20 City  := Person.per_full_city;
+  STRING25 Lname := Person.per_last_name;
+  STRING15 Fname := Person.per_first_name;
+END;
+
+PtblOut := OUTPUT(TABLE( Person,PtblRec),,'RTTEMP::TestFetch');
+Ptbl := DATASET('RTTEMP::TestFetch',
+      {PtblRec,UNSIGNED8 __fpos {virtual(fileposition)}},
+      FLAT);
+
+Bld := BUILD(Ptbl,
+   {state,city,lname,fname,__fpos},
+   'RTTEMPkey::TestFetch');
+
+AlphaInStateCity := INDEX(Ptbl,
+      {state,city,lname,fname,__fpos},
+      'RTTEMPkey::TestFetch');
+
+TYPEOF(Ptbl) copy(Ptbl l) := TRANSFORM
+ SELF := l;
+END;
+
+AlphaPeople := FETCH(Ptbl,
+      AlphaInStateCity(state='FL',
+        city ='BOCA RATON',
+        Lname='WIK',
+        Fname='PICHA'),
+      RIGHT.__fpos,
+      copy(LEFT));
+
+OutFile := OUTPUT(CHOOSEN(AlphaPeople,10));
+SEQUENTIAL(PtblOut,Bld,OutFile)
+
+//NOTE the use of a filter on the index file. This is an important
+// use of standard filtering technique in conjunction with indexing
+// to achieve optimal “random” access into the base record set
+</programlisting>
+
+    <para>See Also: <link linkend="TRANSFORM_Structure">TRANSFORM
+    Structure</link>, <link linkend="RECORD_Structure">RECORD
+    Structure</link>, <link linkend="BUILD">BUILDINDEX</link>, <link
+    linkend="INDEX_record_structure">INDEX</link>, KEYED/WILD</para>
+  </sect2>
+</sect1>

+ 52 - 0
docs/ECLR_mods/BltInFunc-FROMUNICODE.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="FROMUNICODE">
+  <title>FROMUNICODE</title>
+
+  <para><emphasis role="bold">FROMUNICODE<indexterm>
+      <primary>FROMUNICODE</primary>
+    </indexterm><indexterm>
+      <primary>FROMUNICODE function</primary>
+    </indexterm>(</emphasis><emphasis> string, encoding </emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="77.95pt" />
+
+        <colspec colwidth="310.85pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>string</emphasis></entry>
+
+            <entry>The UNICODE string to translate.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>encoding</emphasis></entry>
+
+            <entry>The encoding codepage (supported by IBM’s ICU) to use for
+            the translation.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>FROMUNICODE returns a single DATA value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">FROMUNICODE </emphasis>function returns the
+  <emphasis>string </emphasis>translated from the specified <emphasis>encoding
+  </emphasis>to a DATA value.</para>
+
+  <para>Example:</para>
+
+  <programlisting>DATA5 x := FROMUNICODE(u'ABCDE','UTF-8'); //results in 4142434445</programlisting>
+
+  <para>See Also: <link linkend="TOUNICODE">TOUNICODE</link>, <link linkend="UNICODEORDER">UNICODEORDER</link></para>
+</sect1>

+ 60 - 0
docs/ECLR_mods/BltInFunc-FROMXML.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="FROMXML">
+  <title>FROMXML</title>
+
+  <para><emphasis role="bold">FROMXML<indexterm>
+      <primary>FROMXML</primary>
+    </indexterm><indexterm>
+      <primary>FROMXML function</primary>
+    </indexterm>(</emphasis><emphasis> record, xmlstring </emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="77.95pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>record</emphasis></entry>
+
+            <entry>The RECORD structure to produce. Each field must specify
+            the XPATH to the data in the <emphasis>xmlstring</emphasis> that
+            it should hold.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>xmlstring</emphasis></entry>
+
+            <entry>A string containing the XML to convert.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>FROMXML returns a single row (record).</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">FROMXML </emphasis>function returns a single
+  row (record) in the <emphasis>record</emphasis> format from the specified
+  <emphasis>xmlstring</emphasis>. This may be used anywhere a single row can
+  be used (similar to the ROW function).</para>
+
+  <para>Example:</para>
+
+  <programlisting>namesRec := RECORD
+  UNSIGNED2 EmployeeID{xpath('EmpID')};
+  STRING10  Firstname{xpath('Name/FName')};
+  STRING10  Lastname{xpath('Name/LName')};
+END;
+x := '&lt;Row&gt;&lt;Name&gt;&lt;FName&gt;George&lt;/FName&gt;&lt;LName&gt;Jetson&lt;/LName&gt;&lt;/Name&gt;&lt;EmpID&gt;42&lt;/EmpID&gt;&lt;/Row&gt;'; 
+
+rec := FROMXML(namesRec,x);
+OUTPUT(rec);</programlisting>
+
+  <para>See Also: <link linkend="ROW">ROW</link></para>
+</sect1>

+ 57 - 0
docs/ECLR_mods/BltInFunc-GETENV.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="GETENV">
+  <title>GETENV</title>
+
+  <para><emphasis role="bold">GETENV<indexterm>
+      <primary>GETENV</primary>
+    </indexterm><indexterm>
+      <primary>GETENV function</primary>
+    </indexterm>( </emphasis><emphasis>name </emphasis><emphasis
+  role="bold">[, </emphasis>default<emphasis role="bold"> ]
+  )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.60pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>name</emphasis></entry>
+
+            <entry>A string constant containing the name of the environment
+            variable.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>default</emphasis></entry>
+
+            <entry>Optional. A string constant containing the default value to
+            use if the environment variable does not exist.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>GETENV returns a STRING value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">GETENV</emphasis> function returns the value
+  of the <emphasis>name</emphasis>d environment variable. If the environment
+  variable does not exist or contains no value, the
+  <emphasis>default</emphasis> value is returned.</para>
+
+  <para>Example:</para>
+
+  <programlisting>g1 := GETENV('namesTable');
+g2 := GETENV('myPort','25');
+
+OUTPUT(g1);
+</programlisting>
+</sect1>

+ 89 - 0
docs/ECLR_mods/BltInFunc-GLOBAL.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="GLOBAL">
+  <title>GLOBAL</title>
+
+  <para><emphasis role="bold">GLOBAL<indexterm>
+      <primary>GLOBAL</primary>
+    </indexterm><indexterm>
+      <primary>GLOBAL function</primary>
+    </indexterm>( </emphasis><emphasis>expression </emphasis><emphasis
+  role="bold">[</emphasis>,<emphasis role="bold"> FEW<indexterm>
+      <primary>FEW</primary>
+    </indexterm> | </emphasis><emphasis> </emphasis><emphasis
+  role="bold">MANY<indexterm>
+      <primary>MANY</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis role="bold">]
+  )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.30pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The expression to evaluate at a global scope.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">FEW</emphasis></entry>
+
+            <entry>Optional. Indicates that the expression will result in
+            fewer than 10,000 records. This allows optimization to produce a
+            significantly faster result.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">MANY</emphasis></entry>
+
+            <entry>Optional. Indicates that the expression will result in many
+            records.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>GLOBAL may return scalar values or record sets.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">GLOBAL </emphasis>function evaluates the
+  <emphasis>expression</emphasis> at a global scope, similar to what the
+  GLOBAL workflow service<indexterm>
+      <primary>GLOBAL workflow service</primary>
+    </indexterm> does but without the need to define a separate
+  attribute.</para>
+
+  <para>Example:</para>
+
+  <programlisting>IMPORT doxie;
+besr := doxie.best_records;
+ssnr := doxie.ssn_records;
+
+//**** Individual record defs
+recbesr := RECORDOF(besr);
+recssnr := RECORDOF(ssnr);
+
+//**** Monster record def
+rec := RECORD, MAXLENGTH(doxie.maxlength_report)
+    DATASET(recbesr) best_information_children;
+    DATASET(recssnr) ssn_children;
+END;
+nada := DATASET([0], {INTEGER1 a});
+rec tra(nada l) := TRANSFORM
+  SELF.best_information_children := GLOBAL(besr);
+  SELF.ssn_children := GLOBAL(ssnr);
+END;
+EXPORT central_records := PROJECT(nada, tra(left));
+</programlisting>
+
+  <para>See Also: <link linkend="GLOBAL_workflow_service">GLOBAL Workflow
+  Service</link></para>
+</sect1>

+ 111 - 0
docs/ECLR_mods/BltInFunc-GRAPH.xml

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="GRAPH">
+  <title>GRAPH</title>
+
+  <para><emphasis role="bold">GRAPH<indexterm>
+      <primary>GRAPH</primary>
+    </indexterm><indexterm>
+      <primary>GRAPH function</primary>
+    </indexterm>( </emphasis><emphasis>recordset , iterations
+  </emphasis><emphasis role="bold">, </emphasis><emphasis>
+  processor</emphasis><emphasis role="bold"> )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.60pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The initial set of records to process.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>iterations</emphasis></entry>
+
+            <entry>The number of times to call the processor function.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>processor</emphasis></entry>
+
+            <entry>The function attribute to process the input. This function
+            may use the following as arguments:</entry>
+          </row>
+
+          <row>
+            <entry></entry>
+
+            <entry><programlisting role="tab"><emphasis role="bold">ROWSET<indexterm>
+                    <primary>ROWSET</primary>
+                  </indexterm>(LEFT)<indexterm>
+                    <primary>ROWSET(LEFT)</primary>
+                  </indexterm>   </emphasis>Specifies the set of input datasets, which may be indexed 
+                                  to specify the result set from any specific iteration — 
+                                  ROWSET(LEFT)[0] indicates the initial input <emphasis>recordset</emphasis> while
+                                  ROWSET(LEFT)[1] indicates the result set from the first 
+                                  iteration. This may also be used as the first parameter 
+                                  to the RANGE function to specify a set of datasets 
+                                  (allowing the graph to efficiently process N-ary merge/join<indexterm>
+                  <primary>N-ary merge/join</primary>
+                </indexterm> 
+                                  arguments).
+
+<emphasis role="bold">COUNTER</emphasis><indexterm>
+                  <primary>COUNTER</primary>
+                </indexterm>             Specifies an INTEGER parameter for the graph iteration number.
+</programlisting></entry>
+          </row>
+
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>GRAPH returns the record set result of the last of the
+            <emphasis>iterations</emphasis>.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">GRAPH </emphasis>function is similar to the
+  LOOP function<indexterm>
+      <primary>LOOP function</primary>
+    </indexterm>, but it executes as though all the
+  <emphasis>iterations</emphasis> of the <emphasis>processor</emphasis> call
+  were expanded out, removing any branches that can't be executed, and then
+  joined together. The resulting graph is as efficient as if the graph had
+  been expanded out by hand.</para>
+
+  <para>Example:</para>
+
+  <programlisting>namesRec := RECORD
+  STRING20 lname;
+  STRING10 fname;
+  UNSIGNED2 age := 25;
+  UNSIGNED2 ctr := 0;
+END;
+namesTable2 := DATASET([{'Flintstone','Fred',35},
+    {'Flintstone','Wilma',33},
+    {'Jetson','Georgie',10},
+    {'Mr. T','Z-man'}], namesRec);
+
+loopBody(SET OF DATASET(namesRec) ds, UNSIGNED4 c) :=
+      PROJECT(ds[c-1],    //ds[0]=original input
+     TRANSFORM(namesRec,
+    SELF.age := LEFT.age+c; //c is graph COUNTER
+    SELF.ctr := COUNTER;    //PROJECT’s COUNTER
+    SELF := LEFT));
+
+g1 := GRAPH(namesTable2,10,loopBody(ROWSET(LEFT),COUNTER));
+
+OUTPUT(g1);
+</programlisting>
+
+  <para>See Also: <link linkend="LOOP">LOOP</link>, <link linkend="RANGE">RANGE</link></para>
+</sect1>

+ 111 - 0
docs/ECLR_mods/BltInFunc-GROUP.xml

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="GROUP_function">
+  <title>GROUP</title>
+
+  <para><emphasis role="bold">GROUP<indexterm>
+      <primary>Group</primary>
+    </indexterm><indexterm>
+      <primary>GROUP function</primary>
+    </indexterm>( </emphasis><emphasis>recordset </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, breakcriteria </emphasis><emphasis
+  role="bold">[</emphasis>,<emphasis role="bold"> ALL<indexterm>
+      <primary>ALL</primary>
+    </indexterm> ] ] [</emphasis><emphasis>, </emphasis><emphasis
+  role="bold">LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis role="bold">]
+  )</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="82.30pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>recordset</emphasis></entry>
+
+            <entry>The set of records to fragment.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>breakcriteria</emphasis></entry>
+
+            <entry>Optional. A comma-delimited list of expressions or key
+            fields in the recordset that specifies how to fragment the
+            recordset. You may use the keyword RECORD to indicate all fields
+            in the recordset, and/or you may use the keyword EXCEPT to list
+            non-group fields in the structure. You may also use the keyword
+            ROW to indicate each record in the recordset is a separate group.
+            If omitted, the recordset is ungrouped from any previous
+            grouping.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">ALL</emphasis></entry>
+
+            <entry>Optional. Indicates the <emphasis>breakcriteria</emphasis>
+            is applied without regard to any previous order. If omitted, GROUP
+            assumes the recordset is already sorted in
+            <emphasis>breakcriteria</emphasis> order.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis role="bold">LOCAL</emphasis></entry>
+
+            <entry>Optional. Specifies the operation is performed on each
+            supercomputer node independently, without requiring interaction
+            with all other nodes to acquire data; the operation maintains the
+            distribution of any previous DISTRIBUTE.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>GROUP returns a record set.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">GROUP </emphasis>function fragments a
+  <emphasis>recordset</emphasis> into a set of sets. This allows aggregations
+  and other operations (such as ITERATE, DEDUP, ROLLUP, SORT and others) to
+  occur within defined subsets of the data—the operation executes on each
+  subset, individually. This means that the boundary condition code written in
+  the TRANSFORM function for those functions that use them will be different
+  than it would be for a <emphasis>recordset</emphasis> that has simply been
+  SORTed.</para>
+
+  <para>The <emphasis>recordset</emphasis> must be sorted by the same elements
+  as the <emphasis>breakcriteria</emphasis> if the ALL option is not
+  specified. The maximum size allowed for any one subgroup is 64 Mb and
+  subgroups never span nodes; if the <emphasis>breakcriteria</emphasis>
+  results in a subgroup larger than 64 Mb, an error occurs.</para>
+
+  <para>The <emphasis>recordset</emphasis> gets ‘ungrouped’ by use in a TABLE
+  function, by the JOIN function in some circumstances (see JOIN), by UNGROUP,
+  or by another GROUP function with the second parameter omitted.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyRec := RECORD
+ STRING20 Last;
+ STRING20 First;
+END;
+SortedSet := SORT(Person,Person.last_name); //sort by last name
+GroupedSet := GROUP(SortedSet,last_name);  //then group them
+
+SecondSort := SORT(GroupedSet,Person.first_name);
+   //sorts by first name within each last name group
+   // this is a “sort within group”
+
+UnGroupedSet := GROUP(GroupedSet); //ungroup the dataset
+MyTable := TABLE(SecondSort,MyRec); //create table of sorted names
+</programlisting>
+
+  <para>See Also: <link linkend="REGROUP">REGROUP</link>, <link linkend="COMBINE">COMBINE</link>, <link linkend="UNGROUP">UNGROUP</link>, <link linkend="EXCEPT">EXCEPT</link></para>
+</sect1>

+ 48 - 0
docs/ECLR_mods/BltInFunc-HASH.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="HASH">
+  <title>HASH</title>
+
+  <para><emphasis role="bold">HASH<indexterm>
+      <primary>HASH</primary>
+    </indexterm><indexterm>
+      <primary>HASH function</primary>
+    </indexterm>(</emphasis><emphasis>expressionlist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="83.35pt" />
+
+        <colspec colwidth="305.45pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expressionlist</emphasis></entry>
+
+            <entry>A comma-delimited list of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>HASH returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">HASH</emphasis> function returns a 32-bit
+  hash value derived from all the values in the
+  <emphasis>expressionlist</emphasis>. Trailing spaces are trimmed from string
+  (or UNICODE) fields before the value is calculated (casting to DATA prevents
+  this).</para>
+
+  <para>Example:</para>
+
+  <programlisting>MySet := DISTRIBUTE(Person,HASH(Person.per_ssn));
+    //people with the same SSN go to same Data Refinery node</programlisting>
+
+  <para>See Also: <link linkend="DISTRIBUTE">DISTRIBUTE</link>, <link linkend="HASH32">HASH32</link>, <link linkend="HASH64">HASH64</link>, <link linkend="HASHCRC">HASHCRC</link>, <link linkend="HASHMD5">HASHMD5</link></para>
+</sect1>

+ 49 - 0
docs/ECLR_mods/BltInFunc-HASH32.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="HASH32">
+  <title>HASH32</title>
+
+  <para><emphasis role="bold">HASH32<indexterm>
+      <primary>HASH64</primary>
+    </indexterm><indexterm>
+      <primary>HASH32 function</primary>
+    </indexterm>(</emphasis><emphasis>expressionlist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="83.35pt" />
+
+        <colspec colwidth="305.45pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expressionlist</emphasis></entry>
+
+            <entry>A comma-delimited list of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>HASH32 returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">HASH32</emphasis> function returns a 32-bit
+  FNV (Fowler/Noll/Vo) hash value derived from all the values in the
+  <emphasis>expressionlist</emphasis>. This uses a hashing algorithm that is
+  faster and less likely than HASH to return the same values from different
+  data. Trailing spaces are trimmed from string (or UNICODE) fields before the
+  value is calculated (casting to DATA prevents this).</para>
+
+  <para>Example:</para>
+
+  <programlisting>MySet := DISTRIBUTE(Person,HASH32(Person.per_ssn));
+    //people with the same SSN go to same Data Refinery node</programlisting>
+
+  <para>See Also: <link linkend="DISTRIBUTE">DISTRIBUTE</link>, <link linkend="HASH">HASH</link>, <link linkend="HASH64">HASH64</link>, <link linkend="HASHCRC">HASHCRC</link>, <link linkend="HASHMD5">HASHMD5</link></para>
+</sect1>

+ 48 - 0
docs/ECLR_mods/BltInFunc-HASH64.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="HASH64">
+  <title>HASH64</title>
+
+  <para><emphasis role="bold">HASH64<indexterm>
+      <primary>HASH64</primary>
+    </indexterm><indexterm>
+      <primary>HASH64 function</primary>
+    </indexterm>(</emphasis><emphasis>expressionlist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="83.35pt" />
+
+        <colspec colwidth="305.45pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expressionlist</emphasis></entry>
+
+            <entry>A comma-delimited list of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>HASH64 returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">HASH64</emphasis> function returns a 64-bit
+  FNV (Fowler/Noll/Vo) hash value derived from all the values in the
+  <emphasis>expressionlist</emphasis>. Trailing spaces are trimmed from string
+  (or UNICODE) fields before the value is calculated (casting to DATA prevents
+  this).</para>
+
+  <para>Example:</para>
+
+  <programlisting>OUTPUT(Person,{per_ssn,HASH64(per_ssn)});
+    //output SSN and its 64-bit hash value</programlisting>
+
+  <para>See Also: <link linkend="DISTRIBUTE">DISTRIBUTE</link>, <link linkend="HASH">HASH</link>, <link linkend="HASH32">HASH32</link>, <link linkend="HASHCRC">HASHCRC</link>, <link linkend="HASHMD5">HASHMD5</link></para>
+</sect1>

+ 46 - 0
docs/ECLR_mods/BltInFunc-HASHCRC.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="HASHCRC">
+  <title>HASHCRC</title>
+
+  <para><emphasis role="bold">HASHCRC<indexterm>
+      <primary>HASHRC</primary>
+    </indexterm><indexterm>
+      <primary>HASHCRC function</primary>
+    </indexterm>(</emphasis><emphasis>expressionlist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="83.15pt" />
+
+        <colspec colwidth="305.65pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expressionlist</emphasis></entry>
+
+            <entry>A comma-delimited list of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>HASHCRC returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">HASHCRC</emphasis> function returns a CRC
+  (cyclical redundancy check) value derived from all the values in the
+  <emphasis>expressionlist</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>OUTPUT(Person,{per_ssn,HASHCRC(per_ssn)});
+    //output SSN and its CRC hash value</programlisting>
+
+  <para>See Also: <link linkend="DISTRIBUTE">DISTRIBUTE</link>, <link linkend="HASH">HASH</link>, <link linkend="HASH32">HASH32</link>, <link linkend="HASH64">HASH64</link>, <link linkend="HASHMD5">HASHMD5</link></para>
+</sect1>

+ 48 - 0
docs/ECLR_mods/BltInFunc-HASHMD5.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="HASHMD5">
+  <title>HASHMD5</title>
+
+  <para><emphasis role="bold">HASHMD5<indexterm>
+      <primary>HASHMD5</primary>
+    </indexterm><indexterm>
+      <primary>HASHMD5 function</primary>
+    </indexterm>(</emphasis><emphasis>expressionlist</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="83.10pt" />
+
+        <colspec colwidth="305.70pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expressionlist</emphasis></entry>
+
+            <entry>A comma-delimited list of values.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>HASHMD5 returns a single DATA16 value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">HASHMD5</emphasis> function returns a
+  128-bit hash value derived from all the values in the
+  <emphasis>expressionlist</emphasis>, based on the MD5 algorithm developed by
+  Professor Ronald L. Rivest of MIT. Unlike other hashing functions, trailing
+  spaces are NOT trimmed before the value is calculated.</para>
+
+  <para>Example:</para>
+
+  <programlisting>OUTPUT(Person,{per_ssn,HASHMD5(per_ssn)});
+    //output SSN and its 128-bit hash value</programlisting>
+
+  <para>See Also: <link linkend="DISTRIBUTE">DISTRIBUTE</link>, <link linkend="HASH">HASH</link>, <link linkend="HASH32">HASH32</link>, <link linkend="HASH64">HASH64</link>, <link linkend="HASHCRC">HASHCRC</link></para>
+</sect1>

+ 57 - 0
docs/ECLR_mods/BltInFunc-HAVING.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="HAVING">
+  <title>HAVING</title>
+
+  <para><emphasis role="bold">HAVING<indexterm>
+      <primary>HAVING</primary>
+    </indexterm><indexterm>
+      <primary>HAVING function</primary>
+    </indexterm>(</emphasis><emphasis> groupdataset, expression
+  </emphasis><emphasis role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="82.45pt" />
+
+        <colspec colwidth="306.35pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>groupdataset</emphasis></entry>
+
+            <entry>The name of a GROUPed record set.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The logical expression by which to filter the
+            groups.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>HAVING returns a GROUPed record set.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">HAVING</emphasis> function returns a GROUPed
+  record set containing just those groups for which the
+  <emphasis>expression</emphasis> is true. This is similar to the HAVING
+  clause in SQL. <emphasis role="bold">Available for use only in hthor and
+  Roxie.</emphasis></para>
+
+  <para>Example:</para>
+
+  <programlisting>MyGroups := GROUP(SORT(Person,lastname),lastname);
+     //group by last name
+Filtered := HAVING(MyGroups,COUNT(ROWS(LEFT)) &gt; 10);
+     //filter out the small groups</programlisting>
+
+  <para>See Also: <link linkend="GROUP">GROUP</link></para>
+</sect1>

+ 102 - 0
docs/ECLR_mods/BltInFunc-IF.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="IF">
+  <title>IF<indexterm>
+      <primary>IF</primary>
+    </indexterm><indexterm>
+      <primary>IFF</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">IF<indexterm>
+      <primary>IF function</primary>
+    </indexterm>(</emphasis><emphasis>expression, trueresult
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, falseresult
+  </emphasis><emphasis role="bold">])</emphasis></para>
+
+  <para><emphasis role="bold">IFF<indexterm>
+      <primary>IFF function</primary>
+    </indexterm>(</emphasis><emphasis>expression, trueresult
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>, falseresult
+  </emphasis><emphasis role="bold">])</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.50pt" />
+
+        <colspec />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>A conditional expression.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>trueresult</emphasis></entry>
+
+            <entry>The result to return when the expression is true. This may
+            be a single value, a SET of values, a recordset, or an action to
+            perform.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>falseresult</emphasis></entry>
+
+            <entry>The result to return when the expression is false. This may
+            be a single value, a SET of values, a recordset, or an action to
+            perform. This may be omitted only if the result is an
+            action.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>IF returns a single value, set, recordset, or
+            action.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">IF</emphasis> function evaluates the
+  <emphasis>expression</emphasis> (which must be a conditional expression with
+  a Boolean result) and returns either the <emphasis>truersult </emphasis>or
+  <emphasis>falseresult</emphasis> based on the evaluation of the
+  <emphasis>expression</emphasis>. Both the <emphasis>trueresult</emphasis>
+  and <emphasis>falseresult</emphasis> must be the same type (i.e. both
+  strings, or both recordsets, or ...). If the
+  <emphasis>trueresult</emphasis> and <emphasis>falseresult</emphasis> are
+  strings, then the size of the returned string will be the size of the
+  resultant value. If subsequent code relies on the size of the two being the
+  same, then a type cast to the required size may be required (typically to
+  cast an empty string to the proper size so subsequent string indexing will
+  not fail).</para>
+  
+  <para>The <emphasis role="bold">IFF</emphasis> function performs the same 
+  functionality as IF, but ensures that an <emphasis>expression</emphasis> 
+  containing complex boolean logic is evaluated exactly as it appears.</para>
+  
+  <para>Example:</para>
+
+  <programlisting>MyDate := IF(ValidDate(Trades.trd_dopn),Trades.trd_dopn,0);
+  // in this example, 0 is the false value and
+  // Trades.trd_dopn is the True value returned
+
+MyTrades := IF(person.per_sex = 'Male',
+     Trades(trd_bal&lt;100),
+     Trades(trd_bal&gt;1000));
+  // return low balance trades for men and high balance
+  // trades for women
+
+MyAddress := IF(person.gender = 'M',
+      cleanAddress182(person.address),
+      (STRING182)'');
+  //cleanAddress182 returns a 182-byte string
+  // so casting the empty string false result to a
+  // STRING182 ensures a proper-length string return
+</programlisting>
+
+  <para>See Also: <link linkend="MAP">MAP</link>, <link linkend="EVALUATE">EVALUATE</link>, <link linkend="CASE">CASE</link>, <link linkend="CHOOSE">CHOOSE</link>, <link linkend="SET">SET</link></para>
+</sect1>

+ 65 - 0
docs/ECLR_mods/BltInFunc-INTFORMAT.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="INTFORMAT">
+  <title>INTFORMAT</title>
+
+  <para><emphasis role="bold">INTFORMAT<indexterm>
+      <primary>INTFORMAT</primary>
+    </indexterm><indexterm>
+      <primary>INTFORMAT function</primary>
+    </indexterm>(</emphasis><emphasis>expression, width,
+  mode</emphasis><emphasis role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="80.00pt" />
+
+        <colspec colwidth="308.80pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>expression</emphasis></entry>
+
+            <entry>The expression that specifies the integer value to
+            format.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>width</emphasis></entry>
+
+            <entry>The size of string in which to right-justify the
+            value.</entry>
+          </row>
+
+          <row>
+            <entry><emphasis>mode</emphasis></entry>
+
+            <entry>The format type: 0 = leading blank fill, 1 = leading zero
+            fill.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>INTFORMAT returns a single value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">INTFORMAT </emphasis>function returns the
+  value of the <emphasis>expression</emphasis> formatted as a right-justified
+  string of <emphasis>width</emphasis> characters.</para>
+
+  <para>Example:</para>
+
+  <programlisting>val := 123456789;
+OUTPUT(INTFORMAT(val,20,1));
+  //formats as '00000000000123456789'
+OUTPUT(INTFORMAT(val,20,0));
+  //formats as '          123456789'
+</programlisting>
+
+  <para>See Also: <link linkend="REALFORMAT">REALFORMAT</link></para>
+</sect1>

+ 49 - 0
docs/ECLR_mods/BltInFunc-ISVALID.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ISVALID">
+  <title>ISVALID</title>
+
+  <para><emphasis role="bold">ISVALID<indexterm>
+      <primary>ISVALID</primary>
+    </indexterm><indexterm>
+      <primary>ISVALID function</primary>
+    </indexterm>(</emphasis><emphasis> field </emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <para><informaltable colsep="0" frame="none" rowsep="0">
+      <tgroup cols="2">
+        <colspec colwidth="79.05pt" />
+
+        <colspec colwidth="309.75pt" />
+
+        <tbody>
+          <row>
+            <entry><emphasis>field</emphasis></entry>
+
+            <entry>The name of a DECIMAL, REAL, or alien data TYPE
+            field.</entry>
+          </row>
+
+          <row>
+            <entry>Return:</entry>
+
+            <entry>ISVALID returns a single Boolean value.</entry>
+          </row>
+        </tbody>
+      </tgroup>
+    </informaltable></para>
+
+  <para>The <emphasis role="bold">ISVALID </emphasis>function validates that
+  the <emphasis>field</emphasis> contains a legal value. If the contents are
+  not valid for the declared value type of the <emphasis>field</emphasis>
+  (such as hexadecimal values greater than 9 in a DECIMAL), ISVALID returns
+  FALSE, otherwise it returns TRUE.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyVal := IF(ISVALID(Infile.DecimalField),Infile.DecimalField,0);
+//ISVALID returns TRUE if the value is legal</programlisting>
+
+  <para>See Also: <link linkend="TYPE_Structure">TYPE Structure</link>, <link linkend="DECIMAL">DECIMAL</link>, <link linkend="REAL">REAL</link></para>
+</sect1>

+ 111 - 0
docs/ECLR_mods/BltInFunc-ITERATE.xml

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="ITERATE">
+  <title>ITERATE<indexterm>
+      <primary>ITERATE</primary>
+    </indexterm></title>
+
+  <para><emphasis role="bold">ITERATE<indexterm>
+      <primary>ITERATE function</primary>
+    </indexterm>(</emphasis><emphasis>recordset, transform
+  </emphasis><emphasis role="bold">[, LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm> ] )</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="94.8" />
+
+      <tbody>
+        <row>
+          <entry><emphasis>recordset</emphasis></entry>
+
+          <entry>The set of records to process.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>transform</emphasis></entry>
+
+          <entry>The TRANSFORM function to call for each record in the
+          <emphasis>recordset</emphasis>.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para><emphasis role="bold">LOCAL</emphasis> Optional. Specifies the
+  operation is performed on each supercomputer node independently, without
+  requiring interaction with all other nodes to acquire data; the operation
+  maintains the distribution of any previous DISTRIBUTE.</para>
+
+  <para>Return:<emphasis> </emphasis>ITERATE returns a record set.</para>
+
+  <para>The <emphasis role="bold">ITERATE </emphasis>function processes
+  through all records in the <emphasis>recordset </emphasis>one pair of
+  records at a time, performing the <emphasis>transform</emphasis> function on
+  each pair in turn. The first record in the <emphasis>recordset</emphasis> is
+  passed to the <emphasis>transform</emphasis> as the first right record,
+  paired with a left record whose fields are all blank or zero. Each resulting
+  record from the <emphasis>transform</emphasis> becomes the left record for
+  the next pair.</para>
+
+  <sect2 id="TRANSFORM_Function_Requirements_Iterate">
+    <title>TRANSFORM Function Requirements - ITERATE</title>
+
+    <para>The <emphasis>transform</emphasis> function<indexterm>
+        <primary>transform function</primary>
+      </indexterm> must take at least two parameters: LEFT and RIGHT records
+    that must both be of the same format as the resulting recordset. An
+    optional third parameter may be specified: an integer COUNTER specifying
+    the number of times the <emphasis>transform</emphasis> has been called for
+    the <emphasis>recordset </emphasis>or the current group in the
+    <emphasis>recordset</emphasis> (see the GROUP function).</para>
+
+    <para>Example:</para>
+
+    <programlisting>ResType := RECORD
+  INTEGER1 Val;
+  INTEGER1 Rtot;
+END;
+
+Records := DATASET([{1,0},{2,0},{3,0},{4,0}],ResType);
+/* these are the recs going in: 
+<emphasis role="underline">Val Rtot </emphasis>
+ 1   0
+ 2   0
+ 3   0
+ 4   0 */
+
+ResType T(ResType L, ResType R) := TRANSFORM
+  SELF.Rtot := L.Rtot + R.Val;
+  SELF := R;
+END;
+
+MySet1 := ITERATE(Records,T(LEFT,RIGHT));
+
+/* these are the recs coming out: <emphasis role="underline">
+Val Rtot</emphasis>
+ 1   1
+ 2   3
+ 3   6
+ 4   10 */
+
+//The following code outputs a running balance:
+Run_bal := RECORD
+  Trades.trd_bal;
+  INTEGER8 Balance := 0;
+END;
+TradesBal := TABLE(Trades,Run_Bal);
+
+Run_Bal DoRoll(Run_bal L, Run_bal R) := TRANSFORM
+  SELF.Balance := L.Balance + IF(validmoney(R.trd_bal),R.trd_bal,0);
+  SELF := R;
+END;
+
+MySet2 := ITERATE(TradesBal,DoRoll(LEFT,RIGHT));
+</programlisting>
+
+    <para>See Also: <link linkend="TRANSFORM_Structure">TRANSFORM Structure</link>, <link linkend="RECORD_Structure">RECORD Structure</link>, <link linkend="ROLLUP">ROLLUP</link></para>
+  </sect2>
+</sect1>

File diff suppressed because it is too large
+ 1007 - 0
docs/ECLR_mods/BltInFunc-JOIN.xml


+ 111 - 0
docs/ECLR_mods/BltInFunc-KEYDIFF.xml

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="KEYDIFF">
+  <title>KEYDIFF</title>
+
+  <para><emphasis role="bold">[
+  </emphasis><emphasis>attrname</emphasis><emphasis role="bold">
+  </emphasis><emphasis role="bold">:= ] KEYDIFF<indexterm>
+      <primary>KEYDIFF</primary>
+    </indexterm><indexterm>
+      <primary>KEYDIFF function</primary>
+    </indexterm>(</emphasis><emphasis> index1, index2, file
+  </emphasis><emphasis role="bold"> [, OVERWRITE<indexterm>
+      <primary>OVERRIGHT</primary>
+    </indexterm> ] [</emphasis><emphasis>,</emphasis><emphasis role="bold">
+  EXPIRE<indexterm>
+      <primary>EXPIRE</primary>
+    </indexterm>( [ </emphasis><emphasis>days </emphasis><emphasis
+  role="bold">] ) ] );</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="88.80pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>attrname</emphasis></entry>
+
+          <entry>Optional. The action name, which turns the action into an
+          attribute definition, therefore not executed until the attrname is
+          used as an action.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>index1</emphasis></entry>
+
+          <entry>An INDEX attribute.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>index2</emphasis></entry>
+
+          <entry>An INDEX attribute whose structure is identical to
+          index1.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>file</emphasis></entry>
+
+          <entry>A string constant specifying the logical name of the file to
+          write the differences to.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">OVERWRITE</emphasis></entry>
+
+          <entry>Optional. Specifies overwriting the filename if it already
+          exists.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">EXPIRE</emphasis></entry>
+
+          <entry>Optional. Specifies the file is a temporary file that may be
+          automatically deleted after the specified number of days.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>days</emphasis></entry>
+
+          <entry>Optional. The number of days after which the file may be
+          automatically deleted. If omitted, the default is seven (7).</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">KEYDIFF </emphasis>action compares
+  <emphasis>index1</emphasis> to <emphasis>index2</emphasis> and writes the
+  differences to the specified <emphasis>file</emphasis>. If
+  <emphasis>index1</emphasis> to <emphasis>index2</emphasis> are not exactly
+  the same structure, an error occurs. Once generated, the
+  <emphasis>file</emphasis> may be used by the KEYPATCH action<indexterm>
+      <primary>KEYPATCH action</primary>
+    </indexterm>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>Vehicles := DATASET('vehicles',
+     {STRING2 st,
+      STRING20 city,
+      STRING20 lname,
+      UNSIGNED8 filepos{virtual(fileposition)}},
+     FLAT);
+    
+i1 := INDEX(Vehicles,
+  {st,city,lname,filepos},
+  'vkey::20041201::st.city.lname');
+i2 := INDEX(Vehicles,
+  {st,city,lname,filepos},
+  'vkey::20050101::st.city.lname');
+    
+KEYDIFF(i1,i2,'KEY::DIFF::20050101::i1i2',OVERWRITE);
+</programlisting>
+
+  <para>See Also: <link linkend="KEYPATCH">KEYPATCH</link>, <link
+  linkend="INDEX_record_structure">INDEX</link></para>
+</sect1>

+ 110 - 0
docs/ECLR_mods/BltInFunc-KEYPATCH.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="KEYPATCH">
+  <title>KEYPATCH</title>
+
+  <para><emphasis>[ </emphasis><emphasis>attrname</emphasis><emphasis
+  role="bold"> </emphasis><emphasis role="bold">:= ] KEYPATCH<indexterm>
+      <primary>KEYPATCH</primary>
+    </indexterm><indexterm>
+      <primary>KEYPATCH function</primary>
+    </indexterm>(</emphasis><emphasis> index, patchfile, newfile
+  </emphasis><emphasis role="bold"> [, OVERWRITE<indexterm>
+      <primary>OVERWRITE</primary>
+    </indexterm> ] [</emphasis><emphasis>,</emphasis><emphasis role="bold">
+  EXPIRE<indexterm>
+      <primary>EXPIRE</primary>
+    </indexterm>( [ </emphasis><emphasis>days </emphasis><emphasis
+  role="bold">] ) ] );</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="88.80pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>attrname</emphasis></entry>
+
+          <entry>Optional. The action name, which turns the action into an
+          attribute definition, therefore not executed until the attrname is
+          used as an action.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>index</emphasis></entry>
+
+          <entry>The INDEX attribute to apply the changes to.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>patchfile</emphasis></entry>
+
+          <entry>A string constant specifying the logical name of the file
+          containing the changes to implement (created by KEYDIFF).</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>newfile</emphasis></entry>
+
+          <entry>A string constant specifying the logical name of the file to
+          write the new index to.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">OVERWRITE</emphasis></entry>
+
+          <entry>Optional. Specifies overwriting the
+          <emphasis>newfile</emphasis> if it already exists.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">EXPIRE</emphasis></entry>
+
+          <entry>Optional. Specifies the <emphasis>newfile</emphasis> is a
+          temporary file that may be automatically deleted after the specified
+          number of days.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>days</emphasis></entry>
+
+          <entry>Optional. The number of days after which the file may be
+          automatically deleted. If omitted, the default is seven (7).</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">KEYPATCH </emphasis>action uses the
+  <emphasis>index</emphasis> and <emphasis>patchfile</emphasis> to write a new
+  index to the specified <emphasis>newfile</emphasis> containing all the
+  original index data updated by the information from the
+  <emphasis>patchfile</emphasis>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>Vehicles := DATASET('vehicles',
+     {STRING2 st,
+      STRING20 city,
+      STRING20 lname,
+      UNSIGNED8 filepos{virtual(fileposition)}},
+     FLAT);
+i1 := INDEX(Vehicles,
+  {st,city,lname,filepos},
+  'vkey::20041201::st.city.lname');
+i2 := INDEX(Vehicles,
+  {st,city,lname,filepos},
+  'vkey::20050101::st.city.lname');
+a := KEYDIFF(i1,i2,'KEY::DIFF::20050101::i1i2',OVERWRITE);
+b := KEYPATCH(i1,
+    'KEY::DIFF::20050101::i1i2',
+    'vkey::st.city.lname'OVERWRITE);    
+SEQUENTIAL(a,b);
+</programlisting>
+
+  <para>See Also: <link linkend="KEYDIFF">KEYDIFF</link>, <link
+  linkend="INDEX_record_structure">INDEX</link></para>
+</sect1>

+ 65 - 0
docs/ECLR_mods/BltInFunc-KEYUNICODE.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="KEYUNICODE">
+  <title>KEYUNICODE</title>
+
+  <para><emphasis role="bold">KEYUNICODE<indexterm>
+      <primary>KEYUNICODE</primary>
+    </indexterm><indexterm>
+      <primary>KEYUNICODE function</primary>
+    </indexterm>(</emphasis><emphasis>string</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="78.25pt" />
+
+      <colspec colwidth="310.55pt" />
+
+      <tbody>
+        <row>
+          <entry><emphasis>string</emphasis></entry>
+
+          <entry>A UNICODE string.</entry>
+        </row>
+
+        <row>
+          <entry>Return:</entry>
+
+          <entry>KEYUNICODE returns a single DATA value.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">KEYUNICODE </emphasis>function returns a
+  DATA value derived from the <emphasis>string</emphasis> parameter, such that
+  a comparison of these data values is equivalent to a locale sensitive
+  comparison of the Unicode values that generated them—and, being a simple
+  memcmp(), is significantly faster. The generating
+  <emphasis>string</emphasis> values must be of the same locale or the results
+  are unpredictable. This function is particularly useful if you're doing a
+  lot of compares on a UNICODE field in a large dataset—it can be a good idea
+  to generate a key field and do the compares on that instead.</para>
+
+  <para>Example:</para>
+
+  <programlisting>//where you might do this:
+my_record := RECORD
+   UNICODE_en_US str;
+END;
+my_dataset := DATASET('filename', my_record, FLAT);
+my_sorted  := SORT(my_dataset, str);
+//you could instead do this:
+my_record := RECORD
+   UNICODE_en_US str;
+   DATA strkey := KEYUNICODE(SELF.str);
+END;
+my_dataset := DATASET('filename', my_record, FLAT);
+my_sorted  := SORT(my_dataset, strkey);
+</programlisting>
+
+  <para>See Also: <link linkend="UNICODE">UNICODE</link>, <link
+  linkend="RECORD_Structure">LOCALE</link></para>
+</sect1>

+ 46 - 0
docs/ECLR_mods/BltInFunc-LENGTH.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="LENGTH">
+  <title>LENGTH</title>
+
+  <para><emphasis role="bold">LENGTH<indexterm>
+      <primary>LENGTH</primary>
+    </indexterm><indexterm>
+      <primary>LENGTH function</primary>
+    </indexterm>(</emphasis><emphasis>expression</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="80.50pt" />
+
+      <colspec colwidth="308.30pt" />
+
+      <tbody>
+        <row>
+          <entry><emphasis>expression</emphasis></entry>
+
+          <entry>A string expression.</entry>
+        </row>
+
+        <row>
+          <entry>Return:</entry>
+
+          <entry>LENGTH returns a single integer value.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">LENGTH </emphasis>function returns the
+  length of the string resulting from the <emphasis>expression</emphasis> by
+  treating the <emphasis>expression </emphasis>as a temporary STRING.</para>
+
+  <para>Example:</para>
+
+  <programlisting>INTEGER MyLength := LENGTH('XYZ' + 'ABC');
+      //MyLength is 6</programlisting>
+
+  <para>See Also: <link linkend="String_Operators">String Operators</link>, <link linkend="STRING">STRING</link></para>
+</sect1>

+ 155 - 0
docs/ECLR_mods/BltInFunc-LIBRARY.xml

@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="LIBRARY">
+  <title>LIBRARY</title>
+
+  <para><emphasis role="bold">LIBRARY<indexterm>
+      <primary>LIBRARY</primary>
+    </indexterm><indexterm>
+      <primary>LIBRARY function</primary>
+    </indexterm>(</emphasis><emphasis> </emphasis><emphasis
+  role="bold">INTERNAL<indexterm>
+      <primary>INTERNAL</primary>
+    </indexterm>( </emphasis><emphasis>module </emphasis><emphasis
+  role="bold">)</emphasis><emphasis>, interface </emphasis><emphasis
+  role="bold">[</emphasis><emphasis> (</emphasis><emphasis role="bold">
+  </emphasis><emphasis>parameters) </emphasis><emphasis role="bold">]
+  )</emphasis><emphasis role="bold"></emphasis></para>
+
+  <para><emphasis role="bold">LIBRARY(</emphasis><emphasis> module , interface
+  </emphasis><emphasis role="bold">[</emphasis><emphasis>
+  (</emphasis><emphasis role="bold"> </emphasis><emphasis>parameters)
+  </emphasis><emphasis role="bold">] )</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="86.10pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis role="bold">INTERNAL</emphasis></entry>
+
+          <entry>Optional. Specifies the module is an attribute, not an
+          external library (created by the BUILD action).</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>module</emphasis></entry>
+
+          <entry>The name of the query library. When INTERNAL, this is the
+          name of the MODULE attribute that implements the query library. If
+          not INTERNAL, this is a string expression containing the name of the
+          workunit that compiled the query library (typically defined with
+          #WORKUNIT).</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>interface</emphasis></entry>
+
+          <entry>The name of the INTERFACE structure that defines the query
+          library.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>parameters</emphasis></entry>
+
+          <entry>Optional. The values to pass to the INTERFACE, if defined to
+          receive parameters.</entry>
+        </row>
+
+        <row>
+          <entry>Return:</entry>
+
+          <entry>LIBRARY results in a MODULE that can be used to reference the
+          exported attributes from the specified module.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">LIBRARY </emphasis>function defines an
+  instance of a query library—the <emphasis>interface</emphasis> as
+  implemented by the <emphasis>module</emphasis> when passed the specified
+  <emphasis>parameters. </emphasis><emphasis role="bold">Query libraries are
+  only used by hthor and Roxie.</emphasis></para>
+
+  <para>INTERNAL libraries are typically used when developing queries, while
+  external libraries are best for production queries. An INTERNAL library
+  generates the library code as a separate unit, but then includes that unit
+  within the query workunit. It doesn't have the advantage of reducing compile
+  time or memory usage in Roxie that an external library would have, but it
+  does retain the library structure, and means that changes to the code cannot
+  affect anyone else using the system.</para>
+
+  <para>External libraries are created by the BUILD action and use the "name"
+  form of #WORKUNIT to specify the external name of the library. An external
+  library is pre-compiled and therefore reduces compile time for queries that
+  use it. They also reduce memory usage in Roxie</para>
+
+  <para>Example:</para>
+
+  <programlisting>NamesRec := RECORD
+    INTEGER1  NameID;
+    STRING20  FName;
+    STRING20  LName;
+END;
+NamesTable := DATASET([ {1,'Doc','Holliday'},
+                        {2,'Liz','Taylor'},
+                        {3,'Mr','Nobody'},
+                      {4,'Anywhere','but here'}],
+       NamesRec);
+FilterLibIface1(DATASET(namesRec) ds, STRING search) := INTERFACE
+ EXPORT DATASET(namesRec) matches;
+ EXPORT DATASET(namesRec) others;
+END;
+FilterDsLib1(DATASET(namesRec) ds, STRING search) :=
+      MODULE,LIBRARY(FilterLibIface1)
+ EXPORT matches := ds(Lname = search);
+ EXPORT others := ds(Lname != search);
+END;
+
+// Run this to create the 'Ppass.FilterDsLib' external library
+// #WORKUNIT('name','Ppass.FilterDsLib')
+// BUILD(FilterDsLib1);
+lib1 := LIBRARY(INTERNAL(FilterDsLib1),
+      FilterLibIface1(NamesTable, 'Holliday'));
+lib2 := LIBRARY('Ppass.FilterDsLib',
+      FilterLibIface1(NamesTable, 'Holliday'));
+IFilterArgs := INTERFACE
+  EXPORT DATASET(namesRec) ds;
+  EXPORT STRING search;
+END;
+FilterLibIface2(IFilterArgs args) := INTERFACE
+ EXPORT DATASET(namesRec) matches;
+ EXPORT DATASET(namesRec) others;
+END;
+    
+FilterDsLib2(IFilterArgs args) := MODULE,LIBRARY(FilterLibIface2)
+ EXPORT matches := args.ds(Lname = args.search);
+ EXPORT others := args.ds(Lname != args.search);
+END;
+// Run this to create the 'Ipass.FilterDsLib' external library
+// #WORKUNIT('name','Ipass.FilterDsLib')
+// BUILD(FilterDsLib2);
+SearchArgs := MODULE(IFilterArgs)
+  EXPORT DATASET(namesRec) ds := NamesTable;
+  EXPORT STRING search := 'Holliday';
+END;    
+lib3 := LIBRARY(INTERNAL(FilterDsLib2),
+      FilterLibIface2(SearchArgs));
+lib4 := LIBRARY('Ipass.FilterDsLib',
+      FilterLibIface2(SearchArgs));
+    
+OUTPUT(lib1.matches,NAMED('INTERNAL_matches_straight_parms'));
+OUTPUT(lib1.others, NAMED('INTERNAL_nonmatches_straight_parms'));
+OUTPUT(lib2.matches,NAMED('EXTERNAL_matches_straight_parms'));
+OUTPUT(lib2.others, NAMED('EXTERNAL_nonmatches_straight_parms'));
+OUTPUT(lib3.matches,NAMED('INTERNAL_matches_interface_parms'));
+OUTPUT(lib3.others, NAMED('INTERNAL_nonmatches_interface_parms'));
+OUTPUT(lib4.matches,NAMED('EXTERNAL_matches_interface_parms'));
+OUTPUT(lib4.others, NAMED('EXTERNAL_nonmatches_interface_parms'));
+</programlisting>
+</sect1>

+ 140 - 0
docs/ECLR_mods/BltInFunc-LIMIT.xml

@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="LIMIT">
+  <title>LIMIT</title>
+
+  <para><emphasis role="bold">LIMIT<indexterm>
+      <primary>LIMIT</primary>
+    </indexterm><indexterm>
+      <primary>LIMIT function</primary>
+    </indexterm>(</emphasis><emphasis>recset, maxrecs</emphasis><emphasis
+  role="bold"> [</emphasis><emphasis>, failclause </emphasis><emphasis
+  role="bold">] [</emphasis><emphasis>, </emphasis><emphasis
+  role="bold">KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, </emphasis><emphasis
+  role="bold">COUNT<indexterm>
+      <primary>COUNT</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis role="bold">] ]
+  [</emphasis><emphasis>, </emphasis><emphasis role="bold">SKIP<indexterm>
+      <primary>SKIP</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis role="bold">]
+  )</emphasis></para>
+
+  <para><emphasis role="bold">LIMIT(</emphasis><emphasis>recset,
+  maxrecs</emphasis><emphasis role="bold"> [</emphasis><emphasis>,
+  </emphasis><emphasis role="bold">ONFAIL<indexterm>
+      <primary>ONFAIL</primary>
+    </indexterm>(</emphasis><emphasis>transform</emphasis><emphasis
+  role="bold">)</emphasis><emphasis> </emphasis><emphasis role="bold">]
+  [</emphasis><emphasis>, </emphasis><emphasis role="bold">KEYED<indexterm>
+      <primary>KEYED</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis
+  role="bold">[</emphasis><emphasis>, </emphasis><emphasis
+  role="bold">COUNT<indexterm>
+      <primary>COUNT</primary>
+    </indexterm></emphasis><emphasis> </emphasis><emphasis role="bold">] ]
+  )</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="81.50pt" />
+
+      <colspec />
+
+      <tbody>
+        <row>
+          <entry><emphasis>recset</emphasis></entry>
+
+          <entry>The set of records to limit. This may be an INDEX or any
+          expression that produces a recordset result.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>maxrecs</emphasis></entry>
+
+          <entry>The maximum number of records allowed on a single
+          supercomputer node.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>failclause</emphasis></entry>
+
+          <entry>Optional. A standard FAIL workflow service call.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">KEYED</emphasis></entry>
+
+          <entry>Optional. Specifies limiting the keyed portion of an INDEX
+          read.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">COUNT</emphasis></entry>
+
+          <entry>Optional. Specifies the KEYED limit is pre-checked using
+          keyspan.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">SKIP</emphasis></entry>
+
+          <entry>Optional. Specifies that when the limit is exceeded it is
+          simply eliminated from any result instead of failing the
+          workunit.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis role="bold">ONFAIL</emphasis></entry>
+
+          <entry>Optional. Specifies outputting a single record produced by
+          the transform instead of failing the workunit.</entry>
+        </row>
+
+        <row>
+          <entry><emphasis>transform</emphasis></entry>
+
+          <entry>The TRANSFORM function to call to produce the single output
+          record.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">LIMIT </emphasis>function causes the
+  attribute to fail with an exception if the <emphasis>recset
+  </emphasis>contains more records than <emphasis>maxrecs</emphasis> on any
+  single node of the supercomputer (unless the SKIP option is used for an
+  index read or the ONFAIL option is present). If the <emphasis>failclause
+  </emphasis>is present, it specifies the exception number and message. This
+  is typically used to control "runaway" queries in the Rapid Data Delivery
+  Engine supercomputer.</para>
+
+  <para>Example:</para>
+
+  <programlisting>RecStruct := RECORD
+  INTEGER1 Number;
+  STRING1  Letter;
+END;
+SomeFile := DATASET([{1,'A'},{1,'B'},{1,'C'},{1,'D'},{1,'E'},
+                     {1,'F'},{1,'G'},{1,'H'},{1,'I'},{1,'J'},
+                     {2,'K'},{2,'L'},{2,'M'},{2,'N'},{2,'O'},
+                     {2,'P'},{2,'Q'},{2,'R'},{2,'S'},{2,'T'},
+                     {2,'U'},{2,'V'},{2,'W'},{2,'X'},{2,'Y'}],
+     RecStruct);
+//throw an exception
+X := LIMIT(SomeFile,10, FAIL(99,'error!'));
+//single record output
+Y := LIMIT(SomeFile,10,
+      ONFAIL(TRANSFORM(RecStruct,
+        SELF := ROW({0,''},RecStruct)));
+//no exception, just no record
+Z := LIMIT(SomeFile,10,SKIP);
+</programlisting>
+
+  <para>See Also: <link linkend="FAIL">FAIL</link>, <link
+  linkend="TRANSFORM_Structure">TRANSFORM</link></para>
+</sect1>

+ 47 - 0
docs/ECLR_mods/BltInFunc-LN.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="LN">
+  <title>LN</title>
+
+  <para><emphasis role="bold">LN<indexterm>
+      <primary>LN</primary>
+    </indexterm><indexterm>
+      <primary>LN function</primary>
+    </indexterm>(</emphasis><emphasis>n</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="79.50pt" />
+
+      <colspec colwidth="309.30pt" />
+
+      <tbody>
+        <row>
+          <entry>n</entry>
+
+          <entry>The real number to evaluate.</entry>
+        </row>
+
+        <row>
+          <entry>Return:</entry>
+
+          <entry>LN returns a single real value.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">LN </emphasis>function returns the natural
+  logarithm of the parameter. This is the opposite of the EXP
+  function<indexterm>
+      <primary>EXP function</primary>
+    </indexterm>.</para>
+
+  <para>Example:</para>
+
+  <programlisting>MyLogPI := LN(3.14159); //1.14473</programlisting>
+
+  <para>See Also: <link linkend="EXP">EXP</link>, <link linkend="SQRT">SQRT</link>, <link linkend="POWER">POWER</link>, <link linkend="LOG">LOG</link></para>
+</sect1>

+ 49 - 0
docs/ECLR_mods/BltInFunc-LOCAL.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<sect1 id="LOCAL">
+  <title>LOCAL</title>
+
+  <para><emphasis role="bold">LOCAL<indexterm>
+      <primary>LOCAL</primary>
+    </indexterm><indexterm>
+      <primary>LOCAL function</primary>
+    </indexterm>(</emphasis><emphasis>data</emphasis><emphasis
+  role="bold">)</emphasis></para>
+
+  <informaltable colsep="0" frame="none" rowsep="0">
+    <tgroup cols="2">
+      <colspec colwidth="79.10pt" />
+
+      <colspec colwidth="309.70pt" />
+
+      <tbody>
+        <row>
+          <entry><emphasis>data</emphasis></entry>
+
+          <entry>The name of a DATASET or INDEX attribute.</entry>
+        </row>
+
+        <row>
+          <entry>Return:</entry>
+
+          <entry>LOCAL returns a record set or index.</entry>
+        </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+
+  <para>The <emphasis role="bold">LOCAL </emphasis>function specifies that all
+  subsequent operations on the <emphasis>data</emphasis> are performed locally
+  on each node (similar to use of the LOCAL option on a function). This is
+  typically used within an ALLNODES operation. <emphasis role="bold">Available
+  for use only in Roxie<indexterm>
+      <primary>Roxie</primary>
+    </indexterm>.</emphasis></para>
+
+  <para>Example:</para>
+
+  <programlisting>ds := JOIN(SomeData,LOCAL(SomeIndex), LEFT.ID = RIGHT.ID);</programlisting>
+
+  <para>See Also: <link linkend="ALLNODES">ALLNODES</link>, <link linkend="THISNODE">THISNODE</link>, <link linkend="NOLOCAL">NOLOCAL</link></para>
+</sect1>

+ 0 - 0
docs/ECLR_mods/BltInFunc-LOG.xml


Some files were not shown because too many files changed in this diff