<?xml version="1.0" encoding="UTF-8"?>

<!-- <!DOCTYPE sddlschema SYSTEM "sddlschema.xsd">-->

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    QBASTR_ARCHV.SDDL        -->
<!-- -->
<!--  Purpose:      This SDDL file defines relation QBASTR_ARCHV        -->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                    Reason-->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!--  19-JAN-96             PHyde          Original Implementaton-->
<!--  22-JAN-96             Ken Steuerman  Added descriptions-->
<!--  31-JUL-96    31905    MARose         Fixed typos to SDDLCOMP will work -->
<!--  17-Feb-98    35322    JSCHULTZ       add schdunit field-->
<!--  14-Mar-00    40435    Ken S.         Modify schdunit field length and-->
<!--                                       Description. -->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<lm>  12/17/03   49797     Gardner         Make index unique </lm>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->


    <record name="QBAARC_TYPE">

        <description>Contains astrometry archive description data.</description>

           <field name="program_id">
                   <type>C*3</type>
                   <description>A base 36 program id assigned to the
                               proposal by pm when a proposal has been
                               accepted.</description>
           </field>

           <field name="obset_id">
                   <type>C*2</type>
                   <description>The observation set id. these are numbered
                               sequentially throughout the proposal but may
                               appear in only one scheduling unit.</description>
           </field>

           <field name="ob_number">
                   <type>C*2</type>
                   <description>The observation id. these are numbered
                               sequentially throughout the proposal but
                               may appear in only one scheduling unit.</description>
           </field>

           <field name="astromy_file">
                   <type>C*9</type>
                   <description>The name given to describe a group of files.</description>
           </field>

           <field name="archdate">
                   <type>C*20</type>
                   <description>The latest file date associated with the
                               dataset.</description>
           </field>

           <field name="window_start">
                   <type>C*11</type>
                   <description>Corrected spacecraft time for first
                               minor frame in the file.  (UTC rounded
                               to the nearest second, in the format
                               YYDDDHHMMSS).</description>
           </field>

           <field name="window_stop">
                   <type>C*11</type>
                   <description>Corrected spacecraft time for last
                               minor frame in the file.  (UTC rounded
                               to the nearest second, in the format
                               YYDDDHHMMSS).</description>
           </field>

           <field name="format_id">
                   <type>C*2</type>
                   <description>Telemetry format ID.</description>
           </field>

           <field name="perc_complet">
                   <type>I*2</type>
                   <description>Percentage of expected minor frames for
                               the time interval that were actually
                               received.</description>
           </field>

           <field name="percent_bad">
                   <type>I*2</type>
                   <description>Percent of minor frames received with
                               bad quality to minor frames received.</description>
           </field>

           <field name="pdb_version">
                   <type>C*8</type>
                   <description>PDB tape ID number.</description>
           </field>

           <field name="environment">
                   <type>C*8</type>
                   <description>AEDP environment tape name.</description>
           </field>

           <field name="ast_success">
                   <type>C*2</type>
                   <description>Success of failure of extracting
                               the astrometry observation,
                               where:
                                       SS---success (7 total files)
                                       FF---failure (4 total files)</description>
           </field>

           <field name="file_cnt">
                   <type>I*2</type>
                   <description>Information set file count when it becomes
                               available for archiving.</description>
           </field>

           <field name="schdunit">
                   <type>C*23</type>
                   <description>Scheduling Unit name that was used to
                               process the observation.  It is of the form
                               YYDDDHHMMSS_YYDDDHHMMSS for the start and
                               stop times of the OMS scheduling unit.</description>
           </field>

    </record>


    <relation name="qbastr_archv">

        <type>QBAARC_TYPE</type>

        <description></description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="qbastr_archv_1">
            <type>unique clustered</type>
            <field name="program_id"/>
            <field name="obset_id"/>
            <field name="ob_number"/>
            <field name="archdate"/>
            <field name="ast_success"/>
        </index>

        <index name="qbastr_archv_2">
            <type>nonclustered</type>
            <field name="astromy_file"/>
        </index>

    </relation>


    <instance  name="qbastr_archv" scope="global" type="QBAARC_TYPE" />

</sddl>
