WorkunitList.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="WorkunitList">
  5. <title>WorkunitList</title>
  6. <para><emphasis role="bold">STD.System.Workunit.WorkunitList <indexterm>
  7. <primary>STD.System.Workunit.WorkunitList</primary>
  8. </indexterm> <indexterm>
  9. <primary>System.Workunit.WorkunitList</primary>
  10. </indexterm> <indexterm>
  11. <primary>Workunit.WorkunitList</primary>
  12. </indexterm> <indexterm>
  13. <primary>WorkunitList</primary>
  14. </indexterm> (</emphasis> <emphasis> lowwuid </emphasis> <emphasis
  15. role="bold">[</emphasis> <emphasis>, highwuid </emphasis> <emphasis
  16. role="bold">] [</emphasis> <emphasis>, username </emphasis> <emphasis
  17. role="bold">]</emphasis> <emphasis role="bold"> [</emphasis> <emphasis>,
  18. cluster </emphasis> <emphasis role="bold">] [</emphasis> <emphasis>, jobname
  19. </emphasis> <emphasis role="bold">] [</emphasis> <emphasis>, state
  20. </emphasis> <emphasis role="bold">] [</emphasis> <emphasis>, priority
  21. </emphasis> <emphasis role="bold">]</emphasis> <emphasis role="bold">
  22. [</emphasis> <emphasis>, fileread </emphasis> <emphasis role="bold">]
  23. [</emphasis> <emphasis>, filewritten </emphasis> <emphasis role="bold">]
  24. [</emphasis> <emphasis>, roxiecluster </emphasis> <emphasis
  25. role="bold">]</emphasis> <emphasis role="bold"> [</emphasis> <emphasis>,
  26. eclcontains </emphasis> <emphasis role="bold">] [</emphasis> <emphasis>,
  27. online </emphasis> <emphasis role="bold">] [</emphasis> <emphasis>, archived
  28. </emphasis> <emphasis role="bold">] [</emphasis> <emphasis>, appvalues
  29. </emphasis> <emphasis role="bold">])</emphasis></para>
  30. <informaltable colsep="1" frame="all" rowsep="1">
  31. <tgroup cols="2">
  32. <colspec colwidth="80.50pt" />
  33. <colspec />
  34. <tbody>
  35. <row>
  36. <entry><emphasis>lowwuid</emphasis></entry>
  37. <entry>A null-terminated string containing the lowest WorkUnit
  38. IDentifier to list. This may be an empty string.</entry>
  39. </row>
  40. <row>
  41. <entry><emphasis>highwuid</emphasis></entry>
  42. <entry>Optional. A null-terminated string containing the highest
  43. WorkUnit IDentifier to list. If omitted, the default is an empty
  44. string.</entry>
  45. </row>
  46. <row>
  47. <entry><emphasis>cluster</emphasis></entry>
  48. <entry>Optional. A null-terminated string containing the name of the
  49. cluster the workunit ran on. If omitted, the default is an empty
  50. string.</entry>
  51. </row>
  52. <row>
  53. <entry><emphasis>jobname</emphasis></entry>
  54. <entry>Optional. A null-terminated string containing the name of the
  55. workunit. This may contain wildcard ( * ? ) characters. If omitted,
  56. the default is an empty string.</entry>
  57. </row>
  58. <row>
  59. <entry><emphasis>state</emphasis></entry>
  60. <entry>Optional. A null-terminated string containing the state of
  61. the workunit. If omitted, the default is an empty string.</entry>
  62. </row>
  63. <row>
  64. <entry><emphasis>priority</emphasis></entry>
  65. <entry>Optional. A null-terminated string containing the priority of
  66. the workunit. If omitted, the default is an empty string.</entry>
  67. </row>
  68. <row>
  69. <entry><emphasis>fileread</emphasis></entry>
  70. <entry>Optional. A null-terminated string containing the name of a
  71. file read by the workunit. This may contain wildcard ( * ? )
  72. characters. If omitted, the default is an empty string.</entry>
  73. </row>
  74. <row>
  75. <entry><emphasis>filewritten</emphasis></entry>
  76. <entry>Optional. A null-terminated string containing the name of a
  77. file written by the workunit. This may contain wildcard ( * ? )
  78. characters. If omitted, the default is an empty string.</entry>
  79. </row>
  80. <row>
  81. <entry><emphasis>roxiecluster</emphasis></entry>
  82. <entry>Optional. A null-terminated string containing the name of the
  83. Roxie cluster. If omitted, the default is an empty string.</entry>
  84. </row>
  85. <row>
  86. <entry><emphasis>eclcontains</emphasis></entry>
  87. <entry>Optional. A null-terminated string containing text to search
  88. for in the workunit's ECL code. This may contain wildcard ( * ? )
  89. characters. If omitted, the default is an empty string.</entry>
  90. </row>
  91. <row>
  92. <entry><emphasis>online</emphasis></entry>
  93. <entry>Optional. A Boolean true/false value specifying whether the
  94. search is performed online. If omitted, the default is TRUE.</entry>
  95. </row>
  96. <row>
  97. <entry><emphasis>archived</emphasis></entry>
  98. <entry>Optional. A Boolean true/false value specifying whether the
  99. search is performed in the archives. If omitted, the default is
  100. FALSE.</entry>
  101. </row>
  102. <row>
  103. <entry><emphasis>appvalues</emphasis></entry>
  104. <entry>Optional. A null-terminated string containing application
  105. values to search for. Use a string of the form appname/key=value or
  106. appname/*=value.</entry>
  107. </row>
  108. <row>
  109. <entry>Return:<emphasis> </emphasis></entry>
  110. <entry>WorkunitList returns a DATASET.</entry>
  111. </row>
  112. </tbody>
  113. </tgroup>
  114. </informaltable>
  115. <para>The <emphasis role="bold">WorkunitList </emphasis>function returns a
  116. dataset of all workunits that meet the search criteria specified by the
  117. parameters passed to the function. All the parameters are search values and
  118. all but the first are omittable, therefore the easiest way to pass a
  119. particular single search parameter would be to use the NAMED parameter
  120. passing technique.</para>
  121. <para>The resulting DATASET is in this format:</para>
  122. <programlisting>WorkunitRecord := RECORD
  123. STRING24 wuid;
  124. STRING owner{MAXLENGTH(64)};
  125. STRING cluster{MAXLENGTH(64)};
  126. STRING roxiecluster{MAXLENGTH(64)};
  127. STRING job{MAXLENGTH(256)};
  128. STRING10 state;
  129. STRING7 priority;
  130. STRING20 created;
  131. STRING20 modified;
  132. BOOLEAN online;
  133. BOOLEAN protected;
  134. END;</programlisting>
  135. <para>Example:</para>
  136. <programlisting format="linespecific">OUTPUT(STD.System.Workunit.WorkunitList(''));
  137. //list all current workunits
  138. OUTPUT(STD.System.Workunit.WorkunitList('',
  139. NAMED eclcontains := 'COUNT'));
  140. //list only those where the ECL code contains the word 'COUNT'
  141. //this search is case insensitive and does include comments
  142. STD.System.Workunit.SetWorkunitAppValue('MyApp','FirstName','Jim',TRUE);
  143. OUTPUT(STD.System.Workunit.WorkunitList(appvalues := 'MyApp/FirstName='Jim'));
  144. //returns a list of workunits with app values where FirstName='Jim'
  145. </programlisting>
  146. <para>See Also: <link
  147. linkend="SetWorkunitAppValue">SetWorkunitAppValue</link></para>
  148. </sect1>