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

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

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:    PODNAMES.SDDL     -->
<!-- -->
<!--  Purpose:      This SDDL file defines relation PODNAMES-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who              Reason -->
<!-- - - - - - -   - - -   - - - -   - - - - - - - - - - - - - - - - - - - -->
<!--  09/18/96   31905    MARose  Original-->
<!--  05/07/02   45590    MSwam   Add podname index       -->
<!--  07/03/03   48821    CTB     Converted to XML format -->
<!--  04/16/11   68059    MSwam   add num_packets_recvd   -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

    <record name="PODNAM_TYPE">
           <description>This SDDL file defines relation PODNAMES. PODNAMES is
                  filled by OPUS data parititioning software whenever it
                  begins processing a new science POD (data) file.</description>
  

           <field name="ipppssoot">
                   <type>C*9</type>
                   <description>The name of the science observation</description>
           </field>

           <field name="podname">
                   <type>C*23</type>
                   <description>The name of the POD file (byte-swapped after receipt
                        from DDF) used as input to data partitioning.  The 
                        format of this field is

                        cc_aabb_yyyymmddhhmmss

                        where  cc = data product type (LZ=production, 
                                                       QL=quick-look, 
                                                       RT=real-time)
                               aa = srcid
                               bb = obsid
                               yyyy = year
                               mm = month (first mm)
                               hh = hour
                               mm = minutes (second mm)
                               ss = seconds

                        Example:  LZ_EB0C_19960805180300</description>
           </field>

           <field name="orphan_name">
                   <type>C*9</type>
                   <description>The name of a temporary science data file created 
                        by data partitioning.  If the pipeline cannot 
                        complete data partitioning processing, the orphan
                        file will contain the 'bad' packets which could not
                        be partitioned.  Sometimes orphan files are archived
                        to the PRB class for POD files that cannot be 
                        processed.</description>
           </field>

           <field name="num_packets_recvd">
                   <type>I*4</type>
                   <description>The count of packets received in the POD for this exposure</description>
           </field>

    </record>


    <relation name="podnames">

        <type>PODNAM_TYPE</type>

        <description>History of POD file processing in the OPUS pipeline</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="podnames_1">
            <type>unique clustered</type>
            <field name="ipppssoot"/>
            <field name="podname"/>
            <field name="orphan_name"/>
            <attr>ignore_dup_key</attr>
        </index>

        <index name="podnames_2">
            <type>nonclustered</type>
            <field name="podname"/>
        </index>

    </relation>


    <instance  name="PODNAMES" scope="global" type="PODNAM_TYPE" />
</sddl>
