?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Object Code Maintenance: Create Program Description' ??
MODULE ocm$define_program;

{
{ PURPOSE:
{   To create a program description and add, replace or combine
{   it on the new object library.
{

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clt$parameter_list
*copyc llt$object_library_header
*copyc llt$program_description
*copyc oce$library_generator_errors
*copyc oct$display_toggles
*copyc ost$status
?? POP ??
*copyc avp$get_capability
*copyc clp$count_list_elements
*copyc clp$evaluate_parameters
*copyc i#current_sequence_position
*copyc ocp$add_an_nlm
*copyc ocp$close_all_open_files
*copyc ocp$create_an_nlm
*copyc ocp$initialize_olg_working_heap
*copyc ocp$search_nlm_tree
*copyc ocv$nlm_list
*copyc ocv$olg_scratch_seq
*copyc ocv$olg_working_heap
*copyc ocv$open_file_list
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc pmp$continue_to_cause
*copyc pmp$disestablish_cond_handler
*copyc pmp$establish_condition_handler
*copyc pmp$get_date
*copyc pmp$get_time
?? OLDTITLE ??
?? NEWTITLE := 'ocp$_create_program_description', EJECT ??

  PROCEDURE [XDCL] ocp$_create_program_description
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (ocm$creol_crepd) create_program_description, crepd (
{   name, names, n: record
{       name: program_name
{       aliases: list rest of program_name = $optional
{     recend = $required
{   file, files, f, object_files: list of any of
{       file
{       string
{     anyend = $optional
{   library, libraries, l: list of any of
{       key
{         osf$task_services_library, osf$current_library
{       keyend
{       file
{       string
{     anyend = $optional
{   module, modules, m: list of program_name = $optional
{   starting_procedure, sp: program_name = $optional
{   load_map, lm: (BY_NAME) any of
{       file
{       string
{     anyend = $optional
{   load_map_option, load_map_options, lmo: (BY_NAME) any of
{       key
{         all, none
{       keyend
{       list of key
{         (segment, s)
{         (block, b)
{         (entry_point, ep)
{         (cross_reference, cr, xref)
{       keyend
{     anyend = $optional
{   termination_error_level, tel: (BY_NAME) key
{       (warning, w)
{       (error, e)
{       (fatal, f)
{     keyend = $optional
{   preset_value, pv: (BY_NAME) key
{       (zero, z)
{       (floating_point_indefinite, fpi)
{       (infinity, i)
{       (alternate_ones, ao)
{     keyend = $optional
{   stack_size, ss: (BY_NAME) integer 0..osc$max_segment_length = $optional
{   abort_file, af: (BY_NAME) any of
{       file
{       string
{     anyend = $optional
{   debug_input, di: (BY_NAME) any of
{       file
{       string
{     anyend = $optional
{   debug_output, do: (BY_NAME) any of
{       file
{       string
{     anyend = $optional
{   debug_mode, dm: (BY_NAME) boolean = $optional
{   availability, a: (BY_NAME) key
{       (normal_usage, a, advertised, nu)
{       (advanced_usage, au)
{       (hidden, h)
{     keyend = normal_usage
{   scope, s: (BY_NAME) key
{       (xdcl, x)
{       (gate, g)
{       (local, l)
{     keyend = xdcl
{   log_option, lo: (BY_NAME) key
{       (automatic, a)
{       (manual, m)
{     keyend = automatic
{   merge_option, mo: (BY_NAME) key
{       (add, a)
{       (replace, r)
{       (combine, c)
{     keyend = combine
{   application_identifier, ai: (BY_NAME, ADVANCED) name = $optional
{   arithmetic_overflow, ao: (BY_NAME, ADVANCED) boolean = $optional
{   arithmetic_loss_of_significance, alos: (BY_NAME, ADVANCED) boolean = $optional
{   divide_fault, df: (BY_NAME, ADVANCED) boolean = $optional
{   exponent_overflow, eo: (BY_NAME, ADVANCED) boolean = $optional
{   exponent_underflow, eu: (BY_NAME, ADVANCED) boolean = $optional
{   fp_indefinite, fpi, fi: (BY_NAME, ADVANCED) boolean = $optional
{   fp_loss_of_significance, fplos, flos: (BY_NAME, ADVANCED) boolean = $optional
{   invalid_bdp_data, ibdpd, ibd: (BY_NAME, ADVANCED) boolean = $optional
{   status)

?? PUSH (LISTEXT := ON) ??
?? FMT (FORMAT := OFF) ??

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 64] of clt$pdt_parameter_name,
      parameters: array [1 .. 28] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$record_type_qualifier,
        field_spec_1: clt$field_specification,
        element_type_spec_1: record
          header: clt$type_specification_header,
        recend,
        field_spec_2: clt$field_specification,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier_v2,
          element_type_spec: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$string_type_qualifier,
          recend,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 2] of clt$keyword_specification,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
          recend,
          type_size_3: clt$type_specification_size,
          element_type_spec_3: record
            header: clt$type_specification_header,
            qualifier: clt$string_type_qualifier,
          recend,
        recend,
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type5: record
        header: clt$type_specification_header,
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 2] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier_v2,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 9] of clt$keyword_specification,
          recend,
        recend,
      recend,
      type8: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 6] of clt$keyword_specification,
      recend,
      type9: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 8] of clt$keyword_specification,
      recend,
      type10: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
      type11: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend,
      type12: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend,
      type13: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend,
      type14: record
        header: clt$type_specification_header,
      recend,
      type15: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 8] of clt$keyword_specification,
        default_value: string (12),
      recend,
      type16: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 6] of clt$keyword_specification,
        default_value: string (4),
      recend,
      type17: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
        default_value: string (9),
      recend,
      type18: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 6] of clt$keyword_specification,
        default_value: string (7),
      recend,
      type19: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type20: record
        header: clt$type_specification_header,
      recend,
      type21: record
        header: clt$type_specification_header,
      recend,
      type22: record
        header: clt$type_specification_header,
      recend,
      type23: record
        header: clt$type_specification_header,
      recend,
      type24: record
        header: clt$type_specification_header,
      recend,
      type25: record
        header: clt$type_specification_header,
      recend,
      type26: record
        header: clt$type_specification_header,
      recend,
      type27: record
        header: clt$type_specification_header,
      recend,
      type28: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [92, 3, 20, 14, 14, 18, 294],
    clc$command, 64, 28, 1, 9, 0, 0, 28, 'OCM$CREOL_CREPD'], [
    ['A                              ',clc$abbreviation_entry, 15],
    ['ABORT_FILE                     ',clc$nominal_entry, 11],
    ['AF                             ',clc$abbreviation_entry, 11],
    ['AI                             ',clc$abbreviation_entry, 19],
    ['ALOS                           ',clc$abbreviation_entry, 21],
    ['AO                             ',clc$abbreviation_entry, 20],
    ['APPLICATION_IDENTIFIER         ',clc$nominal_entry, 19],
    ['ARITHMETIC_LOSS_OF_SIGNIFICANCE',clc$nominal_entry, 21],
    ['ARITHMETIC_OVERFLOW            ',clc$nominal_entry, 20],
    ['AVAILABILITY                   ',clc$nominal_entry, 15],
    ['DEBUG_INPUT                    ',clc$nominal_entry, 12],
    ['DEBUG_MODE                     ',clc$nominal_entry, 14],
    ['DEBUG_OUTPUT                   ',clc$nominal_entry, 13],
    ['DF                             ',clc$abbreviation_entry, 22],
    ['DI                             ',clc$abbreviation_entry, 12],
    ['DIVIDE_FAULT                   ',clc$nominal_entry, 22],
    ['DM                             ',clc$abbreviation_entry, 14],
    ['DO                             ',clc$abbreviation_entry, 13],
    ['EO                             ',clc$abbreviation_entry, 23],
    ['EU                             ',clc$abbreviation_entry, 24],
    ['EXPONENT_OVERFLOW              ',clc$nominal_entry, 23],
    ['EXPONENT_UNDERFLOW             ',clc$nominal_entry, 24],
    ['F                              ',clc$alias_entry, 2],
    ['FI                             ',clc$abbreviation_entry, 25],
    ['FILE                           ',clc$nominal_entry, 2],
    ['FILES                          ',clc$alias_entry, 2],
    ['FLOS                           ',clc$abbreviation_entry, 26],
    ['FPI                            ',clc$alias_entry, 25],
    ['FPLOS                          ',clc$alias_entry, 26],
    ['FP_INDEFINITE                  ',clc$nominal_entry, 25],
    ['FP_LOSS_OF_SIGNIFICANCE        ',clc$nominal_entry, 26],
    ['IBD                            ',clc$abbreviation_entry, 27],
    ['IBDPD                          ',clc$alias_entry, 27],
    ['INVALID_BDP_DATA               ',clc$nominal_entry, 27],
    ['L                              ',clc$abbreviation_entry, 3],
    ['LIBRARIES                      ',clc$alias_entry, 3],
    ['LIBRARY                        ',clc$nominal_entry, 3],
    ['LM                             ',clc$abbreviation_entry, 6],
    ['LMO                            ',clc$abbreviation_entry, 7],
    ['LO                             ',clc$abbreviation_entry, 17],
    ['LOAD_MAP                       ',clc$nominal_entry, 6],
    ['LOAD_MAP_OPTION                ',clc$nominal_entry, 7],
    ['LOAD_MAP_OPTIONS               ',clc$alias_entry, 7],
    ['LOG_OPTION                     ',clc$nominal_entry, 17],
    ['M                              ',clc$abbreviation_entry, 4],
    ['MERGE_OPTION                   ',clc$nominal_entry, 18],
    ['MO                             ',clc$abbreviation_entry, 18],
    ['MODULE                         ',clc$nominal_entry, 4],
    ['MODULES                        ',clc$alias_entry, 4],
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$nominal_entry, 1],
    ['NAMES                          ',clc$alias_entry, 1],
    ['OBJECT_FILES                   ',clc$abbreviation_entry, 2],
    ['PRESET_VALUE                   ',clc$nominal_entry, 9],
    ['PV                             ',clc$abbreviation_entry, 9],
    ['S                              ',clc$abbreviation_entry, 16],
    ['SCOPE                          ',clc$nominal_entry, 16],
    ['SP                             ',clc$abbreviation_entry, 5],
    ['SS                             ',clc$abbreviation_entry, 10],
    ['STACK_SIZE                     ',clc$nominal_entry, 10],
    ['STARTING_PROCEDURE             ',clc$nominal_entry, 5],
    ['STATUS                         ',clc$nominal_entry, 28],
    ['TEL                            ',clc$abbreviation_entry, 8],
    ['TERMINATION_ERROR_LEVEL        ',clc$nominal_entry, 8]],
    [
{ PARAMETER 1
    [51, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 101, clc$required_parameter, 0, 0],
{ PARAMETER 2
    [25, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 47, clc$optional_parameter, 0, 0],
{ PARAMETER 3
    [37, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 132, clc$optional_parameter, 0, 0],
{ PARAMETER 4
    [48, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 19, clc$optional_parameter, 0, 0],
{ PARAMETER 5
    [61, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 6
    [41, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 31, clc$optional_parameter, 0, 0],
{ PARAMETER 7
    [42, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 457, clc$optional_parameter, 0, 0],
{ PARAMETER 8
    [64, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 229, clc$optional_parameter, 0, 0],
{ PARAMETER 9
    [54, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 303, clc$optional_parameter, 0, 0],
{ PARAMETER 10
    [60, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 20, clc$optional_parameter, 0, 0],
{ PARAMETER 11
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 31, clc$optional_parameter, 0, 0],
{ PARAMETER 12
    [11, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 31, clc$optional_parameter, 0, 0],
{ PARAMETER 13
    [13, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 31, clc$optional_parameter, 0, 0],
{ PARAMETER 14
    [12, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 15
    [10, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 303, clc$optional_default_parameter, 0, 12],
{ PARAMETER 16
    [57, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 229, clc$optional_default_parameter, 0, 4],
{ PARAMETER 17
    [44, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 155, clc$optional_default_parameter, 0, 9],
{ PARAMETER 18
    [46, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 229, clc$optional_default_parameter, 0, 7],
{ PARAMETER 19
    [7, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 5, clc$optional_parameter, 0, 0],
{ PARAMETER 20
    [9, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 21
    [8, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 22
    [16, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 23
    [21, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 24
    [22, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 25
    [30, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 26
    [31, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 27
    [34, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],
{ PARAMETER 28
    [62, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$record_type], [2],
    ['NAME                           ', clc$required_field, 3], [[1, 0,
  clc$program_name_type]],
    ['ALIASES                        ', clc$optional_field, 19], [[1, 0,
  clc$list_type], [3, 0, clc$max_list_size, 0, FALSE, TRUE],
        [[1, 0, clc$program_name_type]]
      ]
    ],
{ PARAMETER 2
    [[1, 0, clc$list_type], [31, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$file_type,
      clc$string_type],
      TRUE, 2],
      3, [[1, 0, clc$file_type]],
      8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
      ]
    ],
{ PARAMETER 3
    [[1, 0, clc$list_type], [116, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$union_type], [[clc$file_type,
      clc$keyword_type, clc$string_type],
      FALSE, 3],
      81, [[1, 0, clc$keyword_type], [2], [
        ['OSF$CURRENT_LIBRARY            ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
        ['OSF$TASK_SERVICES_LIBRARY      ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
        ],
      3, [[1, 0, clc$file_type]],
      8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
      ]
    ],
{ PARAMETER 4
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$program_name_type]]
    ],
{ PARAMETER 5
    [[1, 0, clc$program_name_type]],
{ PARAMETER 6
    [[1, 0, clc$union_type], [[clc$file_type, clc$string_type],
    TRUE, 2],
    3, [[1, 0, clc$file_type]],
    8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
    ],
{ PARAMETER 7
    [[1, 0, clc$union_type], [[clc$keyword_type,
    clc$list_type],
    FALSE, 2],
    81, [[1, 0, clc$keyword_type], [2], [
      ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
      ['NONE                           ', clc$nominal_entry,
  clc$normal_usage_entry, 2]]
      ],
    356, [[1, 0, clc$list_type], [340, 1, clc$max_list_size, 0, FALSE, FALSE],
        [[1, 0, clc$keyword_type], [9], [
        ['B                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
        ['BLOCK                          ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
        ['CR                             ', clc$alias_entry,
  clc$normal_usage_entry, 4],
        ['CROSS_REFERENCE                ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
        ['ENTRY_POINT                    ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
        ['EP                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
        ['S                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
        ['SEGMENT                        ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
        ['XREF                           ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4]]
        ]
      ]
    ],
{ PARAMETER 8
    [[1, 0, clc$keyword_type], [6], [
    ['E                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['ERROR                          ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['F                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['FATAL                          ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['W                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['WARNING                        ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 9
    [[1, 0, clc$keyword_type], [8], [
    ['ALTERNATE_ONES                 ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
    ['AO                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
    ['FLOATING_POINT_INDEFINITE      ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['FPI                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['I                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['INFINITY                       ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['Z                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['ZERO                           ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
    ],
{ PARAMETER 10
    [[1, 0, clc$integer_type], [0, osc$max_segment_length, 10]],
{ PARAMETER 11
    [[1, 0, clc$union_type], [[clc$file_type, clc$string_type],
    TRUE, 2],
    3, [[1, 0, clc$file_type]],
    8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
    ],
{ PARAMETER 12
    [[1, 0, clc$union_type], [[clc$file_type, clc$string_type],
    TRUE, 2],
    3, [[1, 0, clc$file_type]],
    8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
    ],
{ PARAMETER 13
    [[1, 0, clc$union_type], [[clc$file_type, clc$string_type],
    TRUE, 2],
    3, [[1, 0, clc$file_type]],
    8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
    ],
{ PARAMETER 14
    [[1, 0, clc$boolean_type]],
{ PARAMETER 15
    [[1, 0, clc$keyword_type], [8], [
    ['A                              ', clc$alias_entry,
  clc$normal_usage_entry, 1],
    ['ADVANCED_USAGE                 ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['ADVERTISED                     ', clc$alias_entry,
  clc$normal_usage_entry, 1],
    ['AU                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['H                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['HIDDEN                         ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['NORMAL_USAGE                   ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['NU                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1]]
    ,
    'normal_usage'],
{ PARAMETER 16
    [[1, 0, clc$keyword_type], [6], [
    ['G                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['GATE                           ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['L                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['LOCAL                          ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['X                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['XDCL                           ', clc$nominal_entry,
  clc$normal_usage_entry, 1]]
    ,
    'xdcl'],
{ PARAMETER 17
    [[1, 0, clc$keyword_type], [4], [
    ['A                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['AUTOMATIC                      ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['M                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['MANUAL                         ', clc$nominal_entry,
  clc$normal_usage_entry, 2]]
    ,
    'automatic'],
{ PARAMETER 18
    [[1, 0, clc$keyword_type], [6], [
    ['A                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['ADD                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['C                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['COMBINE                        ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['R                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['REPLACE                        ', clc$nominal_entry,
  clc$normal_usage_entry, 2]]
    ,
    'combine'],
{ PARAMETER 19
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 20
    [[1, 0, clc$boolean_type]],
{ PARAMETER 21
    [[1, 0, clc$boolean_type]],
{ PARAMETER 22
    [[1, 0, clc$boolean_type]],
{ PARAMETER 23
    [[1, 0, clc$boolean_type]],
{ PARAMETER 24
    [[1, 0, clc$boolean_type]],
{ PARAMETER 25
    [[1, 0, clc$boolean_type]],
{ PARAMETER 26
    [[1, 0, clc$boolean_type]],
{ PARAMETER 27
    [[1, 0, clc$boolean_type]],
{ PARAMETER 28
    [[1, 0, clc$status_type]]];

?? FMT (FORMAT := ON) ??
?? POP ??

    CONST
      p$name = 1,
      p$file = 2,
      p$library = 3,
      p$module = 4,
      p$starting_procedure = 5,
      p$load_map = 6,
      p$load_map_option = 7,
      p$termination_error_level = 8,
      p$preset_value = 9,
      p$stack_size = 10,
      p$abort_file = 11,
      p$debug_input = 12,
      p$debug_output = 13,
      p$debug_mode = 14,
      p$availability = 15,
      p$scope = 16,
      p$log_option = 17,
      p$merge_option = 18,
      p$application_identifier = 19,
      p$arithmetic_overflow = 20,
      p$arithmetic_loss_of_significan = 21 {ARITHMETIC_LOSS_OF_SIGNIFICANCE} ,
      p$divide_fault = 22,
      p$exponent_overflow = 23,
      p$exponent_underflow = 24,
      p$fp_indefinite = 25,
      p$fp_loss_of_significance = 26,
      p$invalid_bdp_data = 27,
      p$status = 28;

    VAR
      pvt: array [1 .. 28] of clt$parameter_value;

    VAR
      alias_list: ^pmt$module_list,
      alias_number: clt$list_size,
      application_administrator: boolean,
      application_identifier: ^llt$application_identifier,
      date: ost$date,
      enable_inhibit_conditions: ^pmt$enable_inhibit_conditions,
      ignore_status: ost$status,
      library_number: clt$list_size,
      member: ^SEQ ( * ),
      member_size: ost$segment_length,
      module_already_exists: boolean,
      module_description: ^oct$module_description,
      module_list: ^pmt$module_list,
      module_number: clt$list_size,
      nlm: ^oct$new_library_module_list,
      node: ^clt$data_value,
      number_of_libraries: clt$list_size,
      number_of_modules: clt$list_size,
      number_of_object_files: clt$list_size,
      object_file_list: ^llt$object_file_list,
      object_file_number: clt$list_size,
      object_library_list: ^llt$object_library_list,
      program_attributes: ^llt$program_attributes,
      program_description_header: ^llt$library_member_header,
      sequence: ^SEQ ( * ),
      size: ost$segment_length,
      time: ost$time;

    VAR
      established_conditions: pmt$condition,
      established_descriptor: pmt$established_handler;

?? NEWTITLE := 'condition_handler', EJECT ??

{ PURPOSE:
{   The purpose of this procedure is to handle the terminate break and
{   block exit conditions.

    PROCEDURE condition_handler
      (    condition: pmt$condition;
           condition_descriptor: ^pmt$condition_information;
           stack_frame_save_area_p: ^ost$stack_frame_save_area;
       VAR handler_status: ost$status);

      IF (condition.selector = ifc$interactive_condition) AND
            (condition.interactive_condition = ifc$terminate_break) THEN

{ Ignore the condition.

        RETURN;
      ELSEIF condition.selector = pmc$block_exit_processing THEN
        ocp$close_all_open_files (ocv$open_file_list);
        ocp$initialize_olg_working_heap;
        RESET ocv$olg_scratch_seq;
      ELSE
        pmp$continue_to_cause (pmc$execute_standard_procedure, handler_status);
      IFEND;

    PROCEND condition_handler;
?? OLDTITLE ??
?? NEWTITLE := 'set_system_condition_parameter', EJECT ??

    PROCEDURE [INLINE] set_system_condition_parameter
      (    parameter_number: clt$parameter_number;
           system_condition: pmt$system_condition);


      IF pvt [parameter_number].specified THEN
        IF NOT (pmc$condition_specified IN program_attributes^.contents) THEN
          program_attributes^.contents := program_attributes^.contents +
                $pmt$prog_description_contents [pmc$condition_specified];
          NEXT enable_inhibit_conditions IN ocv$olg_scratch_seq;
          enable_inhibit_conditions^.enable_system_conditions := $pmt$system_conditions [];
          enable_inhibit_conditions^.inhibit_system_conditions := $pmt$system_conditions [];
        IFEND;
        IF pvt [parameter_number].value^.boolean_value.value THEN
          enable_inhibit_conditions^.enable_system_conditions :=
                enable_inhibit_conditions^.enable_system_conditions + $pmt$system_conditions
                [system_condition];
        ELSE
          enable_inhibit_conditions^.inhibit_system_conditions :=
                enable_inhibit_conditions^.inhibit_system_conditions +
                $pmt$system_conditions [system_condition];
        IFEND;
      IFEND;

    PROCEND set_system_condition_parameter;
?? OLDTITLE, EJECT ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    RESET ocv$olg_scratch_seq;

    pmp$get_time (osc$hms_time, time, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    pmp$get_date (osc$mdy_date, date, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    established_conditions.selector := pmc$condition_combination;
    established_conditions.combination := $pmt$condition_combination
          [ifc$interactive_condition, pmc$block_exit_processing];
    pmp$establish_condition_handler (established_conditions, ^condition_handler, ^established_descriptor,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /protect/
    BEGIN

      NEXT program_description_header IN ocv$olg_scratch_seq;
      IF program_description_header = NIL THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;

      program_description_header^.name := pvt [p$name].value^.field_values^ [1].value^.program_name_value;

      IF pvt [p$application_identifier].specified THEN
        avp$get_capability (avc$application_administration, avc$user, application_administrator, status);
        IF NOT status.normal THEN
          EXIT /protect/;
        IFEND;
        IF NOT application_administrator THEN
          osp$set_status_condition (oce$not_application_administrtr, status);
          EXIT /protect/;
        IFEND;
        NEXT application_identifier IN ocv$olg_scratch_seq;
        IF application_identifier = NIL THEN
          osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
          RETURN;
        IFEND;
        application_identifier^.name := pvt [p$application_identifier].value^.name_value;
        program_description_header^.kind := llc$applic_program_description;
      ELSE
        program_description_header^.kind := llc$program_description;
      IFEND;

      program_description_header^.time_created := time;
      program_description_header^.date_created := date;
      program_description_header^.generator_id := llc$object_library_generator;
      program_description_header^.generator_name_vers := occ$generator_name CAT llc$object_library_version;
      program_description_header^.commentary := osc$null_name;

      program_description_header^.number_of_aliases := clp$count_list_elements
            (pvt [p$name].value^.field_values^ [2].value);

      IF program_description_header^.number_of_aliases <> 0 THEN
        NEXT alias_list: [1 .. program_description_header^.number_of_aliases] IN ocv$olg_scratch_seq;
        IF alias_list = NIL THEN
          osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
          RETURN;
        IFEND;
        node := pvt [p$name].value^.field_values^ [2].value;
        FOR alias_number := 1 TO program_description_header^.number_of_aliases DO
          alias_list^ [alias_number] := node^.element_value^.program_name_value;
          node := node^.link;
        FOREND;
      IFEND;

      IF pvt [p$availability].value^.keyword_value = 'HIDDEN' THEN
        program_description_header^.command_function_availability := clc$hidden_entry;
      ELSEIF pvt [p$availability].value^.keyword_value = 'ADVANCED_USAGE' THEN
        program_description_header^.command_function_availability := clc$advanced_usage_entry;
      ELSE {NORMAL_USAGE}
        program_description_header^.command_function_availability := clc$normal_usage_entry;
      IFEND;

      IF pvt [p$scope].value^.keyword_value = 'XDCL' THEN
        program_description_header^.command_function_kind := llc$entry_point;
      ELSEIF pvt [p$scope].value^.keyword_value = 'GATE' THEN
        program_description_header^.command_function_kind := llc$gate;
      ELSE {LOCAL}
        program_description_header^.command_function_kind := llc$local_to_library;
      IFEND;

      IF pvt [p$log_option].value^.keyword_value = 'AUTOMATIC' THEN
        program_description_header^.command_log_option := clc$automatically_log;
      ELSE {MANUAL}
        program_description_header^.command_log_option := clc$manually_log;
      IFEND;

      NEXT program_attributes IN ocv$olg_scratch_seq;
      IF program_attributes = NIL THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;

      program_attributes^.contents := $pmt$prog_description_contents [];

      number_of_object_files := clp$count_list_elements (pvt [p$file].value);
      IF number_of_object_files <> 0 THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$object_file_list_specified];
        program_attributes^.number_of_object_files := number_of_object_files;
        NEXT object_file_list: [1 .. number_of_object_files] IN ocv$olg_scratch_seq;
        IF object_file_list = NIL THEN
          osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
          RETURN;
        IFEND;
        node := pvt [p$file].value;
        FOR object_file_number := 1 TO number_of_object_files DO
          IF node^.element_value^.kind = clc$file THEN
            object_file_list^ [object_file_number] := node^.element_value^.file_value^;
          ELSE {clc$string}
            object_file_list^ [object_file_number] := node^.element_value^.string_value^;
          IFEND;
          node := node^.link;
        FOREND;
      IFEND;

      number_of_modules := clp$count_list_elements (pvt [p$module].value);
      IF number_of_modules <> 0 THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$module_list_specified];
        program_attributes^.number_of_modules := number_of_modules;
        NEXT module_list: [1 .. number_of_modules] IN ocv$olg_scratch_seq;
        IF module_list = NIL THEN
          osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
          RETURN;
        IFEND;
        node := pvt [p$module].value;
        FOR module_number := 1 TO number_of_modules DO
          module_list^ [module_number] := node^.element_value^.program_name_value;
          node := node^.link;
        FOREND;
      IFEND;

      number_of_libraries := clp$count_list_elements (pvt [p$library].value);
      IF number_of_libraries <> 0 THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$library_list_specified];
        program_attributes^.number_of_libraries := number_of_libraries;
        NEXT object_library_list: [1 .. number_of_libraries] IN ocv$olg_scratch_seq;
        IF object_library_list = NIL THEN
          osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
          RETURN;
        IFEND;
        node := pvt [p$library].value;
        FOR library_number := 1 TO number_of_libraries DO
          CASE node^.element_value^.kind OF
          = clc$keyword = {OSF$TASK_SERVICES_LIBRARY or OSF$CURRENT_LIBRARY}
            object_library_list^ [library_number] := node^.element_value^.keyword_value;
          = clc$file =
            object_library_list^ [library_number] := node^.element_value^.file_value^;
          ELSE {clc$string}
            object_library_list^ [library_number] := node^.element_value^.string_value^;
          CASEND;
          node := node^.link;
        FOREND;
      IFEND;

      IF pvt [p$starting_procedure].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$starting_proc_specified];
        program_attributes^.starting_procedure := pvt [p$starting_procedure].value^.program_name_value;
      IFEND;

      IF pvt [p$load_map].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$load_map_file_specified];
        IF pvt [p$load_map].value^.kind = clc$file THEN
          program_attributes^.load_map_file := pvt [p$load_map].value^.file_value^;
        ELSE {clc$string}
          program_attributes^.load_map_file := pvt [p$load_map].value^.string_value^;
        IFEND;
      IFEND;

      IF pvt [p$load_map_option].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$load_map_options_specified];
        program_attributes^.load_map_options := $pmt$load_map_options [];
        IF pvt [p$load_map_option].value^.kind = clc$keyword THEN
          IF pvt [p$load_map_option].value^.keyword_value = 'ALL' THEN
            program_attributes^.load_map_options := -$pmt$load_map_options [pmc$no_load_map];
          ELSE {NONE}
            program_attributes^.load_map_options := $pmt$load_map_options [pmc$no_load_map];
          IFEND;
        ELSE {clc$list of clc$keyword}
          node := pvt [p$load_map_option].value;
          WHILE (node <> NIL) AND (node^.element_value <> NIL) DO
            IF node^.element_value^.keyword_value = 'SEGMENT' THEN
              program_attributes^.load_map_options := program_attributes^.load_map_options +
                    $pmt$load_map_options [pmc$segment_map];
            ELSEIF node^.element_value^.keyword_value = 'BLOCK' THEN
              program_attributes^.load_map_options := program_attributes^.load_map_options +
                    $pmt$load_map_options [pmc$block_map];
            ELSEIF node^.element_value^.keyword_value = 'ENTRY_POINT' THEN
              program_attributes^.load_map_options := program_attributes^.load_map_options +
                    $pmt$load_map_options [pmc$entry_point_map];
            ELSE {CROSS_REFERENCE}
              program_attributes^.load_map_options := program_attributes^.load_map_options +
                    $pmt$load_map_options [pmc$entry_point_xref];
            IFEND;
            node := node^.link;
          WHILEND;
        IFEND;
      IFEND;

      IF pvt [p$termination_error_level].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$term_error_level_specified];
        IF pvt [p$termination_error_level].value^.keyword_value = 'WARNING' THEN
          program_attributes^.termination_error_level := pmc$warning_load_errors;
        ELSEIF pvt [p$termination_error_level].value^.keyword_value = 'ERROR' THEN
          program_attributes^.termination_error_level := pmc$error_load_errors;
        ELSE {FATAL}
          program_attributes^.termination_error_level := pmc$fatal_load_errors;
        IFEND;
      IFEND;

      IF pvt [p$preset_value].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$preset_specified];
        IF pvt [p$preset_value].value^.keyword_value = 'ZERO' THEN
          program_attributes^.preset := pmc$initialize_to_zero;
        ELSEIF pvt [p$preset_value].value^.keyword_value = 'INFINITY' THEN
          program_attributes^.preset := pmc$initialize_to_infinity;
        ELSEIF pvt [p$preset_value].value^.keyword_value = 'FLOATING_POINT_INDEFINITE' THEN
          program_attributes^.preset := pmc$initialize_to_indefinite;
        ELSE {ALTERNATE_ONES}
          program_attributes^.preset := pmc$initialize_to_alt_ones;
        IFEND;
      IFEND;

      IF pvt [p$stack_size].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$max_stack_size_specified];
        program_attributes^.maximum_stack_size := pvt [p$stack_size].value^.integer_value.value;
      IFEND;

      IF pvt [p$abort_file].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$abort_file_specified];
        IF pvt [p$abort_file].value^.kind = clc$file THEN
          program_attributes^.abort_file := pvt [p$abort_file].value^.file_value^;
        ELSE {clc$string}
          program_attributes^.abort_file := pvt [p$abort_file].value^.string_value^;
        IFEND;
      IFEND;

      IF pvt [p$debug_input].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$debug_input_specified];
        IF pvt [p$debug_input].value^.kind = clc$file THEN
          program_attributes^.debug_input := pvt [p$debug_input].value^.file_value^;
        ELSE {clc$string}
          program_attributes^.debug_input := pvt [p$debug_input].value^.string_value^;
        IFEND;
      IFEND;

      IF pvt [p$debug_output].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$debug_output_specified];
        IF pvt [p$debug_output].value^.kind = clc$file THEN
          program_attributes^.debug_output := pvt [p$debug_output].value^.file_value^;
        ELSE {clc$string}
          program_attributes^.debug_output := pvt [p$debug_output].value^.string_value^;
        IFEND;
      IFEND;

      IF pvt [p$debug_mode].specified THEN
        program_attributes^.contents := program_attributes^.contents +
              $pmt$prog_description_contents [pmc$debug_mode_specified];
        program_attributes^.debug_mode := pvt [p$debug_mode].value^.boolean_value.value;
      IFEND;

      set_system_condition_parameter (p$arithmetic_overflow, pmc$arithmetic_overflow);
      set_system_condition_parameter (p$arithmetic_loss_of_significan, pmc$arithmetic_significance);
      set_system_condition_parameter (p$divide_fault, pmc$divide_fault);
      set_system_condition_parameter (p$exponent_overflow, pmc$exponent_overflow);
      set_system_condition_parameter (p$exponent_underflow, pmc$exponent_underflow);
      set_system_condition_parameter (p$fp_indefinite, pmc$fp_indefinite);
      set_system_condition_parameter (p$fp_loss_of_significance, pmc$fp_significance_loss);
      set_system_condition_parameter (p$invalid_bdp_data, pmc$invalid_bdp_data);

      ALLOCATE module_description IN ocv$olg_working_heap^;
      IF module_description = NIL THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;

      module_description^.name := program_description_header^.name;
      module_description^.source := occ$current;
      IF pvt [p$application_identifier].specified THEN
        module_description^.kind := occ$applic_program_description
      ELSE
        module_description^.kind := occ$program_description;
      IFEND;

      ocp$search_nlm_tree (program_description_header^.name, nlm, module_already_exists);

      IF pvt [p$merge_option].value^.keyword_value = 'ADD' THEN
        IF module_already_exists THEN
          osp$set_status_abnormal ('OC', oce$e_module_already_on_library, program_description_header^.name,
                status);
          EXIT /protect/;
        ELSE
          ocp$create_an_nlm (module_description, nlm, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
          ocp$add_an_nlm (ocv$nlm_list^.b_link, nlm);
        IFEND;

      ELSEIF pvt [p$merge_option].value^.keyword_value = 'REPLACE' THEN
        IF module_already_exists THEN
          nlm^.description := module_description;
          nlm^.changed_info := NIL;
        ELSE
          osp$set_status_abnormal ('OC', oce$e_module_not_found, program_description_header^.name, status);
          EXIT /protect/;
        IFEND;

      ELSE {COMBINE}
        IF module_already_exists THEN
          nlm^.description := module_description;
          nlm^.changed_info := NIL;
        ELSE
          ocp$create_an_nlm (module_description, nlm, status);
          IF NOT status.normal THEN
            EXIT /protect/;
          IFEND;
          ocp$add_an_nlm (ocv$nlm_list^.b_link, nlm);
        IFEND;
      IFEND;

      size := i#current_sequence_position (ocv$olg_scratch_seq);
      RESET ocv$olg_scratch_seq;
      NEXT sequence: [[REP size OF cell]] IN ocv$olg_scratch_seq;
      ALLOCATE module_description^.file: [[REP size OF cell]] IN ocv$olg_working_heap^;
      IF module_description^.file = NIL THEN
        osp$set_status_condition (oce$e_internal_olg_seg_overflow, status);
        RETURN;
      IFEND;

      module_description^.file^ := sequence^;
      RESET module_description^.file;
      IF pvt [p$application_identifier].specified THEN
        NEXT module_description^.applic_program_description_hdr IN module_description^.file;
        IF module_description^.applic_program_description_hdr^.library_member_header.number_of_aliases <>
              0 THEN
          NEXT alias_list: [1 .. module_description^.applic_program_description_hdr^.library_member_header.
                number_of_aliases] IN module_description^.file;
          module_description^.applic_program_description_hdr^.library_member_header.aliases :=
                #REL (alias_list, module_description^.file^);
        IFEND;
      ELSE
        NEXT module_description^.program_description_header IN module_description^.file;
        IF module_description^.program_description_header^.number_of_aliases <> 0 THEN
          NEXT alias_list: [1 .. module_description^.program_description_header^.number_of_aliases] IN
                module_description^.file;
          module_description^.program_description_header^.aliases :=
                #REL (alias_list, module_description^.file^);
        IFEND;
      IFEND;

      member_size := size - i#current_sequence_position (module_description^.file);
      NEXT member: [[REP member_size OF cell]] IN module_description^.file;

      IF pvt [p$application_identifier].specified THEN
        module_description^.applic_program_description_hdr^.library_member_header.member :=
              #REL (member, module_description^.file^);
        module_description^.applic_program_description_hdr^.library_member_header.member_size := member_size;
      ELSE
        module_description^.program_description_header^.member := #REL (member, module_description^.file^);
        module_description^.program_description_header^.member_size := member_size;
      IFEND;

    END /protect/;
    pmp$disestablish_cond_handler (established_conditions, ignore_status);

  PROCEND ocp$_create_program_description;
?? OLDTITLE ??
MODEND ocm$define_program;
