{
{  PURPOSE:
{   This deck contains the type declarations for the processing sequence.
{   The processing sequence contains the information required in
{   installation processing.  The major components of the processing
{   sequence are the header record and the job, medium and subproduct
{   processing records.
{
{   In addition to the just mentioned components, the packing list pointers
{   and the installation catalog paths for the subproducts are stored in
{   the processing sequence.
{
{   An installation control record is used to access the different
{   components found in the processing sequence during processing.
{
{   The processing header contains the following fields:
{
{        INSTALLATION_IDENTIFIER  - A unique identifier assigned to
{            the installation event.   This is used for communication
{            between the user and the processing jobs.
{
{        INSTALLATION_COMMAND  - Gives the identifier for the command
{            that initiated the installation event.
{
{        COMMAND_COMPATIBLE_TYPES - Gives the subproduct type the
{            installation command can process.
{
{        INSTALLATION_DEFAULTS  - A copy of the installation
{            defaults at the time the installation event was requested.
{            This allows the evironment to be recreated in any batch job.
{
{        PACKING_LIST_NAME  - The name of the packing list being used
{            for this installation event.
{
{        PACKING_LIST_SEQ_REL_P  - The relative pointer to the packing list
{            when it is included as part of the processing sequence.  This
{            only occurs when the packing list must be modified for processing.
{            The pointer is set to NIL when the packing list is not part of
{            the processing sequence.
{
{        PACKING_LIST_SEQ_SIZE  - The size of the packing list in bytes.
{            This field is only meaningful when the packing list is included
{            as part of the processing sequence.
{
{        JOB_PROCESSING_REC_REL_P  - A relative pointer to the job processing
{            records.  This is used for locating the section when the
{            processing sequence is taken from a file.
{
{        MEDIUM_PROCESSING_REC_REL_P  - A relative pointer to the medium
{            processing records.  This is used for locating the section
{            when the processing sequence is taken from a file.
{
{        SUBPRODUCT_PROCESSING_REC_REL_P  - A relative pointer to the
{            subproduct processing records.  This is used for locating
{            the section when the processing sequence is taken from a file.
{
{        NUMBER_OF_STEPS  - The number of steps to be performed by this installation
{            event.
{
{        STEP_SET  - The set of steps to be performed.
{
{        SAVE_PREVIOUS_CYCLES  - Stores the boolean value of whether or not to save
{            previous cycles set on the originating command.  This field is used to
{            pass this information on to the activate command in a deferred situation.
{

  CONST
    rac$max_number_of_steps = 8;

  TYPE
    rat$job_count = rat$tape_count;

  TYPE
    rat$job_identifier = ost$name;

  TYPE
    rat$job_processing_rec_rel_p = REL (rat$processing_sequence)
          ^rat$job_processing_records;

  TYPE
    rat$job_processing_record = record
      job_identifier: rat$job_identifier,
      log_file_name: rat$log_file_name,
    recend,

    rat$job_processing_records = array [ * ] of
          rat$job_processing_record;

  TYPE
    rat$log_file_name = ost$name;

  TYPE
    rat$medium_processing_rec_rel_p = REL (rat$processing_sequence)
          ^rat$medium_processing_records;

  TYPE
    rat$medium_processing_record = record
      job_identifier: rat$job_identifier,
      subproduct_count: rat$subproduct_count,
    recend,

    rat$medium_processing_records = array [ * ] of
          rat$medium_processing_record;

  TYPE
    rat$packing_list_pointers = record
      sequence_p: ^rat$packing_list_sequence,
      sequence_descriptor_p: ^rat$sequence_descriptor,
      header_p: ^rat$packing_list_header,
      case order_medium: rat$order_medium of
      = rac$tape =
        tape_subproduct_indexer_p: ^rat$tape_subproduct_indexer,
        tape_vsns_p: ^rat$tape_vsns,
      = rac$disk =
        disk_subproduct_indexer_p: ^rat$disk_subproduct_indexer,
      casend,
    recend;

  TYPE
    rat$processing_header = record
      installation_identifier: rat$installation_identifier,
      installation_command: rat$installation_commands,
      command_compatible_type: rat$subproduct_type,
      installation_defaults: rat$installation_defaults,
      packing_list_name: ost$name,
      packing_list_seq_rel_p: REL (rat$processing_sequence)
            ^rat$packing_list_sequence,
      packing_list_seq_size: amt$file_length,
      job_processing_rec_rel_p: rat$job_processing_rec_rel_p,
      medium_processing_rec_rel_p: rat$medium_processing_rec_rel_p,
      subproduct_processing_rec_rel_p: rat$subp_processing_rec_rel_p,
      number_of_steps: rat$step_count,
      step_set: rat$step_selections,
      save_previous_cycles: boolean,
    recend;

  TYPE
    rat$processing_sequence = SEQ ( * );

  TYPE
    rat$step_count = 0 .. rac$max_number_of_steps;

  TYPE
    rat$steps = (rac$null_step, rac$reconcile_subproducts_step,
          rac$load_subproducts_step, rac$correct_subproducts_step,
          rac$stage_subproducts_step, rac$activate_subproducts_step,
          rac$execute_installer_proc_step, rac$update_directory_step,
          rac$delete_previous_cycles_step);

  TYPE
    rat$step_selections = set of rac$reconcile_subproducts_step ..
          rac$delete_previous_cycles_step;

  TYPE
    rat$step_status = (rac$step_started, rac$step_completed);

  TYPE
    rat$subp_processing_record = record
      job_identifier: rat$job_identifier,
      product_reference: rat$product_references,
      task_set: rat$task_selections,
      task: rat$tasks,
      task_status: rat$task_status,
      subproduct_info_pointers: rat$subproduct_info_pointers,
      installation_catalog_p: ^pft$path,
      installation_catalog_rel_p: REL (rat$processing_sequence) ^pft$path,
      active_level_catalog_rel_p: REL (rat$processing_sequence) ^pft$path,
      base_level_catalog_rel_p: REL (rat$processing_sequence) ^pft$path,
      correction_base_catalog_rel_p: REL (rat$processing_sequence) ^pft$path,
    recend,

    rat$subp_processing_records = array [ * ] of rat$subp_processing_record;

  TYPE
    rat$subp_processing_rec_rel_p = REL (rat$processing_sequence)
          ^rat$subp_processing_records;

  TYPE
    rat$tasks = (rac$null_task, rac$reconcile_file_cycles_task,
          rac$load_files_task, rac$correct_files_task, rac$stage_files_task,
          rac$activate_files_task, rac$execute_installer_proc_task,
          rac$update_directory_task, rac$delete_previous_cycles_task);

{  The positions of the ordinals in rat$tasks must not be altered.
{  This order reflects processing relationship.


  TYPE
    rat$task_selections = set of rac$reconcile_file_cycles_task ..
          rac$delete_previous_cycles_task;

  TYPE
    rat$task_status = (rac$task_started, rac$task_completed, rac$task_failed);

*copyc amt$file_length
*copyc ost$name
*copyc pft$path
*copyc rat$idb_directory_types
*copyc rat$installation_commands
*copyc rat$installation_defaults
*copyc rat$installation_identifier
*copyc rat$packing_list_sequence
*copyc rat$packing_list_types
*copyc rat$product_references
*copyc rat$subproduct_info_pointers
