?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE SCL Interpreter : Miscellaneous Functions' ??
MODULE clm$miscellaneous_functions;

{
{ PURPOSE:
{   This module contains miscellaneous "built-in" functions.
{

?? NEWTITLE := 'Global Declarations', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clc$compiling_for_test_harness
*copyc clc$standard_file_names
*copyc clt$value
*copyc cle$bad_data_value
*copyc cle$ecc_file_reference
*copyc cle$ecc_function_processing
*copyc cle$ecc_parsing
*copyc cle$string_too_long
*copyc cle$unexpected_call_to
*copyc cle$work_area_overflow
*copyc clt$name
*copyc jmt$job_class_set
*copyc ose$undefined_condition
*copyc oss$job_paged_literal
*copyc ost$status
?? POP ??
*copyc clp$append_status_value_type
*copyc clp$check_name_for_boolean
*copyc clp$convert_data_to_string
*copyc clp$convert_integer_to_string
*copyc clp$convert_list_to_array
*copyc clp$convert_string_to_name
*copyc clp$count_list_elements
*copyc clp$data_representation_text
*copyc clp$derive_type_desc_from_value
*copyc clp$evaluate_expression
*copyc clp$evaluate_parameters
*copyc clp$find_current_block
*copyc clp$find_input_block
*copyc clp$get_date_time_string
*copyc clp$get_expected_type
*copyc clp$get_path_name
*copyc clp$get_variable
*copyc clp$i_convert_string_to_integer
*copyc clp$internal_convert_to_string
*copyc clp$longreal_classify
*copyc clp$make_application_value
*copyc clp$make_boolean_value
*copyc clp$make_clt$integer_value
*copyc clp$make_clt$real_value
*copyc clp$make_data_name_value
*copyc clp$make_date_time_value
*copyc clp$make_file_value
*copyc clp$make_integer_value
*copyc clp$make_keyword_value
*copyc clp$make_list_value
*copyc clp$make_name_value
*copyc clp$make_program_name_value
*copyc clp$make_range_value
*copyc clp$make_real_value
*copyc clp$make_record_value
*copyc clp$make_sized_string_value
*copyc clp$make_status_value
*copyc clp$make_statistic_code_value
*copyc clp$make_string_value
*copyc clp$make_type_spec_value
*copyc clp$make_value
*copyc clp$scan_argument_list
*copyc clp$sort_record_fields
*copyc clp$trimmed_string_size
*copyc jmp$get_attribute_defaults
*copyc jmp$get_job_attributes
*copyc nap$namve_active
*copyc nap$namve_config_activated
*copyc osp$append_status_file
*copyc osp$append_status_integer
*copyc osp$append_status_parameter
*copyc osp$append_status_real
*IF NOT $true(osv$unix)
*copyc osp$find_natural_language
*IFEND
*copyc osp$find_status_message_level
*copyc osp$format_message
*copyc osp$get_diagnostic_severity
*copyc osp$get_job_template_name
*copyc osp$get_status_condition_code
*copyc osp$get_status_condition_name
*copyc osp$get_status_condition_string
*copyc osp$get_status_severity
*copyc osp$set_status_abnormal
*copyc osp$set_status_condition
*copyc osp$status_condition_code
*copyc pmf$job_mode
*copyc pmp$connect_queue
*copyc pmp$define_queue
*copyc pmp$disconnect_queue
*copyc pmp$get_binary_mainframe_id
*copyc pmp$get_cpu_attributes
*copyc pmp$get_compact_date_time
*copyc pmp$get_date
*copyc pmp$get_default_date_time_form
*copyc pmp$get_mainframe_attributes
*copyc pmp$get_microsecond_clock
*copyc pmp$get_processor_id
*copyc pmp$get_termination_status
*copyc pmp$get_unique_name
*copyc pmp$status_queue

*copyc clv$max_real
*copyc clv$min_real
*copyc clv$positive_infinity
*copyc clv$negative_infinity
*copyc clv$string_delimiter
*copyc clv$type_kind_names
*copyc clv$value_descriptors
*copyc jmv$job_termination_status
*copyc osv$control_codes_to_quest_mark
*copyc osv$lower_to_upper
*copyc osv$severities
*copyc osv$upper_to_lower

?? TITLE := 'union_type', EJECT ??

{ TYPE
{   union_type = any
{ TYPEND

  VAR
    union_type: [STATIC, READ, cls$declaration_section] record
      header: clt$type_specification_header,
      qualifier: clt$union_type_qualifier,
    recend := [[1, 0, clc$union_type], [-$clt$type_kinds [], FALSE, 0]];

*IF NOT $true(osv$unix)
?? TITLE := 'clp$$array', EJECT ??

  PROCEDURE [XDCL] clp$$array
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$array) $array (
{   list: list = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
        recend,
      recend := [[1, [88, 4, 30, 18, 12, 51, 400], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$ARRAY'],
            [['LIST                           ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 16, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$list_type], [0, 1, clc$max_list_size, FALSE]]];

?? POP ??

    CONST
      p$list = 1;

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


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

    clp$convert_list_to_array (pvt [p$list].value, NIL, NIL, work_area, result, status);

  PROCEND clp$$array;
*IFEND
?? TITLE := 'clp$$char', EJECT ??

  PROCEDURE [XDCL] clp$$char
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

*IF $true(osv$unix)
{ FUNCTION (osm$$char) $char (
{   ascii: list rest of any of
{       key
{         (nul, ^@)
{         (soh, ^a)
{         (stx, ^b)
{         (etx, ^c)
{         (eot, ^d)
{         (enq, ^e)
{         (ack, ^f)
{         (bel, ^g)
{         (bs,  ^h)
{         (ht,  ^i)
{         (lf,  ^j)
{         (vt,  ^k)
{         (ff,  ^l)
{         (cr,  ^m)
{         (so,  ^n)
{         (si,  ^o)
{         (dle, ^p)
{         (dc1, ^q)
{         (dc2, ^r)
{         (dc3, ^s)
{         (dc4, ^t)
{         (nak, ^u)
{         (syn, ^v)
{         (etb, ^w)
{         (can, ^x)
{         (em,  ^y)
{         (sub, ^z)
{         (esc, ^[)
{         (fs,  ^\)
{         (gs,  ^])
{         (rs,  ^^)
{         (us,  ^_)
{         sp
{         del
{       keyend
{       integer 0..255
{       string
{     anyend = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: 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_v2,
          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 .. 66] of clt$keyword_specification,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$integer_type_qualifier,
          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,
    recend := [
    [2,
    [92, 7, 1, 8, 57, 26, 0],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$CHAR'], [
    ['ASCII                          ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 2729, clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[2, 0, clc$list_type], [2701, 1, clc$max_list_size, 0, FALSE, TRUE],
      [[2, 0, clc$union_type], [[clc$integer_type,
      clc$keyword_type, clc$string_type],
      FALSE, 3],
      2648, [[2, 0, clc$keyword_type], [66], [
        ['ACK                            ', clc$nominal_entry,
  clc$normal_usage_entry, 7],
        ['BEL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 8],
        ['BS                             ', clc$nominal_entry,
  clc$normal_usage_entry, 9],
        ['CAN                            ', clc$nominal_entry,
  clc$normal_usage_entry, 25],
        ['CR                             ', clc$nominal_entry,
  clc$normal_usage_entry, 14],
        ['DC1                            ', clc$nominal_entry,
  clc$normal_usage_entry, 18],
        ['DC2                            ', clc$nominal_entry,
  clc$normal_usage_entry, 19],
        ['DC3                            ', clc$nominal_entry,
  clc$normal_usage_entry, 20],
        ['DC4                            ', clc$nominal_entry,
  clc$normal_usage_entry, 21],
        ['DEL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 34],
        ['DLE                            ', clc$nominal_entry,
  clc$normal_usage_entry, 17],
        ['EM                             ', clc$nominal_entry,
  clc$normal_usage_entry, 26],
        ['ENQ                            ', clc$nominal_entry,
  clc$normal_usage_entry, 6],
        ['EOT                            ', clc$nominal_entry,
  clc$normal_usage_entry, 5],
        ['ESC                            ', clc$nominal_entry,
  clc$normal_usage_entry, 28],
        ['ETB                            ', clc$nominal_entry,
  clc$normal_usage_entry, 24],
        ['ETX                            ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
        ['FF                             ', clc$nominal_entry,
  clc$normal_usage_entry, 13],
        ['FS                             ', clc$nominal_entry,
  clc$normal_usage_entry, 29],
        ['GS                             ', clc$nominal_entry,
  clc$normal_usage_entry, 30],
        ['HT                             ', clc$nominal_entry,
  clc$normal_usage_entry, 10],
        ['LF                             ', clc$nominal_entry,
  clc$normal_usage_entry, 11],
        ['NAK                            ', clc$nominal_entry,
  clc$normal_usage_entry, 22],
        ['NUL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
        ['RS                             ', clc$nominal_entry,
  clc$normal_usage_entry, 31],
        ['SI                             ', clc$nominal_entry,
  clc$normal_usage_entry, 16],
        ['SO                             ', clc$nominal_entry,
  clc$normal_usage_entry, 15],
        ['SOH                            ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
        ['SP                             ', clc$nominal_entry,
  clc$normal_usage_entry, 33],
        ['STX                            ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
        ['SUB                            ', clc$nominal_entry,
  clc$normal_usage_entry, 27],
        ['SYN                            ', clc$nominal_entry,
  clc$normal_usage_entry, 23],
        ['US                             ', clc$nominal_entry,
  clc$normal_usage_entry, 32],
        ['VT                             ', clc$nominal_entry,
  clc$normal_usage_entry, 12],
        ['^@                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
        ['^A                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
        ['^B                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
        ['^C                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
        ['^D                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 5],
        ['^E                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 6],
        ['^F                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 7],
        ['^G                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 8],
        ['^H                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 9],
        ['^I                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 10],
        ['^J                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 11],
        ['^K                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 12],
        ['^L                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 13],
        ['^M                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 14],
        ['^N                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 15],
        ['^O                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 16],
        ['^P                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 17],
        ['^Q                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 18],
        ['^R                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 19],
        ['^S                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 20],
        ['^T                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 21],
        ['^U                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 22],
        ['^V                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 23],
        ['^W                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 24],
        ['^X                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 25],
        ['^Y                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 26],
        ['^Z                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 27],
        ['^[                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 28],
        ['^\                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 29],
        ['^]                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 30],
        ['^^                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 31],
        ['^_                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 32]]
        ],
      13, [[2, 0, clc$integer_type], [0, 255, 10]],
      9, [[2, 0, clc$string_type], [0, clc$max_string_size, FALSE]]
      ]
    ]];

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

    CONST
      p$ascii = 1;

    VAR
      pvt: array [1 .. 1] of clt$parameter_value;
*ELSE
{ FUNCTION (osm$$char) $char (
{   ascii: list rest of any of
{       key
{         (nul, ^@)
{         (soh, ^a)
{         (stx, ^b)
{         (etx, ^c)
{         (eot, ^d)
{         (enq, ^e)
{         (ack, ^f)
{         (bel, ^g)
{         (bs,  ^h)
{         (ht,  ^i)
{         (lf,  ^j)
{         (vt,  ^k)
{         (ff,  ^l)
{         (cr,  ^m)
{         (so,  ^n)
{         (si,  ^o)
{         (dle, ^p)
{         (dc1, ^q)
{         (dc2, ^r)
{         (dc3, ^s)
{         (dc4, ^t)
{         (nak, ^u)
{         (syn, ^v)
{         (etb, ^w)
{         (can, ^x)
{         (em,  ^y)
{         (sub, ^z)
{         (esc, ^[)
{         (fs,  ^\)
{         (gs,  ^])
{         (rs,  ^^)
{         (us,  ^_)
{         sp
{         del
{       keyend
{       integer 0..255
{       string
{     anyend = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          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 .. 66] of clt$keyword_specification,
            recend,
            type_size_2: clt$type_specification_size,
            element_type_spec_2: record
              header: clt$type_specification_header,
              qualifier: clt$integer_type_qualifier,
            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,
      recend := [[1, [87, 10, 25, 13, 30, 52, 579], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$CHAR'],
            [['ASCII                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 2517, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$list_type], [2501, 1, clc$max_list_size, TRUE],
            [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type, clc$string_type], FALSE, 3], 2449,
            [[1, 0, clc$keyword_type], [66], [['ACK                            ', clc$nominal_entry,
            clc$normal_usage_entry, 7], ['BEL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 8], ['BS                             ', clc$nominal_entry,
            clc$normal_usage_entry, 9], ['CAN                            ', clc$nominal_entry,
            clc$normal_usage_entry, 25], ['CR                             ', clc$nominal_entry,
            clc$normal_usage_entry, 14], ['DC1                            ', clc$nominal_entry,
            clc$normal_usage_entry, 18], ['DC2                            ', clc$nominal_entry,
            clc$normal_usage_entry, 19], ['DC3                            ', clc$nominal_entry,
            clc$normal_usage_entry, 20], ['DC4                            ', clc$nominal_entry,
            clc$normal_usage_entry, 21], ['DEL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 34], ['DLE                            ', clc$nominal_entry,
            clc$normal_usage_entry, 17], ['EM                             ', clc$nominal_entry,
            clc$normal_usage_entry, 26], ['ENQ                            ', clc$nominal_entry,
            clc$normal_usage_entry, 6], ['EOT                            ', clc$nominal_entry,
            clc$normal_usage_entry, 5], ['ESC                            ', clc$nominal_entry,
            clc$normal_usage_entry, 28], ['ETB                            ', clc$nominal_entry,
            clc$normal_usage_entry, 24], ['ETX                            ', clc$nominal_entry,
            clc$normal_usage_entry, 4], ['FF                             ', clc$nominal_entry,
            clc$normal_usage_entry, 13], ['FS                             ', clc$nominal_entry,
            clc$normal_usage_entry, 29], ['GS                             ', clc$nominal_entry,
            clc$normal_usage_entry, 30], ['HT                             ', clc$nominal_entry,
            clc$normal_usage_entry, 10], ['LF                             ', clc$nominal_entry,
            clc$normal_usage_entry, 11], ['NAK                            ', clc$nominal_entry,
            clc$normal_usage_entry, 22], ['NUL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['RS                             ', clc$nominal_entry,
            clc$normal_usage_entry, 31], ['SI                             ', clc$nominal_entry,
            clc$normal_usage_entry, 16], ['SO                             ', clc$nominal_entry,
            clc$normal_usage_entry, 15], ['SOH                            ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['SP                             ', clc$nominal_entry,
            clc$normal_usage_entry, 33], ['STX                            ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['SUB                            ', clc$nominal_entry,
            clc$normal_usage_entry, 27], ['SYN                            ', clc$nominal_entry,
            clc$normal_usage_entry, 23], ['US                             ', clc$nominal_entry,
            clc$normal_usage_entry, 32], ['VT                             ', clc$nominal_entry,
            clc$normal_usage_entry, 12], ['^@                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['^A                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['^B                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['^C                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 4], ['^D                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 5], ['^E                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 6], ['^F                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 7], ['^G                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 8], ['^H                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 9], ['^I                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 10], ['^J                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 11], ['^K                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 12], ['^L                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 13], ['^M                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 14], ['^N                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 15], ['^O                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 16], ['^P                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 17], ['^Q                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 18], ['^R                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 19], ['^S                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 20], ['^T                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 21], ['^U                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 22], ['^V                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 23], ['^W                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 24], ['^X                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 25], ['^Y                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 26], ['^Z                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 27], ['^[                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 28], ['^\                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 29], ['^]                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 30], ['^^                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 31], ['^_                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 32]]], 20, [[1, 0, clc$integer_type], [0, 255, 10]],
            8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]]]];

?? POP ??

    CONST
      p$ascii = 1;

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

?? SKIP := 3 ??

    CONST
      max_mnemonics = 34,
      mnemonic_name_size = 3;

    VAR
      mnemonics_table: [STATIC, READ, oss$job_paged_literal] array [1 .. 34] of record
        name: string (mnemonic_name_size),
        character: char,
      recend := [['ACK', $CHAR (6)], ['BEL', $CHAR (7)], ['BS ', $CHAR (8)], ['CAN', $CHAR (24)],
            ['CR ', $CHAR (13)], ['DC1', $CHAR (17)], ['DC2', $CHAR (18)], ['DC3', $CHAR (19)],
            ['DC4', $CHAR (20)], ['DEL', $CHAR (127)], ['DLE', $CHAR (16)], ['EM ', $CHAR (25)],
            ['ENQ', $CHAR (5)], ['EOT', $CHAR (4)], ['ESC', $CHAR (27)],
            ['ETB', $CHAR (23)], ['ETX', $CHAR (3)], ['FF ', $CHAR (12)],
            ['FS ', $CHAR (28)], ['GS ', $CHAR (29)], ['HT ', $CHAR (9)], ['LF ', $CHAR (10)],
            ['NAK', $CHAR (21)], ['NUL', $CHAR (0)], ['RS ', $CHAR (30)],
            ['SI ', $CHAR (15)], ['SO ', $CHAR (14)], ['SOH', $CHAR (1)], ['SP ', $CHAR (32)],
            ['STX', $CHAR (2)], ['SUB', $CHAR (26)], ['SYN', $CHAR (22)],
            ['US ', $CHAR (31)], ['VT ', $CHAR (11)]];

?? NEWTITLE := 'lookup_mnemonic', EJECT ??

    FUNCTION [INLINE] lookup_mnemonic
      (    name: clt$keyword): char;

      VAR
        low_index: 1 .. max_mnemonics + 1,
        temp: integer,
        high_index: 0 .. max_mnemonics,
        current_index: 1 .. max_mnemonics + max_mnemonics;


      low_index := 1;
      high_index := max_mnemonics;
      REPEAT
        temp := low_index + high_index;
        current_index := temp DIV 2;
        IF name (1, mnemonic_name_size) = mnemonics_table [current_index].name THEN
          lookup_mnemonic := mnemonics_table [current_index].character;
          RETURN;
        ELSEIF name (1, mnemonic_name_size) > mnemonics_table [current_index].name THEN
          low_index := current_index + 1;
        ELSE
          high_index := current_index - 1;
        IFEND;
      UNTIL low_index > high_index;

{ Should never get here.

      lookup_mnemonic := $CHAR (0);

    FUNCEND lookup_mnemonic;
?? OLDTITLE, EJECT ??

    VAR
      new_result_size: clt$string_size,
      node: ^clt$data_value,
      result_size: clt$string_size;


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

  /work_area_ok/
    BEGIN
      clp$make_value (clc$string, work_area, result);
      IF result = NIL THEN
        EXIT /work_area_ok/;
      IFEND;
      NEXT result^.string_value: [0] IN work_area;
      IF result = NIL THEN
        EXIT /work_area_ok/;
      IFEND;
      result_size := 0;
      node := pvt [p$ascii].value;

      WHILE node <> NIL DO
        IF node^.element_value^.kind = clc$string THEN
          new_result_size := result_size + STRLENGTH (node^.element_value^.string_value^);
        ELSE
          new_result_size := result_size + 1;
        IFEND;
        IF new_result_size > clc$max_string_size THEN
          osp$set_status_condition (cle$string_too_long, status);
          RETURN;
        IFEND;
        RESET work_area TO result^.string_value;
        NEXT result^.string_value: [new_result_size] IN work_area;
        IF result = NIL THEN
          EXIT /work_area_ok/;
        IFEND;

        CASE node^.element_value^.kind OF
        = clc$keyword =
          result^.string_value^ (new_result_size) := lookup_mnemonic (node^.element_value^.keyword_value);
        = clc$integer =
          result^.string_value^ (new_result_size) := $CHAR (node^.element_value^.integer_value.value);
        ELSE {clc$string}
          result^.string_value^ (result_size + 1, * ) := node^.element_value^.string_value^;
        CASEND;

        result_size := new_result_size;
        node := node^.link;
      WHILEND;
      RETURN;

    END /work_area_ok/;
    osp$set_status_condition (cle$work_area_overflow, status);

  PROCEND clp$$char;
*IF NOT $true(osv$unix)
?? TITLE := 'clp$$clock', EJECT ??

  PROCEDURE [XDCL] clp$$clock
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    value.descriptor := clv$value_descriptors [clc$integer_value];
    value.kind := clc$integer_value;
    value.int.radix := 10;
    value.int.radix_specified := FALSE;
    pmp$get_microsecond_clock (value.int.value, status);

  PROCEND clp$$clock;
?? TITLE := 'clp$$condition_code', EJECT ??

  PROCEDURE [XDCL] clp$$condition_code
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      condition_code_adt: [STATIC, READ, cls$adt] array [1 .. 2] of clt$argument_descriptor := [
            {1} [[clc$required], [NIL, clc$name_value, 1, osc$max_name_size]],
            {2} [[clc$optional_with_default, ^default_format], [^formats, clc$keyword_value]]],
      formats: [STATIC, READ, cls$adt_names_and_defaults] array [1 .. 4] of ost$name := ['SYMBOLIC', 'S',
            'NUMERIC', 'N'],
      default_format: [STATIC, READ, cls$adt_names_and_defaults] string (7) := 'numeric';

    VAR
      condition_code: ost$status_condition_code,
      condition_code_string: ost$string,
      name: clt$name,
      avt: array [1 .. 2] of clt$value;

    clp$scan_argument_list (function_name, argument_list, ^condition_code_adt, ^avt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    osp$get_status_condition_code (avt [1].name.value, condition_code, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF (avt [2].name.value = 'SYMBOLIC') OR (avt [2].name.value = 'S') THEN
      osp$get_status_condition_string (condition_code, condition_code_string, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      value.descriptor := clv$value_descriptors [clc$string_value];
      value.kind := clc$string_value;
      value.str := condition_code_string;
    ELSE {avt[2].name.value = 'NUMERIC' OR 'N'
      value.descriptor := clv$value_descriptors [clc$integer_value];
      value.kind := clc$integer_value;
      value.int.radix := 10;
      value.int.radix_specified := FALSE;
      value.int.value := condition_code;
    IFEND;

  PROCEND clp$$condition_code;
?? TITLE := 'clp$$condition_name', EJECT ??

  PROCEDURE [XDCL] clp$$condition_name
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} :^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$condition_name) $condition_name $condition (
{   status_code : status_code = $required
{   identifier: string 2
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
    recend := [
    [1,
    [88, 12, 15, 11, 54, 25, 965],
    clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$CONDITION_NAME'], [
    ['IDENTIFIER                     ',clc$nominal_entry, 2],
    ['STATUS_CODE                    ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$status_code_type]],
{ PARAMETER 2
    [[1, 0, clc$string_type], [2, 2, FALSE]]];

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

    CONST
      p$status_code = 1,
      p$identifier = 2;

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

    VAR
      condition_code: ost$status_condition_code,
      condition_name: ost$status_condition_name;

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

    IF pvt [p$status_code].value^.status_code_value <= osc$max_status_condition_number THEN
      IF NOT pvt [p$identifier].specified THEN
        osp$set_status_abnormal ('CL', cle$required_argument_omitted, '$CONDITION_NAME', status);
        osp$append_status_parameter (osc$status_parameter_delimiter, 'IDENTIFIER', status);
        RETURN;
      IFEND;
      condition_code := osp$status_condition_code (pvt [p$identifier].value^.string_value^(1, 2),
            pvt [p$status_code].value^.status_code_value);
    ELSE
      condition_code := pvt [p$status_code].value^.status_code_value;
    IFEND;

    osp$get_status_condition_name (condition_code, condition_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_string_value (condition_name(1,clp$trimmed_string_size(condition_name)), work_area, result);

    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$condition_name;
?? TITLE := 'clp$$data_name', EJECT ??

  PROCEDURE [XDCL] clp$$data_name
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$data_name) $data_name (
{   source: any of
{       string
{       name
{     anyend = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: 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$string_type_qualifier,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
      recend := [[1, [88, 5, 14, 10, 26, 21, 547], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$DATA_NAME'],
            [['SOURCE                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 33, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [[clc$name_type, clc$string_type], TRUE, 2], 8,
            [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]], 5,
            [[1, 0, clc$name_type], [1, osc$max_name_size]]]];

?? POP ??

    CONST
      p$source = 1;

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

    VAR
      data_name: ^ost$name,
      name: clt$name;


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

    IF pvt [p$source].value^.kind = clc$string THEN
      clp$convert_string_to_name (pvt [p$source].value^.string_value^, name, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      data_name := ^name.value;
    ELSE {name}
      data_name := ^pvt [p$source].value^.name_value;
    IFEND;

    clp$make_data_name_value (data_name^, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$data_name;
?? TITLE := 'clp$$default_family', EJECT ??

  PROCEDURE [XDCL] clp$$default_family
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      default_attribute_results_p: ^jmt$default_attribute_results;

    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    PUSH default_attribute_results_p: [1 .. 1];
    default_attribute_results_p^ [1].key := jmc$login_family;
    jmp$get_attribute_defaults (pmf$job_mode (), default_attribute_results_p, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    value.descriptor := clv$value_descriptors [clc$name_value];
    value.kind := clc$name_value;
    value.name.size := clp$trimmed_string_size (default_attribute_results_p^ [1].login_family);
    value.name.value := default_attribute_results_p^ [1].login_family (1, value.name.size);

  PROCEND clp$$default_family;
?? TITLE := 'clp$$element_type', EJECT ??

  PROCEDURE [XDCL] clp$$element_type
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{   FUNCTION (osm$$element_type) $element_type (
{     structured_variable: data_name = $required
{     )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 1, 18, 8, 24, 10, 270], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$ELEMENT_TYPE'],
            [['STRUCTURED_VARIABLE            ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$data_name_type]]];

?? POP ??

    CONST
      p$structured_variable = 1;

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

    VAR
      array_type_qualifier: ^clt$array_type_qualifier,
      element_type_specification: ^clt$type_specification,
      header: ^clt$type_specification_header,
      ignore_access_mode: clt$data_access_mode,
      ignore_class: clt$variable_class,
      ignore_evaluation_method: clt$expression_eval_method,
      ignore_value: ^clt$data_value,
      list_type_qualifier: ^clt$list_type_qualifier,
      name: ^clt$type_name_reference,
      range_type_qualifier: ^clt$range_type_qualifier,
      type_specification: ^clt$type_specification;


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

    clp$get_variable (pvt [p$structured_variable].value^.data_name_value, work_area, ignore_class,
          ignore_access_mode, ignore_evaluation_method, type_specification, ignore_value, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    RESET type_specification;

    NEXT header IN type_specification;
    IF header^.name_size > 0 THEN
      NEXT name: [header^.name_size] IN type_specification;
    IFEND;
    element_type_specification := NIL;
    CASE header^.kind OF

    = clc$array_type =
      NEXT array_type_qualifier IN type_specification;
      IF array_type_qualifier^.element_type_specification_size <> 0 THEN
        NEXT element_type_specification: [[REP array_type_qualifier^.element_type_specification_size OF
              cell]] IN type_specification;
      IFEND;

    = clc$list_type =
      NEXT list_type_qualifier IN type_specification;
      IF list_type_qualifier^.element_type_specification_size <> 0 THEN
        NEXT element_type_specification: [[REP list_type_qualifier^.element_type_specification_size OF
              cell]] IN type_specification;
      IFEND;

    = clc$range_type =
      NEXT range_type_qualifier IN type_specification;
      IF range_type_qualifier^.element_type_specification_size <> 0 THEN
        NEXT element_type_specification: [[REP range_type_qualifier^.element_type_specification_size OF
              cell]] IN type_specification;
      IFEND;

    ELSE
      element_type_specification := type_specification;

    CASEND;

    IF element_type_specification = NIL THEN
      element_type_specification := #SEQ (union_type);
    IFEND;

    clp$make_type_spec_value (element_type_specification, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$element_type;
?? TITLE := 'clp$$evaluate', EJECT ??

  PROCEDURE [XDCL] clp$$evaluate
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$evaluate) $evaluate (
{   expression: any of
{       string
{       application
{     anyend = $required
{   type: type = $optional
{   option: key
{       value, check
{     keyend = value
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: 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$string_type_qualifier,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$application_type_qualifier,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 2] of clt$keyword_specification,
        default_value: string (5),
      recend,
    recend := [
    [1,
    [90, 4, 6, 13, 2, 44, 817],
    clc$function, 3, 3, 1, 0, 0, 0, 0, 'OSM$$EVALUATE'], [
    ['EXPRESSION                     ',clc$nominal_entry, 1],
    ['OPTION                         ',clc$nominal_entry, 3],
    ['TYPE                           ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 32, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 81,
  clc$optional_default_parameter, 0, 5]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$application_type, clc$string_type],
    FALSE, 2],
    8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
    4, [[1, 0, clc$application_type], [FALSE]]
    ],
{ PARAMETER 2
    [[1, 0, clc$type_specification_type]],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [2], [
    ['CHECK                          ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['VALUE                          ', clc$nominal_entry, clc$normal_usage_entry, 1]]
    ,
    'value']];

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

    CONST
      p$expression = 1,
      p$type = 2,
      p$option = 3;

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

    VAR
      expression: ^clt$expression_text,
      type_specification: ^clt$type_specification;


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

    IF pvt [p$expression].value^.kind = clc$string THEN
      expression := pvt [p$expression].value^.string_value;
    ELSE {clc$application}
      expression := pvt [p$expression].value^.application_value;
    IFEND;

    IF pvt [p$type].specified THEN
      type_specification := pvt [p$type].value^.type_specification_value;
    ELSE
      clp$get_expected_type (work_area, type_specification, status);
      IF NOT status.normal THEN
        RETURN;
      ELSEIF type_specification = NIL THEN
        type_specification := #SEQ (union_type);
      IFEND;
    IFEND;

    clp$evaluate_expression (expression^, type_specification, work_area, result, status);

    IF pvt [p$option].value^.keyword_value = 'CHECK' THEN
      clp$make_status_value (status, work_area, result);
      status.normal := TRUE;
    IFEND;

  PROCEND clp$$evaluate;
?? TITLE := 'clp$$field', EJECT ??

  PROCEDURE [XDCL] clp$$field
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$field) $field (
{   record: any = $required
{   name: name = $optional
{   option: key
{       defined, initialized, specified, value
{     keyend = value
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
        default_value: string (5),
      recend,
    recend := [
    [1,
    [89, 8, 22, 15, 58, 16, 241],
    clc$function, 3, 3, 1, 0, 0, 0, 0, 'OSM$$FIELD'], [
    ['NAME                           ',clc$nominal_entry, 2],
    ['OPTION                         ',clc$nominal_entry, 3],
    ['RECORD                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$optional_parameter, 0
  , 0],
{ PARAMETER 3
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 155,
  clc$optional_default_parameter, 0, 5]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]],
{ PARAMETER 2
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [4], [
    ['DEFINED                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['INITIALIZED                    ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['SPECIFIED                      ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['VALUE                          ', clc$nominal_entry, clc$normal_usage_entry, 4]]
    ,
    'value']];

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

    CONST
      p$record = 1,
      p$name = 2,
      p$option = 3;

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

    VAR
      f: clt$field_number,
      node: ^^clt$data_value,
      option: (all_field_names, field_defined, field_initialized, field_specified, field_value);


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

    IF NOT pvt [p$name].specified THEN
      option := all_field_names;
      clp$make_list_value (work_area, result);
      node := ^result;

    ELSEIF pvt [p$option].value^.keyword_value = 'DEFINED' THEN
      option := field_defined;
      clp$make_boolean_value (FALSE, clc$true_false_boolean, work_area, result);
    ELSEIF pvt [p$option].value^.keyword_value = 'INITIALIZED' THEN
      option := field_initialized;
      clp$make_boolean_value (FALSE, clc$true_false_boolean, work_area, result);
    ELSEIF pvt [p$option].value^.keyword_value = 'SPECIFIED' THEN
      option := field_specified;
      clp$make_boolean_value (FALSE, clc$true_false_boolean, work_area, result);
    ELSE
      option := field_value;
      result := NIL;
    IFEND;

    IF pvt [p$record].value^.kind <> clc$record THEN
      IF option = field_value THEN
        osp$set_status_abnormal ('CL', cle$wrong_kind_of_param_value, 'RECORD', status);
        clp$append_status_value_type (osc$status_parameter_delimiter, pvt [p$record].value, status);
        osp$append_status_parameter (osc$status_parameter_delimiter, 'RECORD', status);
      IFEND;
      RETURN;
    IFEND;

    FOR f := 1 TO UPPERBOUND (pvt [p$record].value^.field_values^) DO
      IF option = all_field_names THEN
        IF node^ = NIL THEN
          clp$make_list_value (work_area, node^);
        IFEND;
        clp$make_name_value (pvt [p$record].value^.field_values^ [f].name, work_area, node^^.element_value);
        node := ^node^^.link;

      ELSEIF pvt [p$record].value^.field_values^ [f].name = pvt [p$name].value^.name_value THEN
        CASE option OF
        = field_defined =
          result^.boolean_value.value := TRUE;
        = field_initialized =
          result^.boolean_value.value := pvt [p$record].value^.field_values^ [f].value <> NIL;
        = field_specified =
          result^.boolean_value.value := (pvt [p$record].value^.field_values^ [f].value <> NIL) AND
                (pvt [p$record].value^.field_values^ [f].value^.kind <> clc$unspecified);
        ELSE {field_value}
          IF pvt [p$record].value^.field_values^ [f].value <> NIL THEN
            result := pvt [p$record].value^.field_values^ [f].value;
          ELSE
            osp$set_status_abnormal ('CL', cle$undefined_field, pvt [p$name].value^.name_value, status);
            osp$append_status_parameter (osc$status_parameter_delimiter, '$FIELD', status)
          IFEND;
        CASEND;
        RETURN;

      IFEND;
    FOREND;

    IF option = field_value THEN
      osp$set_status_abnormal ('CL', cle$unknown_field, pvt [p$name].value^.name_value, status);
      osp$append_status_parameter (osc$status_parameter_delimiter, '$FIELD', status)
    IFEND;

  PROCEND clp$$field;
?? TITLE := 'clp$$field_list', EJECT ??

  PROCEDURE [XDCL] clp$$field_list
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$field_list) $field_list (
{   record: any = $required
{   options: list rest of key
{       (names, name, n)
{       (values, value, v)
{       (specified_fields_only, sfo)
{     keyend = names values
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      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$keyword_type_qualifier,
          keyword_specs: array [1 .. 8] of clt$keyword_specification,
        recend,
        default_value: string (12),
      recend,
    recend := [
    [1,
    [90, 4, 3, 16, 41, 45, 778],
    clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$FIELD_LIST'], [
    ['OPTIONS                        ',clc$nominal_entry, 2],
    ['RECORD                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 319,
  clc$optional_default_parameter, 0, 12]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]],
{ PARAMETER 2
    [[1, 0, clc$list_type], [303, 1, clc$max_list_size, 0, FALSE, TRUE],
      [[1, 0, clc$keyword_type], [8], [
      ['N                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['NAME                           ', clc$alias_entry, clc$normal_usage_entry, 1],
      ['NAMES                          ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['SFO                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['SPECIFIED_FIELDS_ONLY          ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['V                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['VALUE                          ', clc$alias_entry, clc$normal_usage_entry, 2],
      ['VALUES                         ', clc$nominal_entry, clc$normal_usage_entry, 2]]
      ]
    ,
    'names values']];

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

    CONST
      p$record = 1,
      p$options = 2;

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

    VAR
      f: clt$field_number,
      include_names: boolean,
      include_values: boolean,
      node: ^^clt$data_value,
      option_node: ^clt$data_value,
      specified_fields_only: boolean;


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

    IF pvt [p$record].value^.kind <> clc$record THEN
      osp$set_status_abnormal ('CL', cle$wrong_kind_of_param_value, 'RECORD', status);
      clp$append_status_value_type (osc$status_parameter_delimiter, pvt [p$record].value, status);
      osp$append_status_parameter (osc$status_parameter_delimiter, 'RECORD', status);
      RETURN;
    IFEND;

    include_names := FALSE;
    include_values := FALSE;
    specified_fields_only := FALSE;
    option_node := pvt [p$options].value;
    WHILE option_node <> NIL DO
      IF option_node^.element_value^.keyword_value = 'NAMES' THEN
        include_names := TRUE;
      ELSEIF option_node^.element_value^.keyword_value = 'VALUES' THEN
        include_values := TRUE;
      ELSE {OMIT_UNSPECIFIED}
        specified_fields_only := TRUE;
      IFEND;
      option_node := option_node^.link;
    WHILEND;
    IF NOT include_names THEN
      IF include_values THEN
        specified_fields_only := TRUE;
      ELSE
        include_names := TRUE;
        include_values := TRUE;
      IFEND;
    IFEND;

    clp$make_list_value (work_area, result);
    node := ^result;

    FOR f := 1 TO UPPERBOUND (pvt [p$record].value^.field_values^) DO
      IF (NOT specified_fields_only) OR ((pvt [p$record].value^.field_values^ [f].value <> NIL) AND
            (pvt [p$record].value^.field_values^ [f].value^.kind <> clc$unspecified)) THEN
        IF node^ = NIL THEN
          clp$make_list_value (work_area, node^);
        IFEND;
        IF include_names THEN
          IF include_values THEN
            clp$make_record_value (2, work_area, node^^.element_value);
            node^^.element_value^.field_values^ [1].name := 'NAME';
            clp$make_name_value (pvt [p$record].value^.field_values^ [f].name, work_area,
                  node^^.element_value^.field_values^ [1].value);
            node^^.element_value^.field_values^ [2].name := 'VALUE';
            node^^.element_value^.field_values^ [2].value := pvt [p$record].value^.field_values^ [f].value;
          ELSE
            clp$make_name_value (pvt [p$record].value^.field_values^ [f].name, work_area,
                  node^^.element_value);
          IFEND;
        ELSE {include_values}
          node^^.element_value := pvt [p$record].value^.field_values^ [f].value;
        IFEND;
        node := ^node^^.link;
      IFEND;
    FOREND;

  PROCEND clp$$field_list;
?? TITLE := 'clp$$generic_type', EJECT ??

  PROCEDURE [XDCL] clp$$generic_type
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$generic_type) $generic_type (
{   data: any = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
        recend,
      recend := [[1, [87, 10, 25, 14, 13, 51, 743], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$GENERIC_TYPE'],
            [['DATA                           ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [-$clt$type_kinds [], FALSE, 0]]];

?? POP ??

    CONST
      p$data = 1;

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

    VAR
      keyword: ost$name;


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

    CASE pvt [p$data].value^.kind OF
    = clc$application =
      keyword := 'APPLICATION';
    = clc$array =
      keyword := 'ARRAY';
    = clc$boolean =
      keyword := 'BOOLEAN';
    = clc$cobol_name =
      keyword := 'COBOL_NAME';
    = clc$command_reference =
      keyword := 'COMMAND_REFERENCE';
    = clc$data_name =
      keyword := 'DATA_NAME';
    = clc$date_time =
      IF pvt [p$data].value^.date_time_value.date_specified AND
            pvt [p$data].value^.date_time_value.time_specified THEN
        keyword := 'DATE_TIME';
      ELSEIF pvt [p$data].value^.date_time_value.date_specified THEN
        keyword := 'DATE';
      ELSEIF pvt [p$data].value^.date_time_value.time_specified THEN
        keyword := 'TIME';
      IFEND;
    = clc$deferred =
      keyword := 'DEFERRED';
    = clc$entry_point_reference =
      keyword := 'ENTRY_POINT_REFERENCE';
    = clc$file =
      keyword := 'FILE';
    = clc$integer =
      keyword := 'INTEGER';
    = clc$keyword =
      keyword := 'KEY';
    = clc$list =
      keyword := 'LIST';
    = clc$lock =
      keyword := 'LOCK';
    = clc$name =
      keyword := 'NAME';
    = clc$network_title =
      keyword := 'NETWORK_TITLE';
    = clc$program_name =
      keyword := 'PROGRAM_NAME';
    = clc$range =
      keyword := 'RANGE';
    = clc$real =
      keyword := 'REAL';
    = clc$record =
      keyword := 'RECORD';
    = clc$scu_line_identifier =
      keyword := 'LINE_IDENTIFIER';
    = clc$statistic_code =
      keyword := 'STATISTIC_CODE';
    = clc$status =
      keyword := 'STATUS';
    = clc$status_code =
      keyword := 'STATUS_CODE';
    = clc$string =
      keyword := 'STRING';
    = clc$string_pattern =
      keyword := 'STRING_PATTERN';
    = clc$time_increment =
      keyword := 'TIME_INCREMENT';
    = clc$time_zone =
      keyword := 'TIME_ZONE';
    = clc$type_specification =
      keyword := 'TYPE';
    = clc$unspecified =
      keyword := 'UNSPECIFIED';
    ELSE
      keyword := '';
    CASEND;

    clp$make_keyword_value (keyword, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$generic_type;
*IFEND
?? TITLE := 'clp$$if', EJECT ??

  PROCEDURE [XDCL] clp$$if
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

*IF NOT $true(osv$unix)
{ FUNCTION (osm$$if) $if (
{   condition: boolean = $required
{   result_if_true: (DEFER) any = $required
{   result_if_false: (DEFER) any = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
    recend := [
    [1,
    [90, 4, 5, 15, 43, 45, 166],
    clc$function, 3, 3, 3, 0, 0, 0, 0, 'OSM$$IF'], [
    ['CONDITION                      ',clc$nominal_entry, 1],
    ['RESULT_IF_FALSE                ',clc$nominal_entry, 3],
    ['RESULT_IF_TRUE                 ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$deferred_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter, 0
  , 0],
{ PARAMETER 3
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$deferred_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$boolean_type]],
{ PARAMETER 2
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]],
{ PARAMETER 3
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]]];

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

    CONST
      p$condition = 1,
      p$result_if_true = 2,
      p$result_if_false = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;
*ELSE
{ FUNCTION (osm$$if) $if (
{   condition: boolean = $required
{   result_if_true: any = $required
{   result_if_false: any = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier_v2,
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier_v2,
      recend,
    recend := [
    [2,
    [91, 8, 17, 14, 10, 48, 0],
    clc$function, 3, 3, 3, 0, 0, 0, 0, 'OSM$$IF'], [
    ['CONDITION                      ',clc$nominal_entry, 1],
    ['RESULT_IF_FALSE                ',clc$nominal_entry, 3],
    ['RESULT_IF_TRUE                 ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0],
{ PARAMETER 2
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 16, clc$required_parameter, 0, 0],
{ PARAMETER 3
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 16, clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[2, 0, clc$boolean_type]],
{ PARAMETER 2
    [[2, 0, clc$union_type], [-$clt$type_kinds_v2 [],
    FALSE, 0]],
{ PARAMETER 3
    [[2, 0, clc$union_type], [-$clt$type_kinds_v2 [],
    FALSE, 0]]];

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

    CONST
      p$condition = 1,
      p$result_if_true = 2,
      p$result_if_false = 3;

    VAR
      pvt: array [1 .. 3] of clt$parameter_value;
*IFEND

    VAR
      expression_text: ^clt$expression_text,
      condition_is_true:  boolean,
      type_specification: ^clt$type_specification;


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

*IF NOT $true(osv$unix)
    IF pvt [p$condition].value^.kind = clc$deferred THEN
      expression_text := pvt [p$condition].value^.deferred_value;
      type_specification := pvt [p$condition].value^.deferred_type;
      clp$evaluate_expression (expression_text^, type_specification, work_area, result, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      condition_is_true := result^.boolean_value.value;
    ELSEIF pvt [p$condition].value^.kind = clc$boolean THEN
      condition_is_true := pvt [p$condition].value^.boolean_value.value;
    IFEND;
    IF condition_is_true THEN
      expression_text := pvt [p$result_if_true].value^.deferred_value;
      type_specification := pvt [p$result_if_true].value^.deferred_type;
    ELSE
      expression_text := pvt [p$result_if_false].value^.deferred_value;
      type_specification := pvt [p$result_if_false].value^.deferred_type;
    IFEND;

    clp$evaluate_expression (expression_text^, type_specification, work_area, result, status);
*ELSE
    IF pvt [p$condition].value^.boolean_value.value THEN
      result := pvt [p$result_if_true].value
    ELSE
      result := pvt [p$result_if_false].value
    IFEND;
*IFEND

  PROCEND clp$$if;
*IF NOT $true(osv$unix)
?? TITLE := 'clp$$job_template_name', EJECT ??

  PROCEDURE [XDCL] clp$$job_template_name
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      job_template_name: ost$name;


    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    osp$get_job_template_name (job_template_name);

    value.descriptor := clv$value_descriptors [clc$string_value];
    value.kind := clc$string_value;
    value.str.size := clp$trimmed_string_size (job_template_name);
    value.str.value := job_template_name;

  PROCEND clp$$job_template_name;
?? TITLE := 'clp$$job_termination_status', EJECT ??

  PROCEDURE [XDCL] clp$$job_termination_status
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$jobts) $job_termination_status

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 9, 23, 13, 43, 50, 326], clc$function, 0, 0, 0, 0, 0, 0, 0, 'OSM$$JOBTS']];

?? POP ??


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

    clp$make_status_value (status, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

    IF jmv$job_termination_status <> NIL THEN
      result^.status_value^ := jmv$job_termination_status^;
    IFEND;

  PROCEND clp$$job_termination_status;
?? TITLE := 'clp$$justify', EJECT ??

  PROCEDURE [XDCL] clp$$justify
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$justify) $justify (
{   subject: string = $required
{   size: integer 0..clc$max_string_size = $required
{   align: key
{       (center, c)
{       (left, l)
{       (right, r)
{     keyend = $required
{   fill: string 1 = ' '
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 4] of clt$pdt_parameter_name,
        parameters: array [1 .. 4] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        type3: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 6] of clt$keyword_specification,
        recend,
        type4: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
          default_value: string (3),
        recend,
      recend := [[1, [87, 10, 27, 19, 15, 13, 285], clc$function, 4, 4, 3, 0, 0, 0, 0, 'OSM$$JUSTIFY'],
            [['ALIGN                          ', clc$nominal_entry, 3],
            ['FILL                           ', clc$nominal_entry, 4],
            ['SIZE                           ', clc$nominal_entry, 2],
            ['SUBJECT                        ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [4, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [3, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$required_parameter, 0, 0],

{ PARAMETER 3

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 229, clc$required_parameter, 0, 0],

{ PARAMETER 4

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_default_parameter, 0,
            3]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],

{ PARAMETER 2

      [[1, 0, clc$integer_type], [0, clc$max_string_size, 10]],

{ PARAMETER 3

      [[1, 0, clc$keyword_type], [6], [['C                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['CENTER                         ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['L                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['LEFT                           ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['R                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['RIGHT                          ', clc$nominal_entry,
            clc$normal_usage_entry, 3]]],

{ PARAMETER 4

      [[1, 0, clc$string_type], [1, 1, FALSE], ''' ''']];

?? POP ??

    CONST
      p$subject = 1,
      p$size = 2,
      p$align = 3,
      p$fill = 4;

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

    VAR
      c: char,
      i: clt$string_index,
      result_size: clt$string_size,
      s: ^clt$string_value,
      subject_size: clt$string_size;



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

    result_size := pvt [p$size].value^.integer_value.value;
    clp$make_sized_string_value (result_size, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

    c := pvt [p$fill].value^.string_value^ (1);
    s := pvt [p$subject].value^.string_value;
    subject_size := STRLENGTH (s^);

    IF pvt [p$align].value^.keyword_value = 'LEFT' THEN
      result^.string_value^ := s^;
      IF c <> ' ' THEN
        FOR i := 1 + subject_size TO result_size DO
          result^.string_value^ (i) := c;
        FOREND;
      IFEND;

    ELSEIF pvt [p$align].value^.keyword_value = 'RIGHT' THEN
      i := 1;
      WHILE i <= (result_size - subject_size) DO
        result^.string_value^ (i) := c;
        i := i + 1;
      WHILEND;
      result^.string_value^ (i, * ) := s^;

    ELSE {CENTER}
      i := 1;
      WHILE i <= ((result_size - subject_size) DIV 2) DO
        result^.string_value^ (i) := c;
        i := i + 1;
      WHILEND;
      result^.string_value^ (i, * ) := s^;
      IF c <> ' ' THEN
        FOR i := i + subject_size TO result_size DO
          result^.string_value^ (i) := c;
        FOREND;
      IFEND;
    IFEND;

  PROCEND clp$$justify;
?? TITLE := 'clp$$lower_bound', EJECT ??

  PROCEDURE [XDCL] clp$$lower_bound
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$lower_bound) $lower_bound, $lowerbound (
{   array: array = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$array_type_qualifier,
        recend,
      recend := [[1, [87, 12, 7, 17, 11, 0, 400], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$LOWER_BOUND'],
            [['ARRAY                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 24, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$array_type], [0, FALSE]]];

?? POP ??

    CONST
      p$array = 1;

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

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

    clp$make_integer_value (LOWERBOUND (pvt [p$array].value^.array_value^), 10, FALSE, work_area, result);

  PROCEND clp$$lower_bound;
?? TITLE := 'clp$$lower_value', EJECT ??

  PROCEDURE [XDCL] clp$$lower_value
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$lower_value) $lower_value (
{   numeric_type: type = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 1, 18, 11, 36, 40, 347], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$LOWER_VALUE'],
            [['NUMERIC_TYPE                   ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$type_specification_type]]];

?? POP ??

    CONST
      p$numeric_type = 1;

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

    VAR
      ignore_type_name: ^clt$type_name_reference,
      integer_type_qualifier: ^clt$integer_type_qualifier,
      real_type_qualifier: ^clt$real_type_qualifier,
      type_specification_header: ^clt$type_specification_header;


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

    RESET pvt [p$numeric_type].value^.type_specification_value;
    NEXT type_specification_header IN pvt [p$numeric_type].value^.type_specification_value;
    IF type_specification_header = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    NEXT ignore_type_name: [type_specification_header^.name_size] IN pvt [p$numeric_type].
          value^.type_specification_value;
    IF ignore_type_name = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    IF type_specification_header^.kind = clc$integer_type THEN
      NEXT integer_type_qualifier IN pvt [p$numeric_type].value^.type_specification_value;
      IF integer_type_qualifier = NIL THEN
        osp$set_status_condition (cle$bad_data_value, status);
        RETURN;
      IFEND;
      clp$make_integer_value (integer_type_qualifier^.min_integer_value, 10, FALSE, work_area, result);
    ELSEIF type_specification_header^.kind = clc$real_type THEN
      NEXT real_type_qualifier IN pvt [p$numeric_type].value^.type_specification_value;
      IF real_type_qualifier = NIL THEN
        osp$set_status_condition (cle$bad_data_value, status);
        RETURN;
      IFEND;
      clp$make_real_value (real_type_qualifier^.min_real_value.long_real, clc$max_real_number_digits,
            work_area, result);
    ELSE
      clp$make_real_value (clv$negative_infinity^, clc$max_real_number_digits, work_area, result);
    IFEND;

    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$lower_value;
?? TITLE := 'clp$$mainframe', EJECT ??

  PROCEDURE [XDCL] clp$$mainframe
    (    parameter_list: clt$parameter_list;
     VAR work_area: ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$mainframe) $mainframe (
{   option: key (active_processors, active_processor, ap) (clock c)
{     (identifier, id, i) (page_size ps) (total_processors total_processor tp)
{     (vector_capability vc) (vectors_degraded vd)
{     (vector_simulation vs)
{    keyend = $required)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 19] of clt$keyword_specification,
      recend,
    recend := [
    [1,
    [89, 4, 6, 17, 9, 2, 471],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$MAINFRAME'], [
    ['OPTION                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 710,
  clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$keyword_type], [19], [
    ['ACTIVE_PROCESSOR               ', clc$alias_entry, clc$normal_usage_entry, 1],
    ['ACTIVE_PROCESSORS              ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['AP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['CLOCK                          ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['I                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['ID                             ', clc$alias_entry, clc$normal_usage_entry, 3],
    ['IDENTIFIER                     ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['PAGE_SIZE                      ', clc$nominal_entry, clc$normal_usage_entry, 4],
    ['PS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
    ['TOTAL_PROCESSOR                ', clc$alias_entry, clc$normal_usage_entry, 5],
    ['TOTAL_PROCESSORS               ', clc$nominal_entry, clc$normal_usage_entry, 5],
    ['TP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
    ['VC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
    ['VD                             ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
    ['VECTORS_DEGRADED               ', clc$nominal_entry, clc$normal_usage_entry, 7],
    ['VECTOR_CAPABILITY              ', clc$nominal_entry, clc$normal_usage_entry, 6],
    ['VECTOR_SIMULATION              ', clc$nominal_entry, clc$normal_usage_entry, 8],
    ['VS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 8]]
    ]];

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

    CONST
      p$option = 1;

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

    VAR
      mainframe_attribute: array [1 .. 1] of pmt$mainframe_attribute,
      keyword: ost$name;

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

    keyword := pvt [p$option].value^.keyword_value;
    IF (keyword = 'ACTIVE_PROCESSORS') THEN
      mainframe_attribute [1].key := pmc$mak_active_processors;

    ELSEIF (keyword = 'CLOCK') THEN
      mainframe_attribute [1].key := pmc$mak_microsecond_clock;

    ELSEIF (keyword = 'IDENTIFIER') THEN
      mainframe_attribute [1].key := pmc$mak_mainframe_identifier;

    ELSEIF (keyword = 'PAGE_SIZE') THEN
      mainframe_attribute [1].key := pmc$mak_page_size;

    ELSEIF keyword = 'TOTAL_PROCESSORS' THEN
      mainframe_attribute [1].key := pmc$mak_total_processors;

    ELSEIF keyword = 'VECTOR_CAPABILITY' THEN
      mainframe_attribute [1].key := pmc$mak_vector_capability;

    ELSEIF keyword = 'VECTORS_DEGRADED' THEN
      mainframe_attribute [1].key := pmc$mak_vectors_degraded;

    ELSEIF keyword = 'VECTOR_SIMULATION' THEN
      mainframe_attribute [1].key := pmc$mak_vector_simulation;
    IFEND;

    pmp$get_mainframe_attributes (mainframe_attribute, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    CASE mainframe_attribute [1].key OF
    = pmc$mak_active_processors =
      clp$make_integer_value (mainframe_attribute [1].active_processors, { Radix = } 10,
            { Radix_specified = } FALSE, work_area, result);

    = pmc$mak_mainframe_identifier =
      clp$make_string_value (mainframe_attribute [1].mainframe_identifier,
            work_area, result);

    = pmc$mak_microsecond_clock =
      clp$make_integer_value (mainframe_attribute [1].microsecond_clock, { Radix = } 10,
            { Radix_specified = } FALSE, work_area, result);

    = pmc$mak_page_size =
      clp$make_integer_value (mainframe_attribute [1].page_size, { Radix = } 10, { Radix_specified = } FALSE,
            work_area, result);

    = pmc$mak_total_processors =
      clp$make_integer_value (mainframe_attribute [1].total_processors, { Radix = } 10,
            { Radix_specified = } FALSE, work_area, result);

    = pmc$mak_vector_capability =
      CASE mainframe_attribute [1].vector_capability OF
      = pmc$extended_vectors =
        clp$make_name_value ('EXTENDED_VECTORS', work_area, result);
      = pmc$standard_vectors =
        clp$make_name_value ('STANDARD_VECTORS', work_area, result);
      = pmc$no_vectors =
        clp$make_name_value ('NO_VECTORS', work_area, result);
      ELSE
        clp$make_name_value ('UNKNOWN', work_area, result);
      CASEND;

    = pmc$mak_vectors_degraded =
      clp$make_boolean_value (mainframe_attribute [1].vectors_degraded, clc$yes_no_boolean, work_area,
            result);

    = pmc$mak_vector_simulation =
      CASE mainframe_attribute [1].vector_simulation OF
      = pmc$vectors_simulated =
        clp$make_name_value ('VECTORS_SIMULATED', work_area, result);
      = pmc$vectors_suspended =
        clp$make_name_value ('VECTORS_SUSPENDED', work_area, result);
      = pmc$vectors_aborted =
        clp$make_name_value ('VECTORS_ABORTED', work_area, result);
      ELSE
        clp$make_name_value ('UNKNOWN', work_area, result);
      CASEND;
    CASEND;

  PROCEND clp$$mainframe;
?? TITLE := 'clp$$max_headroom', EJECT ??

  PROCEDURE [XDCL] clp$$max_headroom
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);


{ FUNCTION (osm$$max_headroom) $max_headroom

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [87, 11, 4, 13, 18, 12, 835], clc$function, 0, 0, 0, 0, 0, 0, 0, 'OSM$$MAX_HEADROOM']];

?? POP ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_string_value ('M-M-M-M-Max here!', work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$max_headroom;
?? TITLE := 'clp$$max_list', EJECT ??

  PROCEDURE [XDCL] clp$$max_list
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$max_list) $max_list

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [87, 10, 24, 16, 58, 19, 648], clc$function, 0, 0, 0, 0, 0, 0, 0, 'OSM$$MAX_LIST']];

?? POP ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_integer_value (clc$max_list_size, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$max_list;
?? TITLE := 'clp$$max_name', EJECT ??

  PROCEDURE [XDCL] clp$$max_name
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$max_name) $max_name

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [87, 10, 24, 16, 59, 17, 240], clc$function, 0, 0, 0, 0, 0, 0, 0, 'OSM$$MAX_NAME']];

?? POP ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_integer_value (osc$max_name_size, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$max_name;
?? TITLE := 'clp$$max_string', EJECT ??

  PROCEDURE [XDCL] clp$$max_string
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$max_string) $max_string

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [87, 10, 24, 17, 0, 5, 308], clc$function, 0, 0, 0, 0, 0, 0, 0, 'OSM$$MAX_STRING']];

?? POP ??

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_integer_value (clc$max_string_size, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$max_string;
?? TITLE := 'clp$$max_string_size', EJECT ??

  PROCEDURE [XDCL] clp$$max_string_size
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$max_string_size) $max_string_size (
{   string_type: type = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 1, 18, 8, 30, 0, 338], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$MAX_STRING_SIZE'],
            [['STRING_TYPE                    ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$type_specification_type]]];

?? POP ??

    CONST
      p$string_type = 1;

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

    VAR
      ignore_type_name: ^clt$type_name_reference,
      max_string_size: integer,
      string_type_qualifier: ^clt$string_type_qualifier,
      type_specification_header: ^clt$type_specification_header;


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

    RESET pvt [p$string_type].value^.type_specification_value;
    NEXT type_specification_header IN pvt [p$string_type].value^.type_specification_value;
    IF type_specification_header = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    NEXT ignore_type_name: [type_specification_header^.name_size] IN pvt [p$string_type].
          value^.type_specification_value;
    IF ignore_type_name = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    IF type_specification_header^.kind = clc$string_type THEN
      NEXT string_type_qualifier IN pvt [p$string_type].value^.type_specification_value;
      IF string_type_qualifier = NIL THEN
        osp$set_status_condition (cle$bad_data_value, status);
        RETURN;
      IFEND;
      max_string_size := string_type_qualifier^.max_string_size;
    ELSE
      max_string_size := clc$max_string_size;
    IFEND;

    clp$make_integer_value (max_string_size, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$max_string_size;
?? TITLE := 'clp$$message_level', EJECT ??

  PROCEDURE [XDCL] clp$$message_level
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      message_level_adt: [STATIC, READ, cls$adt] array [1 .. 1] of clt$argument_descriptor := [
            {1} [[clc$required], [^message_level_attb_names, clc$keyword_value]]],
      message_level_attb_names: [STATIC, READ, cls$adt_names_and_defaults] array [1 .. 4] of
            ost$name := ['BRIEF', 'B', 'FULL', 'F'];

    VAR
      message_level: ^ost$status_message_level,
      avt: array [1 .. 1] of clt$value;

    clp$scan_argument_list (function_name, argument_list, ^message_level_adt, ^avt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    osp$find_status_message_level (message_level);

    value.descriptor := clv$value_descriptors [clc$boolean_value];
    value.kind := clc$boolean_value;
    value.bool.kind := clc$true_false_boolean;

    value.bool.value := ((avt [1].name.value (1) = 'B') AND (message_level^ = osc$brief_message_level)) OR
          ((avt [1].name.value (1) = 'F') AND (message_level^ = osc$full_message_level));

  PROCEND clp$$message_level;
?? TITLE := 'clp$$min_string_size', EJECT ??

  PROCEDURE [XDCL] clp$$min_string_size
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$min_string_size) $min_string_size (
{   string_type: type = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 1, 18, 8, 32, 25, 372], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$MIN_STRING_SIZE'],
            [['STRING_TYPE                    ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$type_specification_type]]];

?? POP ??

    CONST
      p$string_type = 1;

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

    VAR
      ignore_type_name: ^clt$type_name_reference,
      min_string_size: integer,
      string_type_qualifier: ^clt$string_type_qualifier,
      type_specification_header: ^clt$type_specification_header;


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

    RESET pvt [p$string_type].value^.type_specification_value;
    NEXT type_specification_header IN pvt [p$string_type].value^.type_specification_value;
    IF type_specification_header = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    NEXT ignore_type_name: [type_specification_header^.name_size] IN pvt [p$string_type].
          value^.type_specification_value;
    IF ignore_type_name = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    IF type_specification_header^.kind = clc$string_type THEN
      NEXT string_type_qualifier IN pvt [p$string_type].value^.type_specification_value;
      IF string_type_qualifier = NIL THEN
        osp$set_status_condition (cle$bad_data_value, status);
        RETURN;
      IFEND;
      min_string_size := string_type_qualifier^.min_string_size;
    ELSE
      min_string_size := 0;
    IFEND;

    clp$make_integer_value (min_string_size, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$min_string_size;
*IFEND
?? TITLE := 'clp$$name', EJECT ??

  PROCEDURE [XDCL] clp$$name
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

*IF NOT $true(osv$unix)
{ FUNCTION (osm$$name) $name (
{   source: any of
{       string
{       program_name
{     anyend = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: 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$string_type_qualifier,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
          recend,
        recend,
      recend := [[1, [88, 5, 14, 10, 10, 9, 627], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$NAME'],
            [['SOURCE                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 31, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [[clc$program_name_type, clc$string_type], FALSE, 2], 8,
            [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]], 3, [[1, 0, clc$program_name_type]]]];

?? POP ??

    CONST
      p$source = 1;

    VAR
      pvt: array [1 .. 1] of clt$parameter_value;
*ELSE
{ FUNCTION (osm$$name) $name (
{   source: any of
{       string
{       program_name
{     anyend = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier_v2,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
        recend,
      recend,
    recend := [
    [2,
    [91, 8, 27, 7, 56, 15, 0],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$NAME'], [
    ['SOURCE                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 39, clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[2, 0, clc$union_type], [[clc$program_name_type,
    clc$string_type],
    FALSE, 2],
    9, [[2, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
    3, [[2, 0, clc$program_name_type]]
    ]];

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

    CONST
      p$source = 1;

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

    VAR
      name: clt$name,
      source: ^clt$string_value;


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

    IF pvt [p$source].value^.kind = clc$string THEN
      source := pvt [p$source].value^.string_value;
    ELSE {program_name}
      source := ^pvt [p$source].value^.program_name_value;
    IFEND;

    clp$convert_string_to_name (source^, name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_name_value (name.value, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$name;
*IF NOT $true(osv$unix)
?? TITLE := 'clp$$unspecified_value', EJECT ??

  PROCEDURE [XDCL] clp$$unspecified_value
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $unspecified_value (
{   value: any = $optional
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
    recend := [
    [1,
    [94, 10, 12, 0, 8, 26, 721],
    clc$function, 1, 1, 0, 0, 0, 0, 0, ''], [
    ['VALUE                          ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 12, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]]];

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

    CONST
      p$value = 1;

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

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

    IF pvt [p$value].specified THEN
      IF (pvt [p$value].value <> NIL) OR (pvt [p$value].value^.kind <> clc$unspecified) THEN
        clp$make_boolean_value(FALSE, clc$true_false_boolean, work_area, result);
        RETURN;
      IFEND;
    IFEND;

    clp$make_boolean_value(TRUE, clc$true_false_boolean, work_area, result);

  PROCEND clp$$unspecified_value;
?? TITLE := 'clp$$keyword', EJECT ??

  PROCEDURE [XDCL] clp$$keyword
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$keyword) $keyword (
{   source: any of
{       string
{       name
{     anyend = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: 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$string_type_qualifier,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
      recend,
    recend := [
    [1,
    [94, 8, 18, 4, 51, 51, 827],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$KEYWORD'], [
    ['SOURCE                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 33, clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$name_type, clc$string_type],
    TRUE, 2],
    8, [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ]];

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

    CONST
      p$source = 1;

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

    VAR
      keyword: clt$name,
      source: ^clt$string_value;


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

    IF pvt [p$source].value^.kind = clc$string THEN
      source := pvt [p$source].value^.string_value;
    ELSE {name}
      source := ^pvt [p$source].value^.name_value;
    IFEND;

    clp$convert_string_to_name (source^, keyword, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_keyword_value (keyword.value, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$keyword;
?? TITLE := 'clp$$application', EJECT ??

  PROCEDURE [XDCL] clp$$application
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$application) $application (
{   source: string = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
    recend := [
    [1,
    [94, 8, 18, 4, 52, 47, 294],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$APPLICATION'], [
    ['SOURCE                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

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

    CONST
      p$source = 1;

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


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

    clp$make_application_value (pvt [p$source].value^.string_value^, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$application;
?? TITLE := 'nap$$namve_active', EJECT ??

  PROCEDURE [XDCL] nap$$namve_active
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);


    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    value.descriptor := clv$value_descriptors [clc$boolean_value];
    value.kind := clc$boolean_value;
    value.bool.kind := clc$true_false_boolean;
    value.bool.value := nap$namve_active ();

  PROCEND nap$$namve_active;
?? TITLE := 'nap$$namve_config_activated', EJECT ??

  PROCEDURE [XDCL] nap$$namve_config_activated
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);


    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    value.descriptor := clv$value_descriptors [clc$boolean_value];
    value.kind := clc$boolean_value;
    value.bool.kind := clc$true_false_boolean;
    value.bool.value := nap$namve_config_activated ();

  PROCEND nap$$namve_config_activated;
?? TITLE := 'clp$$natural_language', EJECT ??

  PROCEDURE [XDCL] clp$$natural_language
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      natural_language: ^ost$natural_language;

    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    osp$find_natural_language (natural_language);

    value.descriptor := clv$value_descriptors [clc$name_value];
    value.kind := clc$name_value;
    value.name.size := clp$trimmed_string_size (natural_language^);
    value.name.value := natural_language^;

  PROCEND clp$$natural_language;
?? TITLE := 'clp$$not', EJECT ??

  PROCEDURE [XDCL] clp$$not
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION (osm$$not) $not (
{    value: boolean = $required
{    )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 3, 17, 11, 41, 4, 899], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$NOT'],
            [['VALUE                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$boolean_type]]];

?? POP ??

    CONST
      p$value = 1;

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


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_boolean_value (NOT (pvt [p$value].value^.boolean_value.value), clc$true_false_boolean, work_area,
          result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$not;
?? TITLE := 'clp$$now', EJECT ??

  PROCEDURE [XDCL] clp$$now
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$now) $now

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [87, 10, 31, 15, 34, 45, 494], clc$function, 0, 0, 0, 0, 0, 0, 0, 'OSM$$NOW']];

?? POP ??

    VAR
      date_time: clt$date_time,
      date_time_value: ost$date_time;


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    pmp$get_compact_date_time (date_time_value, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    date_time.value := date_time_value;
    date_time.date_specified := TRUE;
    date_time.time_specified := TRUE;
    clp$make_date_time_value (date_time, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$now;
*IFEND
?? TITLE := 'clp$$ord', EJECT ??

  PROCEDURE [XDCL] clp$$ord
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      ord_adt: [STATIC, READ, cls$adt] array [1 .. 1] of clt$argument_descriptor := [
            {1} [[clc$required], [NIL, clc$string_value, 1, 1]]];

    VAR
      avt: array [1 .. 1] of clt$value;

    clp$scan_argument_list (function_name, argument_list, ^ord_adt, ^avt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    value.descriptor := clv$value_descriptors [clc$integer_value];
    value.kind := clc$integer_value;
    value.int.radix := 10;
    value.int.radix_specified := FALSE;
    value.int.value := $INTEGER (avt [1].str.value (1));

  PROCEND clp$$ord;
*IF NOT $true(osv$unix)
?? TITLE := 'clp$$previous_status', EJECT ??

  PROCEDURE [XDCL] clp$$previous_status
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      block: ^clt$block;

    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$find_input_block (FALSE, block);
    IF block = NIL THEN
      osp$set_status_abnormal ('CL', cle$unexpected_call_to, '$PREVIOUS_STATUS', status);
      RETURN;
    IFEND;
    IF ((block^.kind = clc$command_proc_block) OR (block^.kind = clc$function_proc_block)) AND
          (NOT block^.parameters.evaluated) THEN
      REPEAT
        block := block^.previous_block;
      UNTIL block^.kind IN $clt$block_kinds [clc$command_proc_block, clc$function_proc_block, clc$input_block,
            clc$when_block];
    IFEND;
    value.descriptor := clv$value_descriptors [clc$status_value];
    value.kind := clc$status_value;
    value.status := block^.previous_command_status;

  PROCEND clp$$previous_status;
?? TITLE := 'clp$$processor', EJECT ??

  PROCEDURE [XDCL] clp$$processor
    (    parameter_list: clt$parameter_list;
     VAR work_area: ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);


{ FUNCTION (osm$$processor) $processor (
{   option: key
{       (clock, c)
{       (model_number, mn)
{       (model_type, model, m, mt)
{       (serial_number, serial, sn)
{       (state, s)
{     hidden_key
{       (binary_model_number, bmn)
{     keyend = $required
{   processor_number: integer 0..1 = $optional
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 15] of clt$keyword_specification,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
      recend,
    recend := [
    [1,
    [90, 11, 15, 19, 33, 30, 631],
    clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$PROCESSOR'], [
    ['OPTION                         ',clc$nominal_entry, 1],
    ['PROCESSOR_NUMBER               ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 562, clc$required_parameter, 0, 0],
{ PARAMETER 2
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 20, clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$keyword_type], [15], [
    ['BINARY_MODEL_NUMBER            ', clc$nominal_entry, clc$hidden_entry, 6
  ],
    ['BMN                            ', clc$abbreviation_entry,
  clc$hidden_entry, 6],
    ['C                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 1],
    ['CLOCK                          ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['M                              ', clc$alias_entry,
  clc$normal_usage_entry, 3],
    ['MN                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['MODEL                          ', clc$alias_entry,
  clc$normal_usage_entry, 3],
    ['MODEL_NUMBER                   ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['MODEL_TYPE                     ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['MT                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['S                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 5],
    ['SERIAL                         ', clc$alias_entry,
  clc$normal_usage_entry, 4],
    ['SERIAL_NUMBER                  ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
    ['SN                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
    ['STATE                          ', clc$nominal_entry,
  clc$normal_usage_entry, 5]]
    ],
{ PARAMETER 2
    [[1, 0, clc$integer_type], [0, 1, 10]]];

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

    CONST
      p$option = 1,
      p$processor_number = 2;

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

    VAR
      cpu_attributes: pmt$cpu_attributes,
      mainframe_id: pmt$binary_mainframe_id,
      microsecond_clock: integer,
      model_type: pmt$processor_model_type,
      model_number: pmt$processor_model_number,
      serial_number: pmt$processor_serial_number,
      state: pmt$processor_state;


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

    IF NOT pvt [p$processor_number].specified THEN
      pmp$get_processor_id (model_type, model_number, serial_number, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      state := pmc$processor_state_on;

    ELSE
      pmp$get_cpu_attributes (cpu_attributes, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      model_type := cpu_attributes.cpu [pvt [p$processor_number].value^.integer_value.value].model_type;
      model_number := cpu_attributes.cpu [pvt [p$processor_number].value^.integer_value.value].model_number;
      serial_number := cpu_attributes.cpu [pvt [p$processor_number].value^.integer_value.value].serial_number;
      state := cpu_attributes.cpu [pvt [p$processor_number].value^.integer_value.value].state;
    IFEND;

    IF pvt [p$option].value^.keyword_value = 'BINARY_MODEL_NUMBER' THEN
      pmp$get_binary_mainframe_id (mainframe_id, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      clp$make_integer_value (mainframe_id.model_number, { Radix = } 16, { Radix_specified = } TRUE,
            work_area, result);

    ELSEIF pvt [p$option].value^.keyword_value = 'CLOCK' THEN
      pmp$get_microsecond_clock (microsecond_clock, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      clp$make_integer_value (microsecond_clock, { Radix = } 10, { Radix_specified = } FALSE, work_area,
            result);

    ELSEIF (pvt [p$option].value^.keyword_value = 'MODEL_NUMBER') THEN
      clp$make_string_value (model_number (1, clp$trimmed_string_size (model_number)), work_area, result);

    ELSEIF (pvt [p$option].value^.keyword_value = 'MODEL_TYPE') THEN
      clp$make_string_value (model_type (1, clp$trimmed_string_size (model_type)), work_area, result);

    ELSEIF (pvt [p$option].value^.keyword_value = 'SERIAL_NUMBER') THEN
      clp$make_string_value (serial_number (1, clp$trimmed_string_size (serial_number)), work_area, result);

    ELSEIF (pvt [p$option].value^.keyword_value = 'STATE') THEN
      clp$make_string_value (state (1, clp$trimmed_string_size (state)), work_area, result);

    IFEND;

  PROCEND clp$$processor;
?? TITLE := 'clp$$program_name', EJECT ??

  PROCEDURE [XDCL] clp$$program_name
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$program_name) $program_name (
{   source: program_name = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 5, 14, 10, 18, 40, 387], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$PROGRAM_NAME'],
            [['SOURCE                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$program_name_type]]];

?? POP ??

    CONST
      p$source = 1;

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

    VAR
      program_name: clt$name,
      source: ^clt$string_value;

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

    source := ^pvt [p$source].value^.program_name_value;

    clp$convert_string_to_name (source^, program_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_program_name_value (program_name.value, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$program_name;
?? TITLE := 'clp$$queue', EJECT ??

  PROCEDURE [XDCL] clp$$queue
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$queue) $queue (
{   queue_name: name = $required
{   option: key connect_count, message_count, wait_count keyend = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 3] of clt$keyword_specification,
        recend,
      recend := [[1, [88, 9, 29, 17, 19, 36, 180], clc$function, 2, 2, 2, 0, 0, 0, 0, 'OSM$$QUEUE'],
            [['OPTION                         ', clc$nominal_entry, 2],
            ['QUEUE_NAME                     ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 118, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$name_type], [1, osc$max_name_size]],

{ PARAMETER 2

      [[1, 0, clc$keyword_type], [3], [['CONNECT_COUNT                  ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['MESSAGE_COUNT                  ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['WAIT_COUNT                     ', clc$nominal_entry,
            clc$normal_usage_entry, 3]]]];

?? POP ??

    CONST
      p$queue_name = 1,
      p$option = 2;

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

    VAR
      counts: pmt$queue_status,
      ignore_status: ost$status,
      queue_id: pmt$queue_connection;

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

    pmp$connect_queue (pvt [p$queue_name].value^.name_value, queue_id, status);
    IF NOT status.normal AND (status.condition = pme$unknown_queue_name) THEN
      pmp$define_queue (pvt [p$queue_name].value^.name_value, osc$user_ring_2, osc$user_ring_2, status);
      IF status.normal OR (status.condition = pme$queue_already_defined) THEN
        pmp$connect_queue (pvt [p$queue_name].value^.name_value, queue_id, status);
      IFEND;
    IFEND;
    IF status.normal THEN
      pmp$status_queue (queue_id, counts, status);
      pmp$disconnect_queue (queue_id, ignore_status);
    ELSEIF status.condition = pme$task_already_connected THEN
      pmp$status_queue (queue_id, counts, status);
    IFEND;
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_integer_value (0, 10, FALSE, work_area, result);
    IF pvt [p$option].value^.keyword_value = 'CONNECT_COUNT' THEN
      result^.integer_value.value := counts.connections;
    ELSEIF pvt [p$option].value^.keyword_value = 'MESSAGE_COUNT' THEN
      result^.integer_value.value := counts.messages;
    ELSEIF pvt [p$option].value^.keyword_value = 'WAIT_COUNT' THEN
      result^.integer_value.value := counts.waiting_tasks;
    IFEND;

  PROCEND clp$$queue;
?? TITLE := 'clp$$quote', EJECT ??

  PROCEDURE [XDCL] clp$$quote
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$quote) $quote (
{   string: string = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend := [[1, [87, 10, 26, 13, 36, 4, 112], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$QUOTE'],
            [['STRING                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

?? POP ??

    CONST
      p$string = 1;

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

    VAR
      found: boolean,
      i: clt$string_index,
      j: clt$string_index,
      result_size: integer,
      s: ^clt$string_value;


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

    s := pvt [p$string].value^.string_value;
    result_size := STRLENGTH (s^) + 2;

  /adjust_for_embedded_quotes/
    WHILE TRUE DO
      #SCAN (clv$string_delimiter, s^, i, found);
      IF NOT found THEN
        EXIT /adjust_for_embedded_quotes/;
      IFEND;
      result_size := result_size + 1;
      s := ^s^ (i + 1, * );
    WHILEND /adjust_for_embedded_quotes/;

    IF result_size > clc$max_string_size THEN
      osp$set_status_condition (cle$string_too_long, status);
      RETURN;
    IFEND;

    clp$make_sized_string_value (result_size, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

    s := pvt [p$string].value^.string_value;
    result^.string_value^ (1) := '''';
    j := 2;
    WHILE TRUE DO
      #SCAN (clv$string_delimiter, s^, i, found);
      result^.string_value^ (j, i - 1) := s^ (1, i - 1);
      j := j + i - 1;
      result^.string_value^ (j) := '''';
      IF NOT found THEN
        RETURN;
      IFEND;
      result^.string_value^ (j + 1) := '''';
      j := j + 2;
      s := ^s^ (i + 1, * );
    WHILEND;

  PROCEND clp$$quote;
?? TITLE := 'clp$$range_of', EJECT ??

  PROCEDURE [XDCL] clp$$range_of
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$range_of) $range_of (
{   low: any = $required
{   high: any = $optional
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
        recend,
      recend := [[1, [88, 4, 30, 17, 6, 28, 68], clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$RANGE_OF'],
            [['HIGH                           ', clc$nominal_entry, 2],
            ['LOW                            ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$optional_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [-$clt$type_kinds [], FALSE, 0]],

{ PARAMETER 2

      [[1, 0, clc$union_type], [-$clt$type_kinds [], FALSE, 0]]];

?? POP ??

    CONST
      p$low = 1,
      p$high = 2;

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


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

    clp$make_range_value (work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

    result^.low_value := pvt [p$low].value;
    IF pvt [p$high].specified THEN
      result^.high_value := pvt [p$high].value;
    ELSE
      result^.high_value := pvt [p$low].value;
    IFEND;

  PROCEND clp$$range_of;
?? TITLE := 'clp$$range_specified', EJECT ??

  PROCEDURE [XDCL] clp$$range_specified
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$range_specified) $range_specified (
{   range: range = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$range_type_qualifier,
        recend,
      recend := [[1, [87, 10, 25, 16, 23, 12, 62], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$RANGE_SPECIFIED'],
            [['RANGE                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 7, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$range_type], [0]]];

?? POP ??

    CONST
      p$range = 1;

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

    VAR
      range_specified: boolean;


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

    range_specified := (pvt [p$range].value^.kind = clc$range) AND
          (pvt [p$range].value^.high_value <> pvt [p$range].value^.low_value);
    clp$make_boolean_value (range_specified, clc$true_false_boolean, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$range_specified;
?? TITLE := 'clp$$record', EJECT ??

  PROCEDURE [XDCL] clp$$record
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$record) $record (
{   fields: list rest of record
{       name: name
{       value: any = $optional
{     recend = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier,
        element_type_spec: 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,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$union_type_qualifier,
          recend,
        recend,
      recend,
    recend := [
    [1,
    [90, 1, 18, 13, 5, 51, 362],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$RECORD'], [
    ['FIELDS                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 112,
  clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$list_type], [96, 1, clc$max_list_size, TRUE],
      [[1, 0, clc$record_type], [2],
      ['NAME                           ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['VALUE                          ', clc$optional_field, 12], [[1, 0, clc$union_type], [
  -$clt$type_kinds [],
        FALSE, 0]]
      ]
    ]];

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

    CONST
      p$fields = 1;

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

    VAR
      i: 1 .. clc$max_list_size,
      j: 1 .. clc$max_list_size,
      node: ^clt$data_value,
      number_of_fields: clt$list_size;


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

    number_of_fields := clp$count_list_elements (pvt [p$fields].value);
    node := pvt [p$fields].value;
    clp$make_record_value (number_of_fields, work_area, result);

    FOR i := 1 TO number_of_fields DO
      result^.field_values^ [i].name := node^.element_value^.field_values^ [1].value^.name_value;
      FOR j := 1 TO i - 1 DO
        IF result^.field_values^ [j].name = result^.field_values^ [i].name THEN
          osp$set_status_abnormal ('CL', cle$duplicate_field_name, result^.field_values^ [i].name, status);
          RESET work_area TO result;
          result := NIL;
          RETURN;
        IFEND;
      FOREND;
      result^.field_values^ [i].value := node^.element_value^.field_values^ [2].value;
      node := node^.link;
    FOREND;

  PROCEND clp$$record;
?? TITLE := 'clp$$scan_any', EJECT ??

  PROCEDURE [XDCL] clp$$scan_any
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$scan_any) $scan_any (
{   characters: string 1..256 = $required
{   string: string = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend := [[1, [87, 10, 28, 9, 6, 6, 582], clc$function, 2, 2, 2, 0, 0, 0, 0, 'OSM$$SCAN_ANY'],
            [['CHARACTERS                     ', clc$nominal_entry, 1],
            ['STRING                         ', clc$nominal_entry, 2]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [1, 256, FALSE]],

{ PARAMETER 2

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

?? POP ??

    CONST
      p$characters = 1,
      p$string = 2;

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

    TYPE
      char_set = set of char;

    VAR
      chars: char_set,
      found: boolean,
      i: integer;


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

    chars := $char_set [];
    FOR i := 1 TO STRLENGTH (pvt [p$characters].value^.string_value^) DO
      chars := chars + $char_set [pvt [p$characters].value^.string_value^ (i)];
    FOREND;

    #SCAN (chars, pvt [p$string].value^.string_value^, i, found);
    IF NOT found THEN
      i := 0;
    IFEND;

    clp$make_integer_value (i, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

  PROCEND clp$$scan_any;
?? TITLE := 'clp$$scan_not_any', EJECT ??

  PROCEDURE [XDCL] clp$$scan_not_any
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$scan_not_any) $scan_not_any, $scan_notany (
{   characters: string 1..256 = $required
{   string: string = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend := [[1, [87, 10, 28, 9, 25, 31, 808], clc$function, 2, 2, 2, 0, 0, 0, 0, 'OSM$$SCAN_NOT_ANY'],
            [['CHARACTERS                     ', clc$nominal_entry, 1],
            ['STRING                         ', clc$nominal_entry, 2]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [1, 256, FALSE]],

{ PARAMETER 2

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

?? POP ??

    CONST
      p$characters = 1,
      p$string = 2;

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

    TYPE
      char_set = set of char;

    VAR
      chars: char_set,
      found: boolean,
      i: integer;


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

    chars := $char_set [];
    FOR i := 1 TO STRLENGTH (pvt [p$characters].value^.string_value^) DO
      chars := chars + $char_set [pvt [p$characters].value^.string_value^ (i)];
    FOREND;
    chars := -chars;

    #SCAN (chars, pvt [p$string].value^.string_value^, i, found);
    IF NOT found THEN
      i := 0;
    IFEND;

    clp$make_integer_value (i, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

  PROCEND clp$$scan_not_any;
?? TITLE := 'clp$$scan_string', EJECT ??

  PROCEDURE [XDCL] clp$$scan_string
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$scan_string) $scan_string (
{   pattern: string = $required
{   string: string = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend := [[1, [87, 10, 28, 9, 31, 49, 390], clc$function, 2, 2, 2, 0, 0, 0, 0, 'OSM$$SCAN_STRING'],
            [['PATTERN                        ', clc$nominal_entry, 1],
            ['STRING                         ', clc$nominal_entry, 2]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],

{ PARAMETER 2

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

?? POP ??

    CONST
      p$pattern = 1,
      p$string = 2;

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

    VAR
      i: integer,
      p: ^clt$string_value,
      s: ^clt$string_value;


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

    p := pvt [p$pattern].value^.string_value;
    s := pvt [p$string].value^.string_value;

    i := 1;
    IF STRLENGTH (p^) > 0 THEN

    /scan/
      BEGIN
        WHILE (i <= STRLENGTH (s^)) AND (STRLENGTH (p^) <= (STRLENGTH (s^) - i + 1)) DO
          IF s^ (i, STRLENGTH (p^)) = p^ THEN
            EXIT /scan/;
          IFEND;
          i := i + 1;
        WHILEND;
        i := 0;
      END /scan/;
    IFEND;

    clp$make_integer_value (i, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

  PROCEND clp$$scan_string;
?? TITLE := 'clp$$scl_test_harness_active', EJECT ??

  PROCEDURE [XDCL] clp$$scl_test_harness_active
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    clp$scan_argument_list (function_name, argument_list, NIL, NIL, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    value.descriptor := clv$value_descriptors [clc$boolean_value];
    value.kind := clc$boolean_value;
    value.bool.kind := clc$true_false_boolean;
    value.bool.value := clc$compiling_for_test_harness;

  PROCEND clp$$scl_test_harness_active;
?? TITLE := 'clp$$severity', EJECT ??

  PROCEDURE [XDCL] clp$$severity
    (    function_name: clt$name;
         argument_list: string ( * );
     VAR value: clt$value;
     VAR status: ost$status);

    VAR
      severity_adt: [STATIC, READ, cls$adt] array [1 .. 1] of clt$argument_descriptor := [
            {1} [[clc$required], [NIL, clc$integer_value, 0, osc$max_condition]]];

    VAR
      severity: ost$status_severity,
      avt: array [1 .. 1] of clt$value;

    clp$scan_argument_list (function_name, argument_list, ^severity_adt, ^avt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    osp$get_status_severity (avt [1].int.value, severity, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    value.descriptor := clv$value_descriptors [clc$string_value];
    value.kind := clc$string_value;
    value.str.size := osv$severities [severity].size;
    value.str.value := osv$severities [severity].value;

  PROCEND clp$$severity;
?? TITLE := 'clp$$size', EJECT ??

  PROCEDURE [XDCL] clp$$size
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$size) $size (
{   value: any of
{       string
{       list 0..clc$max_list_size
{     anyend = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: 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$string_type_qualifier,
          recend,
          type_size_2: clt$type_specification_size,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$list_type_qualifier,
          recend,
        recend,
      recend := [[1, [87, 10, 28, 12, 50, 16, 385], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$SIZE'],
            [['VALUE                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 44, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [[clc$list_type, clc$string_type], FALSE, 2], 8,
            [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]], 16,
            [[1, 0, clc$list_type], [0, 0, clc$max_list_size, FALSE]]]];

?? POP ??

    CONST
      p$value = 1;

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

    VAR
      size: integer;


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

    IF pvt [p$value].value^.kind = clc$string THEN
      size := STRLENGTH (pvt [p$value].value^.string_value^);
    ELSE
      size := clp$count_list_elements (pvt [p$value].value);
    IFEND;

    clp$make_integer_value (size, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

  PROCEND clp$$size;
?? TITLE := 'clp$$sort_fields', EJECT ??

  PROCEDURE [XDCL] clp$$sort_fields
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$sort_fields) $sort_fields (
{   record: any = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
    recend := [
    [1,
    [90, 4, 3, 19, 50, 54, 707],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$SORT_FIELDS'], [
    ['RECORD                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter,
  0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]]];

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

    CONST
      p$record = 1;

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


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

    IF pvt [p$record].value^.kind <> clc$record THEN
      osp$set_status_abnormal ('CL', cle$wrong_kind_of_param_value, 'RECORD', status);
      clp$append_status_value_type (osc$status_parameter_delimiter, pvt [p$record].value, status);
      osp$append_status_parameter (osc$status_parameter_delimiter, 'RECORD', status);
      RETURN;
    IFEND;

    result := pvt [p$record].value;
    clp$sort_record_fields (result^.field_values^);

  PROCEND clp$$sort_fields;
?? TITLE := 'clp$$statistic_code', EJECT ??

  PROCEDURE [XDCL] clp$$statistic_code
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$statistic_code) $statistic_code (
{   statistic_code: statistic_code = $required
{   return_option: key
{       (integer, i)
{       (statistic_code, sc)
{     keyend = integer
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
        default_value: string (7),
      recend,
    recend := [
    [1,
    [103, 3, 5, 18, 2, 51, 400],
    clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$STATISTIC_CODE'], [
    ['RETURN_OPTION                  ',clc$nominal_entry, 2],
    ['STATISTIC_CODE                 ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 155,
  clc$optional_default_parameter, 0, 7]],
{ PARAMETER 1
    [[1, 0, clc$statistic_code_type]],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [4], [
    ['I                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['INTEGER                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['SC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['STATISTIC_CODE                 ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'integer']];

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

    CONST
      p$statistic_code = 1,
      p$return_option = 2;

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


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

    IF pvt [p$return_option].value^.keyword_value = 'INTEGER' THEN
      clp$make_integer_value (pvt [p$statistic_code].value^.statistic_code_value, 10, FALSE, work_area,
            result);
    ELSE
      clp$make_statistic_code_value (pvt [p$statistic_code].value^.statistic_code_value, work_area, result);
    IFEND;

    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$statistic_code;
?? TITLE := 'clp$$statistic_code_string', EJECT ??

  PROCEDURE [XDCL] clp$$statistic_code_string
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);


{ FUNCTION (sfm$$stacs) $statistic_code_string (
{   statistic_code: statistic_code = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 3, 5, 18, 2, 17, 58],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'SFM$$STACS'], [
    ['STATISTIC_CODE                 ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$statistic_code_type]]];

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

    CONST
      p$statistic_code = 1;

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

    VAR
      condition_string: ost$string;


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    osp$get_status_condition_string (pvt [p$statistic_code].value^.statistic_code_value, condition_string,
          status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_string_value (condition_string.value (1, condition_string.size), work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$statistic_code_string;
?? TITLE := 'clp$$status', EJECT ??

  PROCEDURE [XDCL] clp$$status
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{   FUNCTION (osm$$status) $status (
{       normal: boolean = $required
{       identifier: string 2
{       condition: status_code
{       text: list rest of any)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 4] of clt$pdt_parameter_name,
        parameters: array [1 .. 4] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type3: record
          header: clt$type_specification_header,
        recend,
        type4: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$union_type_qualifier,
          recend,
        recend,
      recend := [[1, [87, 10, 30, 11, 4, 45, 357], clc$function, 4, 4, 1, 0, 0, 0, 0, 'OSM$$STATUS'],
            [['CONDITION                      ', clc$nominal_entry, 3],
            ['IDENTIFIER                     ', clc$nominal_entry, 2],
            ['NORMAL                         ', clc$nominal_entry, 1],
            ['TEXT                           ', clc$nominal_entry, 4]], [

{ PARAMETER 1

      [3, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_parameter, 0, 0],

{ PARAMETER 3

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0],

{ PARAMETER 4

      [4, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 28, clc$optional_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$boolean_type]],

{ PARAMETER 2

      [[1, 0, clc$string_type], [2, 2, FALSE]],

{ PARAMETER 3

      [[1, 0, clc$status_code_type]],

{ PARAMETER 4

      [[1, 0, clc$list_type], [12, 1, clc$max_list_size, TRUE],
            [[1, 0, clc$union_type], [-$clt$type_kinds [], FALSE, 0]]]];

?? POP ??

    CONST
      p$normal = 1,
      p$identifier = 2,
      p$condition = 3,
      p$text = 4;

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


    VAR
      condition: ost$status_condition_code,
      condition_radix: integer,
      integer_string: ost$string,
      next_element: ^clt$data_value,
      next_text: ^clt$data_value,
      result_status: ost$status,
      string_sequence: ^clt$data_representation,
      string_pointer: ^clt$string_value;


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

    result_status.normal := pvt [p$normal].value^.boolean_value.value;

    IF NOT result_status.normal THEN

      IF pvt [p$identifier].value = NIL THEN
        osp$set_status_abnormal ('CL', cle$required_argument_omitted, '$STATUS', status);
        osp$append_status_parameter (osc$status_parameter_delimiter, 'IDENTIFIER', status);
        RETURN;
      IFEND;

      IF pvt [p$condition].value = NIL THEN
        osp$set_status_abnormal ('CL', cle$required_argument_omitted, '$STATUS', status);
        osp$append_status_parameter (osc$status_parameter_delimiter, 'CONDITION', status);
        RETURN;
      IFEND;

      osp$set_status_abnormal (pvt [p$identifier].value^.string_value^ (1, 2),
            pvt [p$condition].value^.status_code_value, '', result_status);
      next_element := pvt [p$text].value;

    /append_text/
      WHILE next_element <> NIL DO
        next_text := next_element^.element_value;
        CASE next_text^.kind OF
        = clc$string =
          osp$append_status_parameter (osc$status_parameter_delimiter, next_text^.string_value^,
                result_status);

        = clc$name =
          osp$append_status_parameter (osc$status_parameter_delimiter, next_text^.name_value, result_status);

        = clc$integer =
          osp$append_status_integer (osc$status_parameter_delimiter, next_text^.integer_value.value,
                next_text^.integer_value.radix, next_text^.integer_value.radix_specified, result_status);

        = clc$file =
          osp$append_status_file (osc$status_parameter_delimiter, next_text^.file_value^, result_status);

        = clc$real =
          osp$append_status_real (osc$status_parameter_delimiter, next_text^.real_value.value,
                next_text^.real_value.number_of_digits, result_status);

        ELSE
          clp$convert_data_to_string (next_text, clc$data_source_representation, clc$max_string_size,
                work_area, string_sequence, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
          string_pointer := clp$data_representation_text (string_sequence);
          osp$append_status_parameter (osc$status_parameter_delimiter, string_pointer^, result_status);
        CASEND;
        next_element := next_element^.link;
      WHILEND /append_text/;
    IFEND;

    clp$make_status_value (result_status, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$status;
?? TITLE := 'clp$$status_code', EJECT ??

  PROCEDURE [XDCL] clp$$status_code
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$status_code) $status_code (
{   status_code: status_code = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [87, 10, 30, 14, 15, 46, 322], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$STATUS_CODE'],
            [['STATUS_CODE                    ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$status_code_type]]];

?? POP ??

    CONST
      p$status_code = 1;

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


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_integer_value (pvt [p$status_code].value^.status_code_value, 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$status_code;
?? TITLE := 'clp$$status_code_name', EJECT ??

  PROCEDURE [XDCL] clp$$status_code_name
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$stacn) $status_code_name (
{   status_code: status_code = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 23, 13, 45, 31, 629], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$STACN'],
            [['STATUS_CODE                    ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$status_code_type]]];

?? POP ??

    CONST
      p$status_code = 1;

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

    VAR
      name: ost$status_condition_name;


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    osp$get_status_condition_name (pvt [p$status_code].value^.status_code_value, name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_value (clc$name, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;
    result^.name_value := name;

  PROCEND clp$$status_code_name;
?? TITLE := 'clp$$status_code_string', EJECT ??

  PROCEDURE [XDCL] clp$$status_code_string
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);


{ FUNCTION (osm$$stacs) $status_code_string (
{   status_code: status_code = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 23, 13, 46, 13, 641], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$STACS'],
            [['STATUS_CODE                    ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$status_code_type]]];

?? POP ??

    CONST
      p$status_code = 1;

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

    VAR
      condition_string: ost$string;


    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    osp$get_status_condition_string (pvt [p$status_code].value^.status_code_value, condition_string, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$make_string_value (condition_string.value (1, condition_string.size), work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$status_code_string;
?? TITLE := 'clp$$status_message', EJECT ??

  PROCEDURE [XDCL] clp$$status_message
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$status_message) $status_message (
{   status: status = $required
{   maximum_line_size: integer osc$min_status_message_line..osc$max_status_message_line = $required
{   message_level: key
{       (current, c)
{       (brief, b)
{       (full, f)
{     keyend = current
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 3] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        type3: 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,
      recend := [[1, [88, 5, 14, 11, 55, 37, 680], clc$function, 3, 3, 2, 0, 0, 0, 0, 'OSM$$STATUS_MESSAGE'],
            [['MAXIMUM_LINE_SIZE              ', clc$nominal_entry, 2],
            ['MESSAGE_LEVEL                  ', clc$nominal_entry, 3],
            ['STATUS                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [3, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$required_parameter, 0, 0],

{ PARAMETER 3

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 229, clc$optional_default_parameter, 0,
            7]],

{ PARAMETER 1

      [[1, 0, clc$status_type]],

{ PARAMETER 2

      [[1, 0, clc$integer_type], [osc$min_status_message_line, osc$max_status_message_line, 10]],

{ PARAMETER 3

      [[1, 0, clc$keyword_type], [6], [['B                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['BRIEF                          ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['C                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['CURRENT                        ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['F                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['FULL                           ', clc$nominal_entry,
            clc$normal_usage_entry, 3]], 'current']];

?? POP ??

    CONST
      p$status = 1,
      p$maximum_line_size = 2,
      p$message_level = 3;

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

    VAR
      i: 1 .. osc$max_status_message_lines,
      message: ^ost$status_message,
      message_level: ost$format_message_level,
      message_line: ^string ( * ),
      message_line_count: ^ost$status_message_line_count,
      message_line_size: ^ost$status_message_line_size,
      node: ^clt$data_value;


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

    NEXT message IN work_area;
    IF message = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

    IF pvt [p$message_level].value^.keyword_value = 'CURRENT' THEN
      message_level := osc$current_message_level;
    ELSEIF pvt [p$message_level].value^.keyword_value = 'BRIEF' THEN
      message_level := osc$brief_message_level;
    ELSE { pvt [p$message_level].value^.keyword_value = 'FULL' }
      message_level := osc$full_message_level;
    IFEND;

    osp$format_message (pvt [p$status].value^.status_value^, message_level,
          pvt [p$maximum_line_size].value^.integer_value.value, message^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /work_area_ok/
    BEGIN
      RESET message;
      NEXT message_line_count IN message;
      clp$make_list_value (work_area, result);
      IF result = NIL THEN
        EXIT /work_area_ok/;
      IFEND;
      node := result;

      FOR i := 1 TO message_line_count^ DO
        clp$make_value (clc$string, work_area, node^.element_value);
        IF node^.element_value = NIL THEN
          EXIT /work_area_ok/;
        IFEND;
        NEXT message_line_size IN message;
        NEXT message_line: [message_line_size^] IN message;
        node^.element_value^.string_value := ^message_line^ (2, * );
        IF i < message_line_count^ THEN
          clp$make_list_value (work_area, node^.link);
          IF node^.link = NIL THEN
            EXIT /work_area_ok/;
          IFEND;
          node := node^.link;
        IFEND;
      FOREND;

      RETURN;
    END /work_area_ok/;
    osp$set_status_condition (cle$work_area_overflow, status);

  PROCEND clp$$status_message;
?? TITLE := 'clp$$status_severity', EJECT ??

  PROCEDURE [XDCL] clp$$status_severity
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$status_severity) $status_severity (
{   status_code: status_code = $required
{   level: key
{       (non_standard, ns, n)
{       (dependent, d)
{       (informative, i)
{       (warning, w)
{       (error, e)
{       (fatal, f)
{       (catastrophic, c)
{     keyend = $optional
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 15] of clt$keyword_specification,
        recend,
      recend := [[1, [88, 5, 14, 10, 54, 23, 127], clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$STATUS_SEVERITY'],
            [['LEVEL                          ', clc$nominal_entry, 2],
            ['STATUS_CODE                    ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 562, clc$optional_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$status_code_type]],

{ PARAMETER 2

      [[1, 0, clc$keyword_type], [15], [['C                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 7], ['CATASTROPHIC                   ', clc$nominal_entry,
            clc$normal_usage_entry, 7], ['D                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['DEPENDENT                      ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['E                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 5], ['ERROR                          ', clc$nominal_entry,
            clc$normal_usage_entry, 5], ['F                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 6], ['FATAL                          ', clc$nominal_entry,
            clc$normal_usage_entry, 6], ['I                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['INFORMATIVE                    ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['N                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['NON_STANDARD                   ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['NS                             ', clc$alias_entry,
            clc$normal_usage_entry, 1], ['W                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 4], ['WARNING                        ', clc$nominal_entry,
            clc$normal_usage_entry, 4]]]];

?? POP ??

    CONST
      p$status_code = 1,
      p$level = 2;

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

    VAR
      diagnostic_severities: [STATIC, READ, oss$job_paged_literal] array [ost$diagnostic_severity] of
            clt$keyword := ['NON_STANDARD', 'DEPENDENT', 'INFORMATIVE', 'WARNING', 'ERROR', 'FATAL',
            'CATASTROPHIC'];

    VAR
      level: ost$diagnostic_severity,
      severity: ost$diagnostic_severity;


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

    osp$get_diagnostic_severity (pvt [p$status_code].value^.status_code_value, severity, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$level].specified THEN

    /lookup/
      FOR level := LOWERVALUE (ost$diagnostic_severity) TO UPPERVALUE (ost$diagnostic_severity) DO
        IF pvt [p$level].value^.keyword_value = diagnostic_severities [level] THEN
          EXIT /lookup/;
        IFEND;
      FOREND /lookup/;
      clp$make_boolean_value (severity >= level, clc$true_false_boolean, work_area, result);
    ELSE
      clp$make_keyword_value (diagnostic_severities [severity], work_area, result);
    IFEND;

    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$status_severity;
?? TITLE := 'clp$$string', EJECT ??

  PROCEDURE [XDCL] clp$$string
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$string) $string (
{   value: any = $required
{   format: key
{       (elements, element, e)
{       (compressed_labeled_elements, cle)
{       (data_structure, das, ds)
{       (display_elements, display_element, de)
{       (display_source, dis)
{       (labeled_elements, le)
{       (source, s)
{     keyend = elements
{   max_string: integer 3..clc$max_string_size = $max_string
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 3] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 17] of clt$keyword_specification,
        default_value: string (8),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
        default_value: string (11),
      recend,
    recend := [
    [1,
    [90, 2, 22, 11, 26, 5, 151],
    clc$function, 3, 3, 1, 0, 0, 0, 0, 'OSM$$STRING'], [
    ['FORMAT                         ',clc$nominal_entry, 2],
    ['MAX_STRING                     ',clc$nominal_entry, 3],
    ['VALUE                          ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 636,
  clc$optional_default_parameter, 0, 8],
{ PARAMETER 3
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20,
  clc$optional_default_parameter, 0, 11]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [17], [
    ['CLE                            ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['COMPRESSED_LABELED_ELEMENTS    ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['DAS                            ', clc$alias_entry, clc$normal_usage_entry, 3],
    ['DATA_STRUCTURE                 ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['DE                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
    ['DIS                            ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
    ['DISPLAY_ELEMENT                ', clc$alias_entry, clc$normal_usage_entry, 4],
    ['DISPLAY_ELEMENTS               ', clc$nominal_entry, clc$normal_usage_entry, 4],
    ['DISPLAY_SOURCE                 ', clc$nominal_entry, clc$normal_usage_entry, 5],
    ['DS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['E                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['ELEMENT                        ', clc$alias_entry, clc$normal_usage_entry, 1],
    ['ELEMENTS                       ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['LABELED_ELEMENTS               ', clc$nominal_entry, clc$normal_usage_entry, 6],
    ['LE                             ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
    ['SOURCE                         ', clc$nominal_entry, clc$normal_usage_entry, 7]]
    ,
    'elements'],
{ PARAMETER 3
    [[1, 0, clc$integer_type], [3, clc$max_string_size, 10],
    '$max_string']];

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

    CONST
      p$value = 1,
      p$format = 2,
      p$max_string = 3;

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

    VAR
      i: clt$data_representation_count,
      node: ^clt$data_value,
      representation: ^clt$data_representation,
      request: clt$convert_to_string_request,
      string_count: ^clt$data_representation_count,
      string_size: ^clt$string_size;


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

    request.initial_indentation := 0;
    request.continuation_indentation := 0;
    request.max_string := pvt [p$max_string].value^.integer_value.value;
    request.include_advanced_items := TRUE;
    request.include_hidden_items := TRUE;
    request.kind := clc$convert_data_value;
    IF pvt [p$format].value^.keyword_value = 'ELEMENTS' THEN
      request.representation_option := clc$data_elem_representation;
    ELSEIF pvt [p$format].value^.keyword_value = 'DATA_STRUCTURE' THEN
      request.representation_option := clc$data_struct_representation;
    ELSEIF pvt [p$format].value^.keyword_value = 'SOURCE' THEN
      request.representation_option := clc$data_source_representation;
    ELSEIF pvt [p$format].value^.keyword_value = 'LABELED_ELEMENTS' THEN
      request.representation_option := clc$labeled_elem_representation;
    ELSEIF pvt [p$format].value^.keyword_value = 'DISPLAY_ELEMENTS' THEN
      request.representation_option := clc$display_elem_representation;
    ELSEIF pvt [p$format].value^.keyword_value = 'DISPLAY_SOURCE' THEN
      request.representation_option := clc$display_srce_representation;
    ELSE { pvt [p$format].value^.keyword_value = 'COMPRESSED_LABELED_ELEMENTS' }
      request.representation_option := clc$compressed_labeled_elem_rep;
    IFEND;
    request.value := pvt [p$value].value;
    clp$internal_convert_to_string (request, work_area, representation, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  /work_area_ok/
    BEGIN
      NEXT string_count IN representation;
      IF string_count^ = 1 THEN
        clp$make_value (clc$string, work_area, result);
        IF result = NIL THEN
          EXIT /work_area_ok/;
        IFEND;
        NEXT string_size IN representation;
        NEXT result^.string_value: [string_size^] IN representation;
      ELSE
        clp$make_list_value (work_area, result);
        IF result = NIL THEN
          EXIT /work_area_ok/;
        IFEND;
        node := result;

        FOR i := 1 TO string_count^ DO
          clp$make_value (clc$string, work_area, node^.element_value);
          IF node^.element_value = NIL THEN
            EXIT /work_area_ok/;
          IFEND;
          NEXT string_size IN representation;
          NEXT node^.element_value^.string_value: [string_size^] IN representation;
          IF i < string_count^ THEN
            clp$make_list_value (work_area, node^.link);
            IF node^.link = NIL THEN
              EXIT /work_area_ok/;
            IFEND;
            node := node^.link;
          IFEND;
        FOREND;
      IFEND;

      RETURN;
    END /work_area_ok/;
    osp$set_status_condition (cle$work_area_overflow, status);

  PROCEND clp$$string;
*IFEND
?? TITLE := 'clp$$strlen', EJECT ??

  PROCEDURE [XDCL] clp$$strlen
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

*IF NOT $true(osv$unix)
{ FUNCTION (osm$$strlen) $strlen (
{   string: string = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
      recend := [[1, [87, 11, 3, 17, 41, 28, 229], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$STRLEN'],
            [['STRING                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

?? POP ??

    CONST
      p$string = 1;

    VAR
      pvt: array [1 .. 1] of clt$parameter_value;
*ELSE
{ FUNCTION (osm$$strlen) $strlen (
{   string: string = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
    recend := [
    [2,
    [91, 8, 17, 14, 18, 26, 0],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$STRLEN'], [
    ['STRING                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 9, clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[2, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

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

    CONST
      p$string = 1;

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


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

    clp$make_integer_value (STRLENGTH (pvt [p$string].value^.string_value^), 10, FALSE, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

  PROCEND clp$$strlen;
*IF NOT $true(osv$unix)
?? TITLE := 'clp$$strrep', EJECT ??

  PROCEDURE [XDCL] clp$$strrep
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$strrep) $strrep (
{   value: any = $required
{   radix: integer 2..16 = 10
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
          default_value: string (2),
        recend,
      recend := [[1, [87, 10, 26, 10, 8, 5, 510], clc$function, 2, 2, 1, 0, 0, 0, 0, 'OSM$$STRREP'],
            [['RADIX                          ', clc$nominal_entry, 2],
            ['VALUE                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_default_parameter, 0,
            2]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [-$clt$type_kinds [], FALSE, 0]],

{ PARAMETER 2

      [[1, 0, clc$integer_type], [2, 16, 10], '10']];

?? POP ??

    CONST
      p$value = 1,
      p$radix = 2;

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

    VAR
      representation: ^clt$data_representation,
      request: clt$convert_to_string_request,
      str: ^ost$string;


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

  /work_area_ok/
    BEGIN
      clp$make_value (clc$string, work_area, result);
      IF result = NIL THEN
        EXIT /work_area_ok/;
      IFEND;

      IF pvt [p$value].value^.kind = clc$integer THEN
        NEXT str IN work_area;
        IF str = NIL THEN
          EXIT /work_area_ok/;
        IFEND;
        clp$convert_integer_to_string (pvt [p$value].value^.integer_value.value,
              pvt [p$radix].value^.integer_value.value, FALSE, str^, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        result^.string_value := ^str^.value (1, str^.size);

      ELSE
        request.initial_indentation := 0;
        request.continuation_indentation := 0;
        request.max_string := clc$max_string_size;
        request.include_advanced_items := TRUE;
        request.include_hidden_items := TRUE;
        request.kind := clc$convert_data_value;
        request.representation_option := clc$data_elem_representation;
        request.value := pvt [p$value].value;
        clp$internal_convert_to_string (request, work_area, representation, status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        result^.string_value := clp$data_representation_text (representation);
      IFEND;

      RETURN;
    END /work_area_ok/;
    osp$set_status_condition (cle$work_area_overflow, status);

  PROCEND clp$$strrep;
?? TITLE := 'clp$$substring', EJECT ??

  PROCEDURE [XDCL] clp$$substring
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$substr) $substring, $substr (
{   string: string = $required
{   index: integer 1..clc$max_string_size+1 = $required
{   size: integer 0..clc$max_string_size = 1
{   fill_character: string 1 = ' '
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 4] of clt$pdt_parameter_name,
        parameters: array [1 .. 4] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
        type3: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
          default_value: string (1),
        recend,
        type4: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
          default_value: string (3),
        recend,
      recend := [[1, [87, 10, 26, 11, 0, 15, 667], clc$function, 4, 4, 2, 0, 0, 0, 0, 'OSM$$SUBSTR'],
            [['FILL_CHARACTER                 ', clc$nominal_entry, 4],
            ['INDEX                          ', clc$nominal_entry, 2],
            ['SIZE                           ', clc$nominal_entry, 3],
            ['STRING                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [4, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$required_parameter, 0, 0],

{ PARAMETER 3

      [3, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 20, clc$optional_default_parameter, 0,
            1],

{ PARAMETER 4

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_default_parameter, 0,
            3]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],

{ PARAMETER 2

      [[1, 0, clc$integer_type], [1, clc$max_string_size + 1, 10]],

{ PARAMETER 3

      [[1, 0, clc$integer_type], [0, clc$max_string_size, 10], '1'],

{ PARAMETER 4

      [[1, 0, clc$string_type], [1, 1, FALSE], ''' ''']];

?? POP ??

    CONST
      p$string = 1,
      p$index = 2,
      p$size = 3,
      p$fill_character = 4;

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

    VAR
      index: clt$string_index,
      size: clt$string_size;


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

    clp$make_sized_string_value (pvt [p$size].value^.integer_value.value, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

    index := pvt [p$index].value^.integer_value.value;
    size := STRLENGTH (pvt [p$string].value^.string_value^);
    IF index <= size THEN
      size := size - index + 1;
    ELSE
      index := 1;
      size := 0;
    IFEND;

    result^.string_value^ := pvt [p$string].value^.string_value^ (index, size);

    IF pvt [p$fill_character].value^.string_value^ (1) <> ' ' THEN
      FOR index := size + 1 TO STRLENGTH (result^.string_value^) DO
        result^.string_value^ (index) := pvt [p$fill_character].value^.string_value^ (1);
      FOREND;
    IFEND;

  PROCEND clp$$substring;
?? TITLE := 'clp$$system', EJECT ??

  PROCEDURE [XDCL] clp$$system
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$system) $system (
{   attribute: key
{       (catalog, c)
{       (version, v)
{       (dual_state_partner, c170_os_type, dsp)
{     keyend = catalog
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 7] of clt$keyword_specification,
        default_value: string (7),
      recend,
    recend := [
    [1,
    [90, 2, 28, 16, 43, 8, 309],
    clc$function, 1, 1, 0, 0, 0, 0, 0, 'OSM$SYSTEM'], [
    ['ATTRIBUTE                      ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 266,
  clc$optional_default_parameter, 0, 7]],
{ PARAMETER 1
    [[1, 0, clc$keyword_type], [7], [
    ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['C170_OS_TYPE                   ', clc$alias_entry, clc$normal_usage_entry, 3],
    ['CATALOG                        ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['DSP                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['DUAL_STATE_PARTNER             ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['V                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['VERSION                        ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'catalog']];

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

    CONST
      p$attribute = 1;

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

    CONST
      max_os_type_size = 6 {NOS/BE} ;

    VAR
      c170_os_type: [STATIC, READ, oss$job_paged_literal] array [ost$170_os_type] of record
        size: 1 .. max_os_type_size,
        value: string (max_os_type_size),
      recend := [[4, 'NONE'], [3, 'NOS'], [6, 'NOS/BE']],
      attribute: array [1 .. 1] of jmt$job_attribute_result;


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

    IF pvt [p$attribute].value^.keyword_value = 'CATALOG' THEN
      clp$make_file_value (':$SYSTEM.$SYSTEM', work_area, result);
      RETURN;

    ELSEIF pvt [p$attribute].value^.keyword_value = 'DUAL_STATE_PARTNER' THEN
      attribute [1].key := jmc$c170_os_type;

    ELSE {VERSION}
      attribute [1].key := jmc$os_version;
    IFEND;

    jmp$get_job_attributes (^attribute, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    CASE attribute [1].key OF

    = jmc$c170_os_type =
      clp$make_string_value (c170_os_type [attribute [1].c170_os_type].value (1,
            c170_os_type [attribute [1].c170_os_type].size), work_area, result);

    = jmc$os_version =
      clp$make_string_value (attribute [1].os_version (1, clp$trimmed_string_size (attribute [1].os_version)),
            work_area, result);

    ELSE
      ;
    CASEND;

  PROCEND clp$$system;
?? TITLE := 'clp$$translate', EJECT ??

  PROCEDURE [XDCL] clp$$translate
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$translate) $translate (
{   translation_table: any of
{       record
{         base: key
{           (lower_to_upper, ltu)
{           (upper_to_lower, utl)
{           (control_codes_to_question_marks, cctqm)
{           none
{         keyend
{         original: string = $optional
{         translated: string = $optional
{       recend
{       string 256
{     anyend = $required
{   string: string = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: 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$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 7] of clt$keyword_specification,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$string_type_qualifier,
          recend,
          field_spec_3: clt$field_specification,
          element_type_spec_3: record
            header: clt$type_specification_header,
            qualifier: clt$string_type_qualifier,
          recend,
        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,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$string_type_qualifier,
      recend,
    recend := [
    [1,
    [90, 1, 26, 14, 39, 31, 630],
    clc$function, 2, 2, 2, 0, 0, 0, 0, 'OSM$$TRANSLATE'], [
    ['STRING                         ',clc$nominal_entry, 2],
    ['TRANSLATION_TABLE              ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 425,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0
  , 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$record_type, clc$string_type],
    FALSE, 2],
    397, [[1, 0, clc$record_type], [3],
      ['BASE                           ', clc$required_field, 266], [[1, 0, clc$keyword_type], [7], [
        ['CCTQM                          ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['CONTROL_CODES_TO_QUESTION_MARKS', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['LOWER_TO_UPPER                 ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['LTU                            ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['NONE                           ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['UPPER_TO_LOWER                 ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['UTL                            ', clc$abbreviation_entry, clc$normal_usage_entry, 2]]
        ],
      ['ORIGINAL                       ', clc$optional_field, 8], [[1, 0, clc$string_type], [0,
  clc$max_string_size, FALSE]],
      ['TRANSLATED                     ', clc$optional_field, 8], [[1, 0, clc$string_type], [0,
  clc$max_string_size, FALSE]]
      ],
    8, [[1, 0, clc$string_type], [256, 256, FALSE]]
    ],
{ PARAMETER 2
    [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]]];

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

    CONST
      p$translation_table = 1,
      p$string = 2;

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

    VAR
      i: clt$string_index,
      original: ^clt$string_value,
      predefined_table: ^string (256),
      translated: ^clt$string_value,
      translation_table: ^string (256);


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

    IF pvt [p$translation_table].value^.kind = clc$record THEN
      IF pvt [p$translation_table].value^.field_values^ [1].value^.keyword_value = 'LOWER_TO_UPPER' THEN
        predefined_table := ^osv$lower_to_upper;
      ELSEIF pvt [p$translation_table].value^.field_values^ [1].value^.keyword_value = 'UPPER_TO_LOWER' THEN
        predefined_table := ^osv$upper_to_lower;
      ELSEIF pvt [p$translation_table].value^.field_values^ [1].value^.keyword_value =
            'CONTROL_CODES_TO_QUESTION_MARKS' THEN
        predefined_table := ^osv$control_codes_to_quest_mark;
      ELSE {NONE}
        PUSH predefined_table;
        FOR i := 1 TO 256 DO
          predefined_table^ (i) := $CHAR (i - 1);
        FOREND;
      IFEND;

      IF (pvt [p$translation_table].value^.field_values^ [2].value = NIL) AND
            (pvt [p$translation_table].value^.field_values^ [3].value = NIL) THEN
        translation_table := predefined_table;
      ELSE
        PUSH translation_table;
        translation_table^ := predefined_table^;
        original := pvt [p$translation_table].value^.field_values^ [2].value^.string_value;
        translated := pvt [p$translation_table].value^.field_values^ [3].value^.string_value;
        i := 1;
        WHILE (i <= STRLENGTH (original^)) AND (i <= STRLENGTH (translated^)) DO
          translation_table^ ($INTEGER (original^ (i)) + 1) := translated^ (i);
          i := I + 1;
        WHILEND;
      IFEND;

    ELSE {clc$string}
      translation_table := pvt [p$translation_table].value^.string_value;
    IFEND;

    clp$make_sized_string_value (STRLENGTH (pvt [p$string].value^.string_value^), work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;
    #TRANSLATE (translation_table^, pvt [p$string].value^.string_value^, result^.string_value^);

  PROCEND clp$$translate;
?? TITLE := 'clp$$trim', EJECT ??

  PROCEDURE [XDCL] clp$$trim
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$trim) $trim (
{   string: string = $required
{   char: string 1 = ' '
{   leading_or_trailing: list of key
{       (trailing, t)
{       (leading, l)
{       all
{     keyend = trailing
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 3] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$string_type_qualifier,
          default_value: string (3),
        recend,
        type3: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 5] of clt$keyword_specification,
          recend,
          default_value: string (8),
        recend,
      recend := [[1, [87, 10, 27, 17, 56, 47, 255], clc$function, 3, 3, 1, 0, 0, 0, 0, 'OSM$$TRIM'],
            [['CHAR                           ', clc$nominal_entry, 2],
            ['LEADING_OR_TRAILING            ', clc$nominal_entry, 3],
            ['STRING                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [3, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$required_parameter, 0, 0],

{ PARAMETER 2

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 8, clc$optional_default_parameter, 0,
            3],

{ PARAMETER 3

      [2, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 208, clc$optional_default_parameter, 0,
            8]],

{ PARAMETER 1

      [[1, 0, clc$string_type], [0, clc$max_string_size, FALSE]],

{ PARAMETER 2

      [[1, 0, clc$string_type], [1, 1, FALSE], ''' '''],

{ PARAMETER 3

      [[1, 0, clc$list_type], [192, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$keyword_type], [5], [['ALL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['L                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['LEADING                        ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['T                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['TRAILING                       ', clc$nominal_entry,
            clc$normal_usage_entry, 1]]], 'trailing']];

?? POP ??

    CONST
      p$string = 1,
      p$char = 2,
      p$leading_or_trailing = 3;

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

    VAR
      c: char,
      first: clt$string_index,
      last: clt$string_size,
      option: ^clt$data_value,
      s: ^clt$string_value,
      trim_leading: boolean,
      trim_trailing: boolean;


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

    trim_trailing := FALSE;
    trim_leading := FALSE;
    option := pvt [p$leading_or_trailing].value;
    WHILE option <> NIL DO
      IF option^.element_value^.keyword_value = 'TRAILING' THEN
        trim_trailing := TRUE;
      ELSEIF option^.element_value^.keyword_value = 'LEADING' THEN
        trim_leading := TRUE;
      ELSE {ALL}
        trim_trailing := TRUE;
        trim_leading := TRUE;
      IFEND;
      option := option^.link;
    WHILEND;

    c := pvt [p$char].value^.string_value^ (1);
    s := pvt [p$string].value^.string_value;

    last := STRLENGTH (s^);
    IF trim_trailing THEN
      WHILE (last > 0) AND (s^ (last) = c) DO
        last := last - 1;
      WHILEND;
    IFEND;

    first := 1;
    IF trim_leading THEN
      WHILE (first <= last) AND (s^ (first) = c) DO
        first := first + 1;
      WHILEND;
    IFEND;

    clp$make_string_value (s^ (first, last - first + 1), work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
      RETURN;
    IFEND;

  PROCEND clp$$trim;
?? TITLE := 'clp$$true', EJECT ??

  PROCEDURE [XDCL] clp$$true
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$true) $true (
{   boolean_value: any = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
      recend,
    recend := [
    [1,
    [91, 9, 11, 11, 12, 47, 677],
    clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$TRUE'], [
    ['BOOLEAN_VALUE                  ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 12, clc$required_parameter,
  0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [-$clt$type_kinds [],
    FALSE, 0]]];

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

    CONST
      p$boolean_value = 1;

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

    VAR
      boolean_value: boolean;


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

    CASE pvt [p$boolean_value].value^.kind OF
    = clc$boolean =
      boolean_value := pvt [p$boolean_value].value^.boolean_value.value;
    ELSE
      boolean_value := FALSE;
    CASEND;

    clp$make_boolean_value (boolean_value, clc$true_false_boolean, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$true;
?? TITLE := 'clp$$type', EJECT ??

  PROCEDURE [XDCL] clp$$type
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION (osm$$type) $type (
{    variable: data_name = $required
{    )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 1, 18, 8, 34, 8, 680], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$TYPE'],
            [['VARIABLE                       ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$data_name_type]]];

?? POP ??

    CONST
      p$variable = 1;

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

    VAR
      ignore_access_mode: clt$data_access_mode,
      ignore_class: clt$variable_class,
      ignore_evaluation_method: clt$expression_eval_method,
      ignore_value: ^clt$data_value,
      type_specification: ^clt$type_specification;


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

    clp$get_variable (pvt [p$variable].value^.data_name_value, work_area, ignore_class, ignore_access_mode,
          ignore_evaluation_method, type_specification, ignore_value, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$make_type_spec_value (type_specification, work_area, result);
    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$type;
?? TITLE := 'clp$$unique', EJECT ??

  PROCEDURE [XDCL] clp$$unique
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$unique) $unique (
{   result: any of
{       key
{         string
{         name
{       keyend
{       file
{     anyend = string
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: 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,
          default_value: string (6),
        recend,
      recend := [[1, [88, 6, 18, 10, 26, 38, 324], clc$function, 1, 1, 0, 0, 0, 0, 0, 'OSM$$UNIQUE'],
            [['RESULT                         ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 104, clc$optional_default_parameter, 0,
            6]],

{ PARAMETER 1

      [[1, 0, clc$union_type], [[clc$file_type, clc$keyword_type], FALSE, 2], 81,
            [[1, 0, clc$keyword_type], [2], [['NAME                           ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['STRING                         ', clc$nominal_entry,
            clc$normal_usage_entry, 1]]], 3, [[1, 0, clc$file_type]], 'string']];

?? POP ??

    CONST
      p$result = 1;

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

    VAR
      path: ^fst$file_reference,
      path_size: fst$path_size,
      unique_name: ost$name;


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

    pmp$get_unique_name (unique_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF pvt [p$result].value^.kind = clc$file THEN
      path_size := clp$trimmed_string_size (pvt [p$result].value^.file_value^);
      IF (path_size + 1 + osc$max_name_size) > fsc$max_path_size THEN
        osp$set_status_condition (cle$file_reference_too_long, status);
        RETURN;
      IFEND;
      clp$make_value (clc$file, work_area, result);
      IF result <> NIL THEN
        NEXT result^.file_value: [path_size + 1 + osc$max_name_size] IN work_area;
        IF result^.file_value <> NIL THEN
          result^.file_value^ (1, path_size) := pvt [p$result].value^.file_value^ (1, path_size);
          result^.file_value^ (path_size + 1) := '.';
          result^.file_value^ (path_size + 2, osc$max_name_size) := unique_name;
        IFEND;
      IFEND;
    ELSEIF pvt [p$result].value^.keyword_value = 'NAME' THEN
      clp$make_name_value (unique_name, work_area, result);
    ELSE { STRING }
      clp$make_string_value (unique_name, work_area, result);
    IFEND;

    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$unique;
?? TITLE := 'clp$$upper_bound', EJECT ??

  PROCEDURE [XDCL] clp$$upper_bound
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$upper_bound) $upper_bound, $upperbound (
{   array: array = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$array_type_qualifier,
        recend,
      recend := [[1, [87, 12, 7, 17, 14, 22, 913], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$UPPER_BOUND'],
            [['ARRAY                          ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 24, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$array_type], [0, FALSE]]];

?? POP ??

    CONST
      p$array = 1;

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

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

    clp$make_integer_value (UPPERBOUND (pvt [p$array].value^.array_value^), 10, FALSE, work_area, result);

  PROCEND clp$$upper_bound;
?? TITLE := 'clp$$upper_value', EJECT ??

  PROCEDURE [XDCL] clp$$upper_value
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION (osm$$upper_value) $upper_value (
{   numeric_type: type = $required
{   )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 1, 18, 11, 40, 55, 495], clc$function, 1, 1, 1, 0, 0, 0, 0, 'OSM$$UPPER_VALUE'],
            [['NUMERIC_TYPE                   ', clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_positionally], clc$pass_by_value,
            clc$immediate_evaluation, clc$standard_parameter_checking, 3, clc$required_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$type_specification_type]]];

?? POP ??

    CONST
      p$numeric_type = 1;

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

    VAR
      ignore_type_name: ^clt$type_name_reference,
      integer_type_qualifier: ^clt$integer_type_qualifier,
      real_type_qualifier: ^clt$real_type_qualifier,
      type_specification_header: ^clt$type_specification_header;


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

    RESET pvt [p$numeric_type].value^.type_specification_value;
    NEXT type_specification_header IN pvt [p$numeric_type].value^.type_specification_value;
    IF type_specification_header = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    NEXT ignore_type_name: [type_specification_header^.name_size] IN pvt [p$numeric_type].
          value^.type_specification_value;
    IF ignore_type_name = NIL THEN
      osp$set_status_condition (cle$bad_data_value, status);
      RETURN;
    IFEND;
    IF type_specification_header^.kind = clc$integer_type THEN
      NEXT integer_type_qualifier IN pvt [p$numeric_type].value^.type_specification_value;
      IF integer_type_qualifier = NIL THEN
        osp$set_status_condition (cle$bad_data_value, status);
        RETURN;
      IFEND;
      clp$make_integer_value (integer_type_qualifier^.max_integer_value, 10, FALSE, work_area, result);
    ELSEIF type_specification_header^.kind = clc$real_type THEN
      NEXT real_type_qualifier IN pvt [p$numeric_type].value^.type_specification_value;
      IF real_type_qualifier = NIL THEN
        osp$set_status_condition (cle$bad_data_value, status);
        RETURN;
      IFEND;
      clp$make_real_value (real_type_qualifier^.max_real_value.long_real, clc$max_real_number_digits,
            work_area, result);
    ELSE
      clp$make_real_value (clv$positive_infinity^, clc$max_real_number_digits, work_area, result);
    IFEND;

    IF result = NIL THEN
      osp$set_status_condition (cle$work_area_overflow, status);
    IFEND;

  PROCEND clp$$upper_value;

*IFEND
MODEND clm$miscellaneous_functions;
