<!--
* 
*
*  ProLinga-Doc
*
*  Copyright (C) 2002-2008 Xobas Software.
*  All rights reserved.
*  
*  This file is part of ProLinga-Doc.
*
*  ProLinga-Doc is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  ProLinga-Doc is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with ProLinga-Doc.  If not, see <http://www.gnu.org/licenses/>.
*
*  More information is available at the following addresses:
*
*  Website     : http://www.prolinga.org
*
*  Email       : prolinga-list@prolinga.org
*
*
-->
<refentry id="cmd_response">
  <refmeta>
    <refentrytitle>RESPONSE Command</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>RESPONSE</refname>
    <refpurpose>Set the response object used when using the web interface.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>RESPONSE</command>
      <arg choice='plain'><option>DATAREF</option></arg>
      <arg choice='plain'><replaceable>prefix</replaceable>-<replaceable>data_ref</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>RESPONSE</command>
      <arg choice='plain'><option>FILE</option></arg>
      <arg choice='plain'><replaceable>ext_file_name</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>RESPONSE</command>
      <arg choice='plain'><option>TXT</option></arg>
      <arg choice='plain'><replaceable>text_document_name</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>RESPONSE</command>
      <arg choice='plain'><option>XML</option></arg>
      <arg choice='plain'><replaceable>xml_document_name</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="cmd_response_introduction">
    <title>Introduction</title>
    <para>
      The <link linkend="cmd_response">RESPONSE</link> command sets the 
      response object used when using the web interface. Valid response 
      types are:
      <itemizedlist>
        <listitem>
          <para>DATAREF</para>
        </listitem>
        <listitem>
          <para>FILE</para>
        </listitem>
        <listitem>
          <para>TXT</para>
        </listitem>
        <listitem>
          <para>XML</para>
        </listitem>
      </itemizedlist>

      When processing of a web request is done on 4GL level, then the contents 
      of the object type and name as set by the RESPONSE command, will be 
      send to the requester.
    </para>
  </refsect1>
  <refsect1 id="cmd_response_arguments">
    <title>Arguments</title>
    <variablelist>
      <varlistentry>
	<term><replaceable>prefix</replaceable>-<replaceable>data_ref</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference that can hold data. (ie; V-orders)
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>ext_file_name</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference or hard coded string that holds a path and file 
            name. (ie; "/tmp/orders.html")
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>text_document_name</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference that can hold the value of a valid and opened 
            text document. 
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>xml_document_name</replaceable></term>
	<listitem>
	  <simpara>
            any data reference that can holds the value of a valid and opened 
            xml document.
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id="cmd_response_example">
    <title>Example</title>
<programlisting>
. . .
. . .
RESPONSE DATAREF V-orders
. . .
. . .
RESPONSE FILE "/tmp/orders.html"
. . .
. . .
RESPONSE TXT "buf1"
. . .
. . .
RESPONSE XML "doc1"
. . .
. . .
</programlisting>
  </refsect1>

  <refsect1 id="cmd_response_related">
    <title>Related Commands</title>
    <para>
      None.
    </para>
  </refsect1>

</refentry>

