{
{   This deck contains the type declarations for the packing list sequence.
{   The fields for the major components are documented here:
{
{   The RAT$PACKING_LIST_HEADER record is a variant record containing the
{   following records and fields:
{
{     ORDER_IDENTIFIER  - Identifies the order as unique name.  This value
{                  is also used as the packing list name when installed in
{                  the IDB at the site.
{
{                  Defined by user with DEFINE_ORDER.
{
{                  Used by PACS and INSS.
{
{     ORDER_TYPE  - The order type the packing list is defined for.  The
{                  possible key values are rac$release_order or
{                  rac$correction_order.
{
{                  Defined by user with DEFINE_ORDER.
{
{                  Used by PACS and INSS.
{
{     SUBPRODUCT_COUNT  - The number of subproducts in the order.  This
{                  is also the size of the subproduct indexer.
{
{                  Defined by WRITE_DEFINITION as a result of
{                  ADD_SUBPRODUCT.
{
{                  Used by PACS and INSS.
{
{     TAPE_CLASS  - The device class of the tapes for this order.
{
{                  Defined by user with DEFINE_TAPE_ATTRIBUTES.
{
{                  Used by INSS.
{
{         ** Because of compatibility reasons this field was placed here at 1.4.2.
{         Logically it belongs with the tape fields.  If or when compatibility is
{         to be broken, this field should be moved under the tape case.
{
{     TAPE_DENSITY  - The density of the tapes for this order.
{
{                  Defined by user with DEFINE_TAPE_ATTRIBUTES.
{
{                  Used by INSS.
{
{         ** Because of compatibility reasons this field was placed here at 1.4.2.
{         Logically it belongs with the tape fields.  If or when compatibility is
{         to be broken, this field should be moved under the tape case.
{
{     UNUSED  - Space available for future fields as needed.  This is
{                  described in bytes.
{
{     ORDER_MEDIUM  - The medium the order is written to.  The possible
{                  choices are rac$tape or rac$disk.
{
{                  Defined by user with DEFINE_ORDER.
{
{                  Used by PACS and INSS.
{
{
{   The following fields is available when the order medium is RAC$TAPE:
{
{     PRIMARY_TAPE_COUNT  - Number of primary tapes defined for the order.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     TAPE_VSNS_P  - Relative pointer to an array of rat$tape_vsn
{                  records.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by PACS and INSS.
{
{     TAPE_SUBPRODUCT_INDEXER_P  - Relative pointer to an array of
{                  rat$tape_subproduct_index records.
{
{                  Defined by WRITE_DEFINITION as a result of
{                  ADD_SUBPRODUCT.
{
{                  Used by PACS and INSS.
{
{
{   The following fields are available when the order medium is RAC$DISK:
{
{     DISK_PATH  - The path to the disk file that contains the backup of
{                  the packing list and the disk_backup_catalog.  This
{                  field is set after the packing list is installed at
{                  the site.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     DISK_BACKUP_CATALOG  - The path to the catalog that was backed up
{                  to create the disk file.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     DISK_SUBPRODUCT_INDEXER_P  - Relative pointer to an array of
{                  rat$disk_subproduct_index records.
{
{                  Defined by WRITE_DEFINITION as a result of
{                  ADD_SUBPRODUCT.
{
{                 Used by PACS and INSS.
{
{
{   Each RAT$TAPE_VSN record contains the following fields:
{
{     EXTERNAL_VSN  - External tape label.
{
{                  Defined by user with DEFINE_TAPE_ATTRIBUTES.
{
{                  Used by INSS.
{
{     RECORDED_VSN  - Recorded tape label.  This must be the same as the
{                  recorded VSN for automatic tape recognition.
{
{                  Defined by DEFINE_TAPE_ATTRIBUTES (same value as
{                  external vsn).
{
{                  Used by INSS.
{
{     ADDITIONAL_VOLUME_P  - A relative pointer to a rat$tape_vsn record
{                  when there is an additional volume for the primary tape.
{                  The pointer is set to NIL when there are no more
{                  additional tape volumes.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{
{   Each RAT$DISK_SUBPRODUCT_INDEX record contains the following fields:
{
{     SEQ_LENGTH  - The length of the subproduct info sequence referenced
{                  by this record.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     SEQ_P  - A relative pointer of type cell to the subproduct info
{                  sequence.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     BACKUP_FILE  - The name of the file in the disk_backup_catalog
{                  which contains the backup of the subproduct.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     AUTO_INSTALL  - Boolean specifying if the subproduct represented
{                  by this record is auto installed or not.
{
{                  Defined by user with ADD_SUBPRODUCT.
{
{                  Used by INSS.
{
{
{   Each RAT$TAPE_SUBPRODUCT_INDEX record contains the following fields:
{
{     SEQ_LENGTH  - The length of the subproduct info sequence referenced
{                  by this record.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     SEQ_P  - A relative pointer of type cell to the subproduct info
{                  sequence.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     PRIMARY_TAPE_VSN  - Contains the index into the rat$tape_vsns
{                  array for the tape record belonging to the tape this
{                  subproduct is associated with.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     TAPE_FILE_SEQUENCE_NUMBER  - The position on the tape the subproduct
{                  resides.
{
{                  Defined by WRITE_DEFINITION.
{
{                  Used by INSS.
{
{     AUTO_INSTALL  - Boolean specifying if the subproduct represented
{                  by this record is auto installed or not.
{
{                  Defined by user with ADD_SUBPRODUCT.
{
{                  Used by INSS.
{


  CONST
    rac$max_number_of_tapes = 36;

  TYPE
    rat$additional_volume_p = REL (rat$packing_list_sequence) ^rat$tape_vsn;

  TYPE
    rat$tape_count = 0 .. rac$max_number_of_tapes;

  TYPE
    rat$disk_subproduct_index = record
      subproduct_seq_length: amt$file_length,
      subproduct_seq_p: rat$subproduct_info_p,
      backup_file: ost$name,
      auto_install: boolean,
    recend,

    rat$disk_subproduct_indexer = array [ * ] of rat$disk_subproduct_index;

  TYPE
    rat$disk_subproduct_indexer_p = REL (rat$packing_list_sequence)
          ^rat$disk_subproduct_indexer;

  TYPE
    rat$file_path = string (fsc$max_path_size);

  TYPE
    rat$order_medium = (rac$tape, rac$disk);

  TYPE
    rat$packing_list_header = record
      order_identifier: ost$name,
      order_type: rat$subproduct_type,
      subproduct_count: rat$subproduct_count,
      tape_class: rmt$tape_class,
      tape_density: rmt$density,
      unused: array [1 .. 46] of cell,
      case order_medium: rat$order_medium of
      = rac$tape =
        primary_tape_count: rat$tape_count,
        tape_vsns_p: rat$tape_vsns_p,
        tape_subproduct_indexer_p: rat$tape_subproduct_indexer_p,
      = rac$disk =
        disk_path: rat$file_path,
        disk_backup_catalog: rat$file_path,
        disk_subproduct_indexer_p: rat$disk_subproduct_indexer_p,
      casend,
    recend;

  TYPE
    rat$release_level = string (6);

  TYPE
    rat$tape_subproduct_index = record
      subproduct_seq_length: amt$file_length,
      subproduct_seq_p: rat$subproduct_info_p,
      primary_tape_vsn: rat$tape_count,
      tape_file_sequence_number: 1 .. 9999,
      auto_install: boolean,
    recend,

    rat$tape_subproduct_indexer = array [ * ] of rat$tape_subproduct_index;

  TYPE
    rat$tape_subproduct_indexer_p = REL (rat$packing_list_sequence)
          ^rat$tape_subproduct_indexer;

  TYPE
    rat$tape_vsn = record
      external_vsn: rmt$external_vsn,
      recorded_vsn: rmt$recorded_vsn,
      additional_volume_p: rat$additional_volume_p,
    recend;

  TYPE
    rat$tape_vsns = array [ * ] of rat$tape_vsn;

  TYPE
    rat$tape_vsns_p = REL (rat$packing_list_sequence) ^rat$tape_vsns;

*copyc fsc$max_path_size
*copyc amt$file_length
*copyc ost$name
*copyc rat$packing_list_sequence
*copyc rat$subproduct_count
*copyc rat$subproduct_info_p
*copyc rat$subproduct_type
*copyc rmt$density
*copyc rmt$external_vsn
*copyc rmt$recorded_vsn
*copyc rmt$tape_class

