123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <?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="Record_SetRecord_Set_Operators">
- <title>Record Set<indexterm>
- <primary>Record Set</primary>
- </indexterm> Operators<indexterm>
- <primary>Record Set Operators</primary>
- </indexterm></title>
- <para>The following record set operators are supported (all require that the
- files were created using identical RECORD structures<indexterm>
- <primary>RECORD structure</primary>
- </indexterm>):</para>
- <informaltable colsep="1" frame="all" rowsep="1">
- <tgroup align="left" cols="2">
- <colspec colwidth="94.80pt" />
- <colspec />
- <tbody>
- <row>
- <entry>+</entry>
- <entry>Append all records from both files, independent of any
- order</entry>
- </row>
- <row>
- <entry>&</entry>
- <entry>Append all records from both files, maintaining record order
- on each node</entry>
- </row>
- <row>
- <entry>-</entry>
- <entry>Subtract records from a file</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>Example:</para>
- <programlisting>MyLayout := RECORD
- UNSIGNED Num;
- STRING Number;
- END;
- FirstRecSet := DATASET([{1, 'ONE'}, {2, 'Two'}, {3, 'Three'}, {4, 'Four'}], MyLayout);
- SecondRecSet := DATASET([{5, 'FIVE'}, {6, 'SIX'}, {7, 'SEVEN'}, {8, 'EIGHT'}], MyLayout);
- ExcludeThese := SecondRecSet(Num > 6);
- WholeRecSet := FirstRecSet + SecondRecSet;
- ResultSet := WholeRecSet-ExcludeThese;
- OUTPUT (WholeRecSet);
- OUTPUT(ResultSet);
- </programlisting>
- <sect2 id="Prefix_Append_Operator">
- <title>Prefix Append Operator</title>
- <para><emphasis role="bold">(+)
- (</emphasis><emphasis>ds_list</emphasis><emphasis role="bold">)
- [</emphasis><emphasis>, options</emphasis><emphasis role="bold">]
- )</emphasis></para>
- <informaltable colsep="1" frame="all" rowsep="1">
- <tgroup cols="2">
- <colspec colwidth="92.05pt" />
- <colspec />
- <tbody>
- <row>
- <entry><emphasis role="bold">(+)</emphasis></entry>
- <entry>The prefix append operator.</entry>
- </row>
- <row>
- <entry><emphasis>ds_list</emphasis></entry>
- <entry>A comma-delimited list of record sets to append (two or
- more). All the record sets must have identical RECORD
- structures.</entry>
- </row>
- <row>
- <entry><emphasis>options</emphasis></entry>
- <entry>Optional. A comma-delimited list of options from the list
- below.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>The prefix append operator <emphasis>(+)</emphasis> provides more
- flexibility than the simple infix operators described above. It allows
- hints and other options to be associated with the operator. Similar syntax
- will be added in a future change for other infix operators.</para>
- <para>The following <emphasis>options</emphasis> may be used:</para>
- <para><emphasis role="bold">[, UNORDERED | ORDERED(</emphasis>
- <emphasis>bool </emphasis><emphasis role="bold">) ] [, STABLE | UNSTABLE ]
- [, PARALLEL [ (</emphasis> <emphasis>numthreads </emphasis><emphasis
- role="bold">) ] ] [, ALGORITHM(</emphasis> <emphasis>name
- </emphasis><emphasis role="bold">) ]</emphasis></para>
- <informaltable colsep="1" frame="all" rowsep="1">
- <tgroup cols="2">
- <colspec colwidth="92.05pt" />
- <colspec />
- <tbody>
- <row>
- <entry><emphasis role="bold">UNORDERED</emphasis></entry>
- <entry>Optional. Specifies the output record order is not
- significant.</entry>
- </row>
- <row>
- <entry><emphasis role="bold">ORDERED</emphasis></entry>
- <entry>Specifies the significance of the output record
- order.</entry>
- </row>
- <row>
- <entry><emphasis>bool</emphasis></entry>
- <entry>When False, specifies the output record order is not
- significant. When True, specifies the default output record
- order.</entry>
- </row>
- <row>
- <entry><emphasis role="bold">STABLE</emphasis></entry>
- <entry>Optional. Specifies the input record order is
- significant.</entry>
- </row>
- <row>
- <entry><emphasis role="bold">UNSTABLE</emphasis></entry>
- <entry>Optional. Specifies the input record order is not
- significant.</entry>
- </row>
- <row>
- <entry><emphasis role="bold">PARALLEL</emphasis></entry>
- <entry>Optional. Try to evaluate this activity in
- parallel.</entry>
- </row>
- <row>
- <entry><emphasis>numthreads</emphasis></entry>
- <entry>Optional. Try to evaluate this activity using
- <emphasis>numthreads</emphasis> threads.</entry>
- </row>
- <row>
- <entry><emphasis role="bold">ALGORITHM</emphasis></entry>
- <entry>Optional. Override the algorithm used for this
- activity.</entry>
- </row>
- <row>
- <entry><emphasis>name</emphasis></entry>
- <entry>The algorithm to use for this activity. Must be from the
- list of supported algorithms for the SORT function's STABLE and
- UNSTABLE options.</entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>Example:</para>
- <programlisting>ds_1 := (+)(ds1, ds2, UNORDERED);
- //equivalent to: ds := ds1 + ds2;
-
- ds_2 := (+)(ds1, ds2);
- //equivalent to: ds := ds1 & ds2;
- ds_3 := (+)(ds1, ds2, ds3);
- //multiple file appends are supported</programlisting>
- </sect2>
- </sect1>
|