<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry id='an2ktool1'>
<!--  @(#)an2ktool.1 2001/04/02 NIST -->
<!--  I Image Group -->
<!--  Michael D. Garris -->

<refmeta>
<refentrytitle>AN2KTOOL</refentrytitle>
<manvolnum>1C</manvolnum>
<refmiscinfo class='date'>02 April 2001</refmiscinfo>
<refmiscinfo class='source'>NIST</refmiscinfo>
<refmiscinfo class='manual'>NFIS Reference Manual</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>an2ktool</refname>
<refpurpose>Parses, manipulates, and/or writes the results to an ANSI/NIST 2000 file in batch mode.</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>an2ktool</command>    
    <arg choice='plain'><replaceable>&lt;option&gt;</replaceable></arg>
    <sbr/>
    <group choice='plain'><arg choice='plain'>-print <replaceable>&lt;all</replaceable></arg><arg choice='plain'><replaceable>r</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>.f</replaceable></arg><arg choice='opt'><replaceable>.s.[i]</replaceable></arg>&gt;</arg><arg choice='plain'><replaceable>&lt;filein&gt;</replaceable></arg><arg choice='opt'><replaceable>fileout</replaceable></arg><sbr/><arg choice='plain'>-delete <replaceable>r</replaceable></arg><arg choice='opt'><arg choice='plain'><replaceable>.f</replaceable></arg><arg choice='opt'><replaceable>.s.[i]</replaceable></arg></arg><arg choice='plain'><replaceable>&lt;filein&gt;</replaceable></arg><arg choice='opt'><replaceable>fileout</replaceable></arg><sbr/><arg choice='plain'>-substitute <replaceable>r.f.s.i</replaceable></arg><arg choice='plain'><replaceable>&lt;newvalue&gt;&lt;filein&gt;</replaceable></arg><arg choice='opt'><replaceable>fileout</replaceable></arg><sbr/><arg choice='plain'>-substitute <replaceable>r</replaceable></arg><arg choice='opt'><replaceable>.f.[s]</replaceable></arg><arg choice='plain'><replaceable>&lt;fmttextfile&gt;&lt;filein&gt;</replaceable></arg><arg choice='opt'><replaceable>fileout</replaceable></arg><sbr/><arg choice='plain'>-insert <replaceable>r.f.s.i</replaceable></arg><arg choice='plain'><replaceable>&lt;newvalue&gt;&lt;filein&gt;</replaceable></arg><arg choice='opt'><replaceable>fileout</replaceable></arg><sbr/><arg choice='plain'>-insert <replaceable>r</replaceable></arg><arg choice='opt'><replaceable>.f.[s]</replaceable></arg><arg choice='plain'><replaceable>&lt;fmttextfile&gt;&lt;filein&gt;</replaceable></arg><arg choice='opt'><replaceable>fileout</replaceable></arg><sbr/></group>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='B'>An2ktool</emphasis>
parses a standard  compliant ANSI/NIST-ITL 1-2000 file,
manipulates its contents, and writes the results back out.
Batch operations may be conducted at the level of
record, field, subfield, or information item.  Possible
operations include printing, deleting, substituting, or
inserting data.</para>

</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<para>All switch names may be abbreviated; for example,
<option>-print</option> may be written <option>-p</option>.</para>

</refsect1>

<refsect1 id='print_option'><title>PRINT OPTION</title>
<para><option>-print </option>&lt;all|<emphasis remap='I'>r</emphasis>[<markup>.f</markup>[<markup>.s</markup>[<markup>.i</markup>]]]&gt; &lt;<emphasis remap='I'>file in</emphasis>&gt; [<emphasis remap='I'>file out</emphasis>]</para>

<para>Prints the contents of the specified structure {file, record,
field, subfield, or information item} to either the specified
output file or to standard output.</para>

<para>Option settings:</para>
<!-- .RS -->
<variablelist remap='TP'>
  <varlistentry>
  <term>all</term>
  <listitem>
<para>The entire contents of the input file is printed.  Any binary image
fields in the file are stored to temporary files, and their file names
are externally referenced in the printed output.  This option setting is
equivalent to running <emphasis remap='B'>an2k2txt</emphasis> on the input file.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r</emphasis></term>
  <listitem>
<para>The contents of the record at position <emphasis remap='I'>r</emphasis> in the file is printed.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f</emphasis></term>
  <listitem>
<para>The contents of the field at position <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis>
is printed.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s</emphasis></term>
  <listitem>
<para>The contents of the subfield at position <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis>
within record <emphasis remap='I'>r</emphasis> is printed.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s.i</emphasis></term>
  <listitem>
<para>The contents of the information item at position <emphasis remap='I'>i</emphasis> within
subfield <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis> is printed.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RE -->
<variablelist remap='TP'>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>file in</emphasis>&gt;</term>
  <listitem>
<para>The ANSI/NIST file whose content is to be printed.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>[<emphasis remap='I'>file out</emphasis>]</term>
  <listitem>
<para>The optional output file.  If omitted, results are printed to
standard output.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='delete_option'><title>DELETE OPTION</title>
<para><option>-delete </option><emphasis remap='I'>r</emphasis>[<markup>.f</markup>[<markup>.s</markup>[<markup>.i</markup>]]] &lt;<emphasis remap='I'>file in</emphasis>&gt; [<emphasis remap='I'>file out</emphasis>]</para>

<para>Deletes the contents of the specified structure {record,
field, subfield, or information item} from the ANSI/NIST
file, writing the results to either the specified
output file or to standard output.</para>

<para>Option settings:</para>
<!-- .RS -->
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>r</emphasis></term>
  <listitem>
<para>The contents of the record at position <emphasis remap='I'>r</emphasis> in the file is deleted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f</emphasis></term>
  <listitem>
<para>The contents of the field at position <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis>
is deleted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s</emphasis></term>
  <listitem>
<para>The contents of the subfield at position <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis>
within record <emphasis remap='I'>r</emphasis> is deleted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s.i</emphasis></term>
  <listitem>
<para>The contents of the information item at position <emphasis remap='I'>i</emphasis> within
subfield <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis> is deleted.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RE -->
<variablelist remap='TP'>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>file in</emphasis>&gt;</term>
  <listitem>
<para>The ANSI/NIST file whose content is to be modified.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>[<emphasis remap='I'>file out</emphasis>]</term>
  <listitem>
<para>The optional output file.  If omitted, results are printed to
standard output.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='substitute_option_1'><title>SUBSTITUTE OPTION 1</title>
<para><option>-substitute </option><emphasis remap='I'>r.f.s.i</emphasis> &lt;new value&gt; &lt;<emphasis remap='I'>file in</emphasis>&gt; [<emphasis remap='I'>file out</emphasis>]</para>

<para>Substitutes the contents of the specified information item in an
ANSI/NIST file with the string value provided on the command line,
writing the results to either the specified
output file or to standard output.</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s.i</emphasis></term>
  <listitem>
<para>The position indices of the information item to be
substituted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>new value</emphasis>&gt;</term>
  <listitem>
<para>The new string value.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>file in</emphasis>&gt;</term>
  <listitem>
<para>The ANSI/NIST file whose content is to be modified.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>[<emphasis remap='I'>file out</emphasis>]</term>
  <listitem>
<para>The optional output file.  If omitted, results are printed to
standard output.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='substitute_option_2'><title>SUBSTITUTE OPTION 2</title>
<para><option>-substitute </option><emphasis remap='I'>r</emphasis>[<markup>.f</markup>[<markup>.s</markup>]] &lt;<emphasis remap='I'>fmttext file</emphasis>&gt; &lt;<emphasis remap='I'>file in</emphasis>&gt; [<emphasis remap='I'>file out</emphasis>]</para>

<para>Substitutes the contents of the specified structure {record,
field, or subfield} in an ANSI/NIST file with the contents of
a formatted text file consistent in format to those produced
by <emphasis remap='B'>an2k2txt</emphasis>.  The results are written to either the specified
output file or to standard output.</para>

<para>Option settings:</para>
<!-- .RS -->
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>r</emphasis></term>
  <listitem>
<para>The contents of the record at position <emphasis remap='I'>r</emphasis> in the file is substituted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f</emphasis></term>
  <listitem>
<para>The contents of the field at position <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis>
is substituted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s</emphasis></term>
  <listitem>
<para>The contents of the subfield at position <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis>
within record <emphasis remap='I'>r</emphasis> is substituted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s.i</emphasis></term>
  <listitem>
<para>The contents of the information item at position <emphasis remap='I'>i</emphasis> within
subfield <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis> is substituted.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RE -->
<variablelist remap='TP'>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>fmttext file</emphasis>&gt;</term>
  <listitem>
<para>The formatted text file containing the new values.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>file in</emphasis>&gt;</term>
  <listitem>
<para>The ANSI/NIST file whose content is to be modified.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>[<emphasis remap='I'>file out</emphasis>]</term>
  <listitem>
<para>The optional output file.  If omitted, results are printed to
standard output.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='insert_option_1'><title>INSERT OPTION 1</title>
<para><option>-insert </option><emphasis remap='I'>r.f.s.i</emphasis> &lt;new value&gt; &lt;<emphasis remap='I'>file in</emphasis>&gt; [<emphasis remap='I'>file out</emphasis>]</para>

<para>Inserts an information item at the specified position within an
ANSI/NIST file, assigning the new item the string value provided
on the command line.  The results are written to either the specified
output file or to standard output.</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s.i</emphasis></term>
  <listitem>
<para>The position indices where the new information item is to be
inserted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>new value</emphasis>&gt;</term>
  <listitem>
<para>The new information item's string value.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>file in</emphasis>&gt;</term>
  <listitem>
<para>The ANSI/NIST file whose content is to be modified.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>[<emphasis remap='I'>file out</emphasis>]</term>
  <listitem>
<para>The optional output file.  If omitted, results are printed to
standard output.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='insert_option_2'><title>INSERT OPTION 2</title>
<para><option>-insert </option><emphasis remap='I'>r</emphasis>[<markup>.f</markup>[<markup>.s</markup>]] &lt;<emphasis remap='I'>fmttext file</emphasis>&gt; &lt;<emphasis remap='I'>file in</emphasis>&gt; [<emphasis remap='I'>file out</emphasis>]</para>

<para>Inserts a structure {record, field, or subfield} at the specified
position within an ANSI/NIST file.  The new structure is assigned
the contents of a formatted text file consistent in format to
those produced by <emphasis remap='B'>an2k2txt</emphasis>. The results are written to either
the specified output file or to standard output.</para>

<para>Option settings:</para>
<!-- .RS -->
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>r</emphasis></term>
  <listitem>
<para>A record at position <emphasis remap='I'>r</emphasis> is inserted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f</emphasis></term>
  <listitem>
<para>A field at position <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis> is inserted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s</emphasis></term>
  <listitem>
<para>A subfield at position <emphasis remap='I'>s</emphasis> within field <emphasis remap='I'>f</emphasis>
within record <emphasis remap='I'>r</emphasis> is inserted.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>r.f.s.i</emphasis></term>
  <listitem>
<para>An information item at position <emphasis remap='I'>i</emphasis> within subfield <emphasis remap='I'>s</emphasis>
within field <emphasis remap='I'>f</emphasis> within record <emphasis remap='I'>r</emphasis> is inserted.</para>
  </listitem>
  </varlistentry>
</variablelist>

<!-- .RE -->
<variablelist remap='TP'>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>fmttext file</emphasis>&gt;</term>
  <listitem>
<para>The formatted text file containing the new values.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>&lt;<emphasis remap='I'>file in</emphasis>&gt;</term>
  <listitem>
<para>The ANSI/NIST file whose content is to be modified.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term>[<emphasis remap='I'>file out</emphasis>]</term>
  <listitem>
<para>The optional output file.  If omitted, results are printed to
standard output.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='examples'><title>EXAMPLES</title>
<para>From <emphasis remap='I'>test/an2k/execs/an2ktool/an2ktool.src</emphasis>:</para>

<para><emphasis remap='B'>% an2ktool -d 2.12.1.4 ../../data/nist.an2 delete.an2</emphasis>
<!-- .br -->
deletes the information item recording the first minutia's type.</para>

<para><emphasis remap='B'>% an2ktool -i 2.12.1.4 A delete.an2 insert.an2</emphasis>
<!-- .br -->
inserts an information item setting the first minutia's type to "A".</para>

<para><emphasis remap='B'>% an2ktool -s 2.12.1.4 A ../../data/nist.an2 subitem.an2</emphasis>
<!-- .br -->
replaces the information item recording the first minutia's type
with the value "A".</para>

<para><emphasis remap='B'>% an2ktool -s 2.12.1 subfld.fmt ../../data/nist.an2 subfld.an2</emphasis>
<!-- .br -->
replaces the subfield containing all the attributes related to
the first minutia with the contents of the formatted text file
<emphasis remap='I'>subfld.fmt</emphasis>.</para>

</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para><emphasis remap='B'>an2k2iaf</emphasis>(1C),
<emphasis remap='B'>an2k2txt</emphasis>(1C),
<emphasis remap='B'>dpyan2k</emphasis>(1C),
<emphasis remap='B'>iaf2an2k</emphasis>(1C),
<emphasis remap='B'>txt2an2k</emphasis>(1C)</para>

</refsect1>

<refsect1 id='author'><title>AUTHOR</title>
<para>NIST/ITL/DIV894/Image Group</para>
</refsect1>
</refentry>

