RfsQuery.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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="RfsQuery">
  5. <title>EncodeRfsQuery</title>
  6. <para><emphasis>result</emphasis> <emphasis role="bold"> :=
  7. STD.File.EncodeRfsQuery<indexterm>
  8. <primary>STD.File.EncodeRfsQuery</primary>
  9. </indexterm><indexterm>
  10. <primary>File.RfsEncodeQuery</primary>
  11. </indexterm><indexterm>
  12. <primary>EncodeRfsQuery</primary>
  13. </indexterm>(</emphasis> <emphasis> server, query </emphasis> <emphasis
  14. role="bold">);</emphasis></para>
  15. <informaltable colsep="0" frame="none" rowsep="0">
  16. <tgroup cols="2">
  17. <colspec colwidth="80.50pt" />
  18. <colspec />
  19. <tbody>
  20. <row>
  21. <entry><emphasis>server</emphasis></entry>
  22. <entry>A null-terminated string containing the ip:port address for
  23. the remote file server.</entry>
  24. </row>
  25. <row>
  26. <entry><emphasis>query</emphasis></entry>
  27. <entry>A null-terminated string containing the query to send to the
  28. <emphasis>server</emphasis>.</entry>
  29. </row>
  30. <row>
  31. <entry>Return:<emphasis> </emphasis></entry>
  32. <entry>RfsQuery returns a null-terminated string containing the
  33. result of the <emphasis>query</emphasis>.</entry>
  34. </row>
  35. </tbody>
  36. </tgroup>
  37. </informaltable>
  38. <para>The <emphasis role="bold">EncodeRfsQuery </emphasis>function returns a
  39. string that can be used in a DATASET declaration to read data from an RFS
  40. (Remote File Server) instance (e.g. rfsmysql) on another node.</para>
  41. <para>Example:</para>
  42. <programlisting format="linespecific">IMPORT Std;
  43. rfsserver := '10.173.207.1:7080';
  44. rec := RECORD,MAXLENGTH(8192)
  45. STRING mydata;
  46. END;
  47. OUTPUT(DATASET(STD.File.EncodeRfsQuery( rfsserver,
  48. 'SELECT data FROM xml_testnh'),rec,CSV(MAXLENGTH(8192))));</programlisting>
  49. </sect1>