<!--
* 
*
*  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_repository">
  <refmeta>
    <refentrytitle>REPOSITORY Command</refentrytitle>
    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>REPOSITORY</refname>
    <refpurpose>Command interface to application repository.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>DELETE</option></arg>
      <arg choice='plain'><replaceable>repository_table_name</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>GET</option></arg>
      <arg choice='plain'><replaceable>repository_table_name</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>TEST</option></arg>
      <arg choice='plain'><replaceable>repository_table_name</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>PUT</option></arg>
      <arg choice='plain'><replaceable>repository_table_name</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>CLEARINSTANCE</option></arg>
      <arg choice='plain'><replaceable>repository_table_name.record_name</replaceable></arg>
      <arg choice='plain'><option>INSTANCE</option></arg>
      <arg choice='plain'><replaceable>instance_ref</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>GETINSTANCE</option></arg>
      <arg choice='plain'><replaceable>repository_table_name.record_name</replaceable></arg>
      <arg choice='plain'><option>INSTANCE</option></arg>
      <arg choice='plain'><replaceable>instance_ref</replaceable></arg>
      <arg choice='plain'><option>SEQUENCE</option></arg>
      <arg choice='plain'><replaceable>sequence_no</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>REPOSITORY</command>
      <arg choice='plain'><option>OBJECTLIST</option></arg>
      <arg choice='plain'><replaceable>repository_table_name</replaceable></arg>
      <arg choice='plain'><option>FILTER</option></arg>
      <arg choice='plain'><replaceable>filter_ref</replaceable></arg>
      <arg choice='plain'><option>LISTSTORE</option></arg>
      <arg choice='plain'><replaceable>list_store_name</replaceable></arg>
      <arg choice='opt'>
        <arg choice='plain'><option>FIELDS</option></arg>
        <arg choice='plain'><replaceable>data_dictionary_name</replaceable></arg>
        <arg rep='repeat' choice='opt'><replaceable>data_dictionary_name</replaceable></arg>
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="cmd_repository_introduction">
    <title>Introduction</title>
    <para>
      The <link linkend="cmd_repository">REPOSITORY</link> command is a command 
      interface to Application Repository. Since this command can only be used 
      for accessing the system repository, it should only used in developer 
      applications. To access relational databases and to use the powerful 
      SQL query language the command <link linkend="cmd_sql">SQL</link> should 
      be used. With the built-in function REPOSITORYSTATUS(), the status of the last 
      performed REPOSITORY command can be retrieved. Any value other than 0, 
      means that there was a problem.
    </para>
  </refsect1>
  <refsect1 id="cmd_repository_arguments">
    <title>Arguments</title>
    <variablelist>
      <varlistentry>
	<term><replaceable>repository_table_name</replaceable></term>
	<listitem>
	  <simpara>
            Name of a valid and exising repository table definition.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>record_name</replaceable></term>
	<listitem>
	  <simpara>
            Name of a valid and exising repository reiteration record definition.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>filter_ref</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference or string which holds the key or wild cards for 
            the selection range.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>list_store_name</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference or string which holds the name of a valid and 
            existing list store.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>data_dictionary_name</replaceable></term>
	<listitem>
	  <simpara>
            Name of the data dictionary to be included in the list. If no dictionary 
            name is provided, then all dictionaries of the record will be 
            included.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>instance_ref</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference or string which holds the name of the instance.
	  </simpara>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><replaceable>sequence_no</replaceable></term>
	<listitem>
	  <simpara>
            Any data reference or numeric value which holds the sequence no.
	  </simpara>
	</listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1 id="cmd_repository_example">
    <title>Example</title>
<programlisting>
. . .
. . .
LET F-Application.Constant = V-ApplicationName
LET F-Type.Constant = "Constant"
LET F-Name.Constant = G-Name.Object
REPOSITORY GET Constant
. . .
. . .
</programlisting>
  </refsect1>

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

</refentry>

