?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE System Attribute Management: Set and Display Attributes' ??
MODULE osm$s_and_d_sys_attrs;
?? RIGHT := 110 ??

{  PURPOSE:
{     This is the command language interface to set and display system
{     attributes.

?? NEWTITLE := 'Global Declarations Referenced by this Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc oss$job_paged_literal
*copyc avc$validation_level_const_name
*copyc clc$change_secure_logging_name
*copyc clc$system_logging_active_name
*copyc osc$system_attribute_message
*copyc sye$command_processor_errors
?? POP ??
*copyc fip#addl_initialize
*copyc fip#addl_integer_v2
*copyc fip#addl_rjinteger_v2
*copyc fip#addl_string
*copyc fip#addl_trimmed_string

*copyc clp$build_pattern_for_wild_card
*copyc clp$build_standard_title
*copyc clp$close_display
*copyc clp$count_list_elements
*copyc clp$evaluate_parameters
*copyc clp$get_work_area
*copyc clp$match_string_pattern
*copyc clp$new_display_line
*copyc clp$new_display_page
*copyc clp$open_display_reference
*copyc clp$put_display
*copyc clp$reset_for_next_display_page
*copyc clp$trimmed_string_size
*copyc osp$disestablish_cond_handler
*copyc osp$establish_block_exit_hndlr
*copyc osp$find_help_module
*copyc osp$find_parameter_help_message
*copyc osp$format_help_message
*copyc osp$get_system_constant_values
*copyc osp$restore_system_constants
*copyc osp$save_system_constants
*copyc osp$set_status_abnormal
*copyc osp$store_system_constant
*copyc pmp$binary_to_ascii
*copyc osv$lower_to_upper
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Referenced by this Module', EJECT ??

  CONST
    c$change_secure_logging_name = 'CHANGE_SECURE_LOGGING',
    c$debug = 'DEBUG',
    c$osv$debug = 'OSV$DEBUG',
    c$system_logging_active_name = 'SYSTEM_LOGGING_ACTIVE',
    c$validation_level_const_name = 'VALIDATION_LEVEL';

  TYPE
    t$display_option = (c$do_current_value, c$do_saved_values, c$do_value_range, c$do_group_membership,
          c$do_help),
    t$display_options = set of t$display_option;

  TYPE
    t$radix_information = record
      value: 2 .. 16,
      specified: boolean,
    recend;

  TYPE
    t$sys_const_saved_values_kinds = set of syt$sys_const_saved_values_kind;

  TYPE
    t$output_proc = procedure (    candidate: syt$system_constant_value_entry;
                                   display_options: t$display_options;
                                   radix_information: t$radix_information;
                               VAR display_control: clt$display_control;
                               VAR status: ost$status);

  VAR
    v$sys_const_saved_val_kind_name: [READ, oss$job_paged_literal] array [syt$sys_const_saved_values_kind] of
          ost$name := [
{SYC$SCSV_OS_DEFAULT_VALUES     } 'OS_DEFAULT',
{SYC$SCSV_DC_FILE_VALUES        } 'DC_FILE',
{SYC$SCSV_DS_COMPLETE_VALUES    } 'DEADSTART_COMPLETE',
{SYC$SCSV_SITE_ALTERNATE_VALUES } 'SITE_ALTERNATE_VALUES'];

  VAR
    v$sys_const_saved_val_kind_lab: [READ, oss$job_paged_literal] array [syt$sys_const_saved_values_kind] of
          string (21) := [
{SYC$SCSV_OS_DEFAULT_VALUES     } 'OS_Default',
{SYC$SCSV_DC_FILE_VALUES        } 'DC_File',
{SYC$SCSV_DS_COMPLETE_VALUES    } 'Deadstart_Complete',
{SYC$SCSV_SITE_ALTERNATE_VALUES } 'Site_Alternate_Values'];

?? OLDTITLE ??
?? NEWTITLE := 'OSP$RESTORE_SYSTEM_ATTRIBUTES', EJECT ??

  PROCEDURE [XDCL, #GATE] osp$restore_system_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE restore_system_attribute (
{   attribute_name, an, name, n: any of
{       key
{         (all, a)
{       advanced_key
{         (everything, e)
{       keyend
{       name
{     anyend = $required
{   saved_values_kind, svk: key
{       (os_default, osd, od)
{       (dc_file, dcf, df)
{       (deadstart_complete, dsc, dc)
{       (site_alternate_values, sav, site_alternate, sa)
{     keyend = $required
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 7] 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$keyword_type_qualifier,
          keyword_specs: array [1 .. 4] of clt$keyword_specification,
        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,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 13] of clt$keyword_specification,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 6, 11, 10, 34, 51, 442],
    clc$command, 7, 3, 2, 0, 0, 0, 3, ''], [
    ['AN                             ',clc$alias_entry, 1],
    ['ATTRIBUTE_NAME                 ',clc$nominal_entry, 1],
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$alias_entry, 1],
    ['SAVED_VALUES_KIND              ',clc$nominal_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3],
    ['SVK                            ',clc$abbreviation_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 180,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 488,
  clc$required_parameter, 0, 0],
{ PARAMETER 3
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type],
    FALSE, 2],
    155, [[1, 0, clc$keyword_type], [4], [
      ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['E                              ', clc$abbreviation_entry, clc$advanced_usage_entry, 2],
      ['EVERYTHING                     ', clc$nominal_entry, clc$advanced_usage_entry, 2]]
      ],
    5, [[1, 0, clc$name_type], [1, osc$max_name_size]]
    ],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [13], [
    ['DC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['DCF                            ', clc$alias_entry, clc$normal_usage_entry, 2],
    ['DC_FILE                        ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['DEADSTART_COMPLETE             ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['DF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['DSC                            ', clc$alias_entry, clc$normal_usage_entry, 3],
    ['OD                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['OSD                            ', clc$alias_entry, clc$normal_usage_entry, 1],
    ['OS_DEFAULT                     ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['SA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
    ['SAV                            ', clc$alias_entry, clc$normal_usage_entry, 4],
    ['SITE_ALTERNATE                 ', clc$alias_entry, clc$normal_usage_entry, 4],
    ['SITE_ALTERNATE_VALUES          ', clc$nominal_entry, clc$normal_usage_entry, 4]]
    ],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$attribute_name = 1,
      p$saved_values_kind = 2,
      p$status = 3;

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

    VAR
      i: integer,
      kind: syt$sys_const_saved_values_kind;

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

  /find_saved_value_kind/
    FOR kind := LOWERVALUE (syt$sys_const_saved_values_kind)
          TO UPPERVALUE (syt$sys_const_saved_values_kind) DO
      IF pvt [p$saved_values_kind].value^.name_value = v$sys_const_saved_val_kind_name [kind] THEN
        EXIT /find_saved_value_kind/; {----->
      IFEND;
    FOREND /find_saved_value_kind/;

    osp$restore_system_constants (kind, status);

  PROCEND osp$restore_system_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'OSP$SAVE_SYSTEM_ATTRIBUTES', EJECT ??

  PROCEDURE [XDCL, #GATE] osp$save_system_attributes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE save_system_attribute (
{   save_values_kind, svk: (BY_NAME, HIDDEN) key
{       (deadstart_complete, dsc, dc)
{       (site_alternate_values, sav, site_alternate, sa)
{     keyend = site_alternate_values
{   status)

?? 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 .. 2] 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 (21),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 6, 17, 13, 25, 7, 243],
    clc$command, 3, 2, 0, 0, 1, 0, 2, ''], [
    ['SAVE_VALUES_KIND               ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 2],
    ['SVK                            ',clc$abbreviation_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$hidden_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 266,
  clc$optional_default_parameter, 0, 21],
{ PARAMETER 2
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$keyword_type], [7], [
    ['DC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['DEADSTART_COMPLETE             ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['DSC                            ', clc$alias_entry, clc$normal_usage_entry, 1],
    ['SA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['SAV                            ', clc$alias_entry, clc$normal_usage_entry, 2],
    ['SITE_ALTERNATE                 ', clc$alias_entry, clc$normal_usage_entry, 2],
    ['SITE_ALTERNATE_VALUES          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'site_alternate_values'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

    CONST
      p$save_values_kind = 1,
      p$status = 2;

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

    VAR
      i: integer,
      kind: syt$sys_const_saved_values_kind;

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

  /find_saved_value_kind/
    FOR kind := LOWERVALUE (syt$sys_const_saved_values_kind)
          TO UPPERVALUE (syt$sys_const_saved_values_kind) DO
      IF pvt [p$save_values_kind].value^.name_value = v$sys_const_saved_val_kind_name [kind] THEN
        EXIT /find_saved_value_kind/; {----->
      IFEND;
    FOREND /find_saved_value_kind/;

    osp$save_system_constants (kind, status);

  PROCEND osp$save_system_attributes;
?? OLDTITLE ??
?? NEWTITLE := 'OSP$SET_SYSTEM_ATTRIBUTE', EJECT ??

  PROCEDURE [XDCL, #GATE] osp$set_system_attribute
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE set_system_attribute (
{   name, n: name = $required
{   value, v: any of
{       boolean
{       integer
{     anyend = $required
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 5] of clt$pdt_parameter_name,
      parameters: array [1 .. 3] 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$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 6, 10, 14, 12, 43, 804],
    clc$command, 5, 3, 2, 0, 0, 0, 3, ''], [
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$nominal_entry, 1],
    ['STATUS                         ',clc$nominal_entry, 3],
    ['V                              ',clc$abbreviation_entry, 2],
    ['VALUE                          ',clc$nominal_entry, 2]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 43, clc$required_parameter,
  0, 0],
{ PARAMETER 3
    [3, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$union_type], [[clc$boolean_type, clc$integer_type],
    TRUE, 2],
    3, [[1, 0, clc$boolean_type]],
    20, [[1, 0, clc$integer_type], [clc$min_integer, clc$max_integer, 10]]
    ],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$name = 1,
      p$value = 2,
      p$status = 3;

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

    VAR
      i: 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$boolean THEN
      i := $INTEGER (pvt [p$value].value^.boolean_value.value);
    ELSE
      i := pvt [p$value].value^.integer_value.value;
    IFEND;

    osp$store_system_constant (pvt [p$name].value^.name_value, i, status);

  PROCEND osp$set_system_attribute;
?? OLDTITLE ??
?? NEWTITLE := 'OSP$DISPLAY_SYSTEM_ATTRIBUTE', EJECT ??

  PROCEDURE [XDCL, #GATE] osp$display_system_attribute
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE display_system_attribute (
{   attribute_name, an, name, n: any of
{       key
{         (all, a)
{       keyend
{       list of name
{       string_pattern
{       application
{     anyend = $required
{   output, o: file = $output
{   attribute_selection, as: list of key
{       (all, a)
{       (official_attribute, official_attributes, oa)
{       (changable_after_deadstart, cad)
{       (unchangable_after_deadstart, uad)
{     advanced_key
{       (everything, e)
{       (internal_attribute, internal_attributes, ia)
{     keyend = official_attribute
{   attribute_group_membership, agm: any of
{       key
{         (all, a)
{       keyend
{       list of key
{         (account_validation, av)
{         (command_language, cl)
{         (configuration_manager, cm)
{         (deadstart, ds)
{         (debug, d)
{         (os_development, od)
{         (dispatcher, tm)
{         (error_processing, ep)
{         (file_server, df)
{         (file_system, fs)
{         (input_output, io)
{         (job_swapper, js)
{         (logging, lg, l)
{         (memory_management, mm)
{         (network_application_management, nam)
{         (operation, os, o)
{         (performance, p)
{         (recovery, r)
{         (security, s)
{         (tape_operation, tapes, to, tape, t)
{         (unimplemented, u)
{         obsolete
{       keyend
{     anyend = all
{   display_option, display_options, do: any of
{       key
{         (all, a, help, h)
{       advanced_key
{         (everything, e)
{       keyend
{       list of key
{         (current_value, current_values, cv, values, value, v)
{         (group_membership, gm)
{         (saved_value, saved_values, sv)
{         (value_range, vr)
{       keyend
{     anyend = current_value
{   display_format, df: key
{       (list, l)
{       (table, t)
{     keyend = $optional
{   radix, r: (BY_NAME, ADVANCED) integer 2..16 = 10
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 18] of clt$pdt_parameter_name,
      parameters: array [1 .. 8] 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,
          qualifier: clt$list_type_qualifier_v2,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type_size_3: clt$type_specification_size,
        element_type_spec_3: record
          header: clt$type_specification_header,
        recend,
        type_size_4: clt$type_specification_size,
        element_type_spec_4: record
          header: clt$type_specification_header,
          qualifier: clt$application_type_qualifier,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
        default_value: string (7),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$list_type_qualifier_v2,
        element_type_spec: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 14] of clt$keyword_specification,
        recend,
        default_value: string (18),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 2] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier_v2,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 48] of clt$keyword_specification,
          recend,
        recend,
        default_value: string (3),
      recend,
      type5: 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 .. 6] of clt$keyword_specification,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier_v2,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 13] of clt$keyword_specification,
          recend,
        recend,
        default_value: string (13),
      recend,
      type6: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
      recend,
      type7: record
        header: clt$type_specification_header,
        qualifier: clt$integer_type_qualifier,
        default_value: string (2),
      recend,
      type8: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [103, 8, 28, 11, 59, 6, 562],
    clc$command, 18, 8, 1, 1, 0, 0, 8, ''], [
    ['AGM                            ',clc$abbreviation_entry, 4],
    ['AN                             ',clc$alias_entry, 1],
    ['AS                             ',clc$abbreviation_entry, 3],
    ['ATTRIBUTE_GROUP_MEMBERSHIP     ',clc$nominal_entry, 4],
    ['ATTRIBUTE_NAME                 ',clc$nominal_entry, 1],
    ['ATTRIBUTE_SELECTION            ',clc$nominal_entry, 3],
    ['DF                             ',clc$abbreviation_entry, 6],
    ['DISPLAY_FORMAT                 ',clc$nominal_entry, 6],
    ['DISPLAY_OPTION                 ',clc$nominal_entry, 5],
    ['DISPLAY_OPTIONS                ',clc$alias_entry, 5],
    ['DO                             ',clc$abbreviation_entry, 5],
    ['N                              ',clc$abbreviation_entry, 1],
    ['NAME                           ',clc$alias_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OUTPUT                         ',clc$nominal_entry, 2],
    ['R                              ',clc$abbreviation_entry, 7],
    ['RADIX                          ',clc$nominal_entry, 7],
    ['STATUS                         ',clc$nominal_entry, 8]],
    [
{ PARAMETER 1
    [5, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 137,
  clc$required_parameter, 0, 0],
{ PARAMETER 2
    [15, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 3
    [6, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 541,
  clc$optional_default_parameter, 0, 18],
{ PARAMETER 4
    [4, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 1900,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 5
    [9, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 753,
  clc$optional_default_parameter, 0, 13],
{ PARAMETER 6
    [8, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name, clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 155,
  clc$optional_parameter, 0, 0],
{ PARAMETER 7
    [17, clc$advanced_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 20,
  clc$optional_default_parameter, 0, 2],
{ PARAMETER 8
    [18, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_by_name],
    clc$pass_by_reference, clc$immediate_evaluation, clc$standard_parameter_checking, 3,
  clc$optional_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$application_type, clc$keyword_type, clc$list_type,
    clc$string_pattern_type],
    FALSE, 4],
    81, [[1, 0, clc$keyword_type], [2], [
      ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    21, [[1, 0, clc$list_type], [5, 1, clc$max_list_size, 0, FALSE, FALSE],
        [[1, 0, clc$name_type], [1, osc$max_name_size]]
      ],
    3, [[1, 0, clc$string_pattern_type]],
    4, [[1, 0, clc$application_type], [FALSE]]
    ],
{ PARAMETER 2
    [[1, 0, clc$file_type],
    '$output'],
{ PARAMETER 3
    [[1, 0, clc$list_type], [525, 1, clc$max_list_size, 0, FALSE, FALSE],
      [[1, 0, clc$keyword_type], [14], [
      ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['CAD                            ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
      ['CHANGABLE_AFTER_DEADSTART      ', clc$nominal_entry, clc$normal_usage_entry, 3],
      ['E                              ', clc$abbreviation_entry, clc$advanced_usage_entry, 5],
      ['EVERYTHING                     ', clc$nominal_entry, clc$advanced_usage_entry, 5],
      ['IA                             ', clc$abbreviation_entry, clc$advanced_usage_entry, 6],
      ['INTERNAL_ATTRIBUTE             ', clc$nominal_entry, clc$advanced_usage_entry, 6],
      ['INTERNAL_ATTRIBUTES            ', clc$alias_entry, clc$advanced_usage_entry, 6],
      ['OA                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
      ['OFFICIAL_ATTRIBUTE             ', clc$nominal_entry, clc$normal_usage_entry, 2],
      ['OFFICIAL_ATTRIBUTES            ', clc$alias_entry, clc$normal_usage_entry, 2],
      ['UAD                            ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
      ['UNCHANGABLE_AFTER_DEADSTART    ', clc$nominal_entry, clc$normal_usage_entry, 4]]
      ]
    ,
    'official_attribute'],
{ PARAMETER 4
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    81, [[1, 0, clc$keyword_type], [2], [
      ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    1799, [[1, 0, clc$list_type], [1783, 1, clc$max_list_size, 0, FALSE, FALSE],
        [[1, 0, clc$keyword_type], [48], [
        ['ACCOUNT_VALIDATION             ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['AV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['CL                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['CM                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['COMMAND_LANGUAGE               ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['CONFIGURATION_MANAGER          ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['D                              ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
        ['DEADSTART                      ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['DEBUG                          ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['DF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 9],
        ['DISPATCHER                     ', clc$nominal_entry, clc$normal_usage_entry, 7],
        ['DS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['EP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 8],
        ['ERROR_PROCESSING               ', clc$nominal_entry, clc$normal_usage_entry, 8],
        ['FILE_SERVER                    ', clc$nominal_entry, clc$normal_usage_entry, 9],
        ['FILE_SYSTEM                    ', clc$nominal_entry, clc$normal_usage_entry, 10],
        ['FS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 10],
        ['INPUT_OUTPUT                   ', clc$nominal_entry, clc$normal_usage_entry, 11],
        ['IO                             ', clc$abbreviation_entry, clc$normal_usage_entry, 11],
        ['JOB_SWAPPER                    ', clc$nominal_entry, clc$normal_usage_entry, 12],
        ['JS                             ', clc$abbreviation_entry, clc$normal_usage_entry, 12],
        ['L                              ', clc$abbreviation_entry, clc$normal_usage_entry, 13],
        ['LG                             ', clc$alias_entry, clc$normal_usage_entry, 13],
        ['LOGGING                        ', clc$nominal_entry, clc$normal_usage_entry, 13],
        ['MEMORY_MANAGEMENT              ', clc$nominal_entry, clc$normal_usage_entry, 14],
        ['MM                             ', clc$abbreviation_entry, clc$normal_usage_entry, 14],
        ['NAM                            ', clc$abbreviation_entry, clc$normal_usage_entry, 15],
        ['NETWORK_APPLICATION_MANAGEMENT ', clc$nominal_entry, clc$normal_usage_entry, 15],
        ['O                              ', clc$abbreviation_entry, clc$normal_usage_entry, 16],
        ['OBSOLETE                       ', clc$nominal_entry, clc$normal_usage_entry, 22],
        ['OD                             ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
        ['OPERATION                      ', clc$nominal_entry, clc$normal_usage_entry, 16],
        ['OS                             ', clc$alias_entry, clc$normal_usage_entry, 16],
        ['OS_DEVELOPMENT                 ', clc$nominal_entry, clc$normal_usage_entry, 6],
        ['P                              ', clc$abbreviation_entry, clc$normal_usage_entry, 17],
        ['PERFORMANCE                    ', clc$nominal_entry, clc$normal_usage_entry, 17],
        ['R                              ', clc$abbreviation_entry, clc$normal_usage_entry, 18],
        ['RECOVERY                       ', clc$nominal_entry, clc$normal_usage_entry, 18],
        ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 19],
        ['SECURITY                       ', clc$nominal_entry, clc$normal_usage_entry, 19],
        ['T                              ', clc$abbreviation_entry, clc$normal_usage_entry, 20],
        ['TAPE                           ', clc$alias_entry, clc$normal_usage_entry, 20],
        ['TAPES                          ', clc$alias_entry, clc$normal_usage_entry, 20],
        ['TAPE_OPERATION                 ', clc$nominal_entry, clc$normal_usage_entry, 20],
        ['TM                             ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
        ['TO                             ', clc$alias_entry, clc$normal_usage_entry, 20],
        ['U                              ', clc$abbreviation_entry, clc$normal_usage_entry, 21],
        ['UNIMPLEMENTED                  ', clc$nominal_entry, clc$normal_usage_entry, 21]]
        ]
      ]
    ,
    'all'],
{ PARAMETER 5
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    229, [[1, 0, clc$keyword_type], [6], [
      ['A                              ', clc$alias_entry, clc$normal_usage_entry, 1],
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
      ['E                              ', clc$abbreviation_entry, clc$advanced_usage_entry, 2],
      ['EVERYTHING                     ', clc$nominal_entry, clc$advanced_usage_entry, 2],
      ['H                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
      ['HELP                           ', clc$alias_entry, clc$normal_usage_entry, 1]]
      ],
    504, [[1, 0, clc$list_type], [488, 1, clc$max_list_size, 0, FALSE, FALSE],
        [[1, 0, clc$keyword_type], [13], [
        ['CURRENT_VALUE                  ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['CURRENT_VALUES                 ', clc$alias_entry, clc$normal_usage_entry, 1],
        ['CV                             ', clc$alias_entry, clc$normal_usage_entry, 1],
        ['GM                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['GROUP_MEMBERSHIP               ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['SAVED_VALUE                    ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['SAVED_VALUES                   ', clc$alias_entry, clc$normal_usage_entry, 3],
        ['SV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['V                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['VALUE                          ', clc$alias_entry, clc$normal_usage_entry, 1],
        ['VALUES                         ', clc$alias_entry, clc$normal_usage_entry, 1],
        ['VALUE_RANGE                    ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['VR                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4]]
        ]
      ]
    ,
    'current_value'],
{ PARAMETER 6
    [[1, 0, clc$keyword_type], [4], [
    ['L                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['LIST                           ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['T                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['TABLE                          ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ],
{ PARAMETER 7
    [[1, 0, clc$integer_type], [2, 16, 10],
    '10'],
{ PARAMETER 8
    [[1, 0, clc$status_type]]];

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

    CONST
      p$attribute_name = 1,
      p$output = 2,
      p$attribute_selection = 3,
      p$attribute_group_membership = 4,
      p$display_option = 5,
      p$display_format = 6,
      p$radix = 7,
      p$status = 8;

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

    TYPE
      t$i_group_membership_selector = (c$gms_official_attribute, c$gms_internal_attribute,
            c$gms_changable_after_ds, c$gms_unchangable_after_ds),
      t$i_group_membership_selection = set of t$i_group_membership_selector,
      t$group_membership_selection = record
        internal: t$i_group_membership_selection,
        external: syt$system_const_value_groups,
      recend;

    VAR
      v$all_group_membership: [READ, oss$job_paged_literal] syt$system_const_value_groups :=
            -$syt$system_const_value_groups [syc$scvg_undocumented_attribute, syc$scvg_deadstart_only];

    VAR
      v$group_names: [READ, oss$job_paged_literal] array [syt$system_constant_value_group] of string (30) := [
{ syc$scvg_undocumented_attribute  } 'UNDOCUMENTED_ATTRIBUTE        ',
{ syc$scvg_deadstart_only          } 'DEADSTART_ONLY                ',
{ syc$scvg_account_validation      } 'ACCOUNTING_VALIDATION         ',
{ syc$scvg_command_language        } 'COMMAND_LANGUAGE              ',
{ syc$scvg_configuration_manager   } 'CONFIGURATION_MANAGER         ',
{ syc$scvg_deadstart               } 'DEADSTART                     ',
{ syc$scvg_debug                   } 'DEBUG                         ',
{ syc$scvg_dispatcher              } 'DISPATCHER                    ',
{ syc$scvg_error_processing        } 'ERROR_PROCESSING              ',
{ syc$scvg_file_server             } 'FILE_SERVER                   ',
{ syc$scvg_file_system             } 'FILE_SYSTEM                   ',
{ syc$scvg_input_output            } 'INPUT_OUTPUT                  ',
{ syc$scvg_job_swapper             } 'JOB_SWAPPER                   ',
{ syc$scvg_logging                 } 'LOGGING                       ',
{ syc$scvg_memory_management       } 'MEMORY_MANAGEMENT             ',
{ syc$scvg_network_management      } 'NETWORK_APPLICATION_MANAGEMENT',
{ syc$scvg_operation               } 'OPERATION                     ',
{ syc$scvg_performance             } 'PERFORMANCE                   ',
{ syc$scvg_recovery                } 'RECOVERY                      ',
{ syc$scvg_security                } 'SECURITY                      ',
{ syc$scvg_tape_operation          } 'TAPE_OPERATION                ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_                        } '                              ',
{ syc$scvg_development             } 'OS_DEVELOPMENT                ',
{ syc$scvg_obsolete                } 'OBSOLETE                      ',
{ syc$scvg_unimplemented           } 'UNIMPLEMENTED                 '];

    VAR
      attribute_name: ost$name,
      attribute_name_value_p: ^clt$data_value,
      attributes_count: integer,
      display_control: clt$display_control,
      display_options: t$display_options,
      data_value_p: ^clt$data_value,
      group: syt$system_constant_value_group,
      i: integer,
      new_display_page_procedure: clt$new_display_page_procedure,
      new_page_requested: boolean,
      output_open: boolean,
      output_proc_p: ^t$output_proc,
      radix_information: t$radix_information,
      ring_attributes: amt$ring_attributes,
      group_membership_selection: t$group_membership_selection,
      status_p: ^ost$status,
      system_constant_values: syt$system_constant_values,
      work_area: ^^clt$work_area;

*copyc clv$display_variables
*copyc clp$new_page_procedure
?? OLDTITLE ??
?? NEWTITLE := 'PUT_SUBTITLE ', EJECT ??

    PROCEDURE [INLINE] put_subtitle
      (VAR display_control: clt$display_control;
       VAR status: ost$status);

      VAR
        str: ost$string;

      fip#addl_initialize (str, 'ATTRIBUTE: ');
      fip#addl_string (str, attribute_name);
      clp$put_display (display_control, str.value (1, str.size), clc$trim, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

      clp$new_display_line (display_control, 1, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

    PROCEND put_subtitle;
?? OLDTITLE ??
?? NEWTITLE := 'P$ABORT_HANDLER', EJECT ??

    PROCEDURE p$abort_handler
      (    condition: pmt$condition;
           condition_information: ^pmt$condition_information;
           save_area: ^ost$stack_frame_save_area;
       VAR handler_status: ost$status);

      VAR
        ignore_status: ost$status;

      IF output_open THEN
        clp$close_display (display_control, ignore_status);
        output_open := FALSE;
      IFEND;

    PROCEND p$abort_handler;
?? OLDTITLE ??
?? NEWTITLE := 'F$ATTRIBUTE_SELECTED', EJECT ??

    FUNCTION f$attribute_selected
      (    candidate: syt$system_constant_value_entry;
           selector_p: ^clt$data_value;
           group_membership_selection: t$group_membership_selection): boolean;

      VAR
        attribute_selected: boolean,
        data_value_p: ^clt$data_value,
        match_info: clt$string_pattern_match_info;

      attribute_selected := TRUE;
      f$attribute_selected := TRUE;

{Name
      IF selector_p <> NIL THEN
        CASE selector_p^.kind OF
        = clc$keyword =
          {The only keyword is ALL. Attribute selection depends on the other parameters.
          ;

        = clc$list =
          data_value_p := selector_p;
          WHILE (data_value_p <> NIL) AND (data_value_p^.kind = clc$list) DO
            IF (data_value_p^.element_value <> NIL) AND (data_value_p^.element_value^.kind = clc$name) AND
                  (data_value_p^.element_value^.name_value = candidate.name) THEN

              {Attribute is explicitly selected => ignore rest of the parameters.

              RETURN; {----->
            IFEND;
            data_value_p := data_value_p^.link;
          WHILEND;

          {Attribute is NOT in the explicitly selected names => ignore rest of the parameters.

          f$attribute_selected := FALSE;
          RETURN; {----->

        = clc$string_pattern =
          clp$match_string_pattern (candidate.name (1, clp$trimmed_string_size (candidate.name)),
                selector_p^.string_pattern_value, clc$sp_anchored, clc$sp_quick_scan, match_info, status);
          IF NOT status.normal THEN
            RETURN; {----->
          IFEND;

          attribute_selected := match_info.result = clc$sp_success;

        ELSE
          ;
        CASEND;
      IFEND;

      IF NOT attribute_selected THEN
        f$attribute_selected := FALSE;
        RETURN; {----->
      IFEND;

{Internal/official
      IF syc$scvg_undocumented_attribute IN candidate.groups THEN
        IF NOT (c$gms_internal_attribute IN group_membership_selection.internal) THEN
          f$attribute_selected := FALSE;
          RETURN; {----->
        IFEND;
      ELSEIF NOT (c$gms_official_attribute IN group_membership_selection.internal) THEN
        f$attribute_selected := FALSE;
        RETURN; {----->
      IFEND;

{changable/unchangable after DS
      IF syc$scvg_deadstart_only IN candidate.groups THEN
        IF NOT (c$gms_unchangable_after_ds IN group_membership_selection.internal) THEN
          f$attribute_selected := FALSE;
        IFEND;
      ELSEIF NOT (c$gms_changable_after_ds IN group_membership_selection.internal) THEN
        f$attribute_selected := FALSE;
      IFEND;


      f$attribute_selected := (candidate.groups <= $syt$system_const_value_groups
            [syc$scvg_undocumented_attribute, syc$scvg_deadstart_only]) OR
            (candidate.groups * group_membership_selection.external <> $syt$system_const_value_groups []);

    FUNCEND f$attribute_selected;
?? OLDTITLE ??
?? NEWTITLE := 'P$BUILD_STRING_PATTERN', EJECT ??

    PROCEDURE p$build_string_pattern
      (    application_value_p: ^clt$application_value_text;
       VAR work_area_p: ^clt$work_area;
       VAR data_value: clt$data_value;
       VAR status: ost$status);

      VAR
        original_pattern_p: ^clt$string_value,
        string_pattern_p: ^clt$string_pattern,
        pattern_p: ^clt$string_value;

      pattern_p := application_value_p;
      original_pattern_p := pattern_p;
      PUSH pattern_p: [STRLENGTH (original_pattern_p^)];
      #TRANSLATE (osv$lower_to_upper, original_pattern_p^, pattern_p^);

      clp$build_pattern_for_wild_card (clc$wc_extended_pattern,
            $clt$string_pattern_build_opts [clc$sp_match_at_right, clc$sp_ignore_matched_substring],
            pattern_p^, work_area_p, string_pattern_p, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

      data_value.kind := clc$string_pattern;
      data_value.string_pattern_value := string_pattern_p;

    PROCEND p$build_string_pattern;
?? OLDTITLE ??
?? NEWTITLE := 'P$PUT_ATTRIBUTE_TABLE_OLD', EJECT ??

    PROCEDURE p$put_attribute_table_old
      (    candidate: syt$system_constant_value_entry;
           display_options: t$display_options;
           radix_information: t$radix_information;
       VAR display_control: clt$display_control;
       VAR status: ost$status);

      VAR
        str: ost$string;

      fip#addl_initialize (str, ' ');
      fip#addl_trimmed_string (str, candidate.name, fic#ato_trailing, ' ');
      fip#addl_string (str, ' = ');

      IF c$do_current_value IN display_options THEN
        fip#addl_integer_v2 (str, candidate.value, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
      IFEND;

      IF c$do_value_range IN display_options THEN
        fip#addl_integer_v2 (str, candidate.min, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        fip#addl_string (str, ' .. ');
        fip#addl_integer_v2 (str, candidate.max, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
      IFEND;

      clp$put_display (display_control, str.value (1, str.size), clc$trim, status);

    PROCEND p$put_attribute_table_old;
?? OLDTITLE ??
?? NEWTITLE := 'P$PUT_ATTRIBUTE_TABLE_FIX_ROW', EJECT ??

    PROCEDURE p$put_attribute_table_fix_row
      (    candidate: syt$system_constant_value_entry;
           display_options: t$display_options;
           radix_information: t$radix_information;
       VAR display_control: clt$display_control;
       VAR status: ost$status);

      VAR
        attribute_count: integer,
        str1: ost$string,
        str2: string (28),
        str: ost$string,
        value_kind: syt$sys_const_saved_values_kind;

      attribute_count := 0;
      fip#addl_initialize (str, ' ');
      fip#addl_string (str, candidate.name);
      fip#addl_string (str, ': ');

      IF c$do_current_value IN display_options THEN
        fip#addl_rjinteger_v2 (str, candidate.value, radix_information.value, radix_information.specified, 20,
              ' ', status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        attribute_count := attribute_count + 1;
      IFEND;

      IF c$do_value_range IN display_options THEN
        fip#addl_initialize (str1, '');
        fip#addl_integer_v2 (str1, candidate.min, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        fip#addl_string (str1, ' .. ');
        fip#addl_integer_v2 (str1, candidate.max, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        IF str1.size >= STRLENGTH (str2) THEN
          str2 := str1.value;
        ELSE
          str2 := '';
          str2 (STRLENGTH (str2) - str1.size + 1, str1.size) := str1.value (1, str1.size);
        IFEND;

        IF attribute_count > 0 THEN
          fip#addl_string (str, ', ');
        IFEND;
        fip#addl_string (str, str2);
        attribute_count := attribute_count + 1;
      IFEND;

      IF c$do_saved_values IN display_options THEN
        FOR value_kind := LOWERVALUE (value_kind) TO UPPERVALUE (value_kind) DO
          IF value_kind IN system_constant_values.defined_saved_values THEN
            IF attribute_count > 0 THEN
              fip#addl_string (str, ', ');
            IFEND;
            attribute_count := attribute_count + 1;

            fip#addl_rjinteger_v2 (str, candidate.saved_values [value_kind], radix_information.value,
                  radix_information.specified, 20, ' ', status);
            IF NOT status.normal THEN
              RETURN; {----->
            IFEND;
          IFEND;
        FOREND;
      IFEND;

      clp$put_display (display_control, str.value (1, str.size), clc$trim, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;

    PROCEND p$put_attribute_table_fix_row;
?? OLDTITLE ??
?? NEWTITLE := 'P$PUT_ATTRIBUTE_LIST', EJECT ??

    PROCEDURE p$put_attribute_list
      (    candidate: syt$system_constant_value_entry;
           display_options: t$display_options;
           radix_information: t$radix_information;
       VAR display_control: clt$display_control;
       VAR status: ost$status);

      VAR
        group: syt$system_constant_value_group,
        str: ost$string,
        value_kind: syt$sys_const_saved_values_kind;

?? NEWTITLE := 'P$PUT_DISPLAY', EJECT ??

      PROCEDURE p$put_display
        (    str: string ( * ));

        clp$put_display (display_control, str, clc$trim, status);
        IF NOT status.normal THEN
          EXIT p$put_attribute_list; {----->
        IFEND;

      PROCEND p$put_display;
?? OLDTITLE ??
?? NEWTITLE := 'P$PUT_HELP', EJECT ??

      PROCEDURE p$put_help;

        CONST
          c$default_help = 'DEFAULT_ATTRIBUTE_HELP         ',
          c$undefined = 'undefined';

        CONST
          c$number_of_values_before_save = 6,
          c$number_of_values_before_group = c$number_of_values_before_save + 4;

        VAR
          group: syt$system_constant_value_group,
          group_count: integer,
          help_module_p: ^ost$help_module,
          ignore_status: ost$status,
          max_message_line: ost$max_status_message_line,
          message: ost$status_message,
          message_name: ost$name,
          message_parameters_p: ^array [1 .. * ] of ^ost$message_parameter,
          message_template_p: ^ost$message_template,
          natural_language: ost$natural_language,
          online_manual_name: ost$online_manual_name,
          str: ost$string,
          value_kind: syt$sys_const_saved_values_kind;

?? NEWTITLE := 'P$PUT_MESSAGE', EJECT ??

        PROCEDURE [INLINE] p$put_message
          (    message: ost$status_message);

          VAR
            message_line: ^ost$status_message_line,
            message_area: ^ost$status_message,
            message_line_count: ^ost$status_message_line_count,
            message_line_index: 1 .. osc$max_status_message_lines,
            message_line_size: ^ost$status_message_line_size;


          message_area := ^message;
          RESET message_area;
          NEXT message_line_count IN message_area;

          clp$new_display_line (display_control, 1, status);
          IF NOT status.normal THEN
            RETURN; {----->
          IFEND;

          FOR message_line_index := 1 TO message_line_count^ DO
            NEXT message_line_size IN message_area;
            NEXT message_line: [message_line_size^] IN message_area;
            p$put_display (message_line^ (2, * ));
          FOREND;

        PROCEND p$put_message;
?? OLDTITLE ??
?? EJECT ??
        osp$find_help_module (osc$system_attribute_message, help_module_p, online_manual_name,
              natural_language, status);
        IF NOT status.normal OR (help_module_p = NIL) THEN
          RETURN; {----->
        IFEND;

        message_name := candidate.name;
        IF message_name = clc$change_secure_logging_name THEN
          message_name := c$change_secure_logging_name;
        ELSEIF message_name = avc$validation_level_const_name THEN
          message_name := c$validation_level_const_name;
        ELSEIF message_name = clc$system_logging_active_name THEN
          message_name := c$system_logging_active_name;
        ELSEIF (message_name (1, 5) = c$debug)
{        } AND (message_name (6) >= '0') AND (message_name (6) <= '9')
{        } AND ((message_name (7) = ' ') OR ((message_name (7) >= '0') AND (message_name (7) <= '6'))) THEN
          message_name := c$osv$debug;
        IFEND;

        osp$find_parameter_help_message (help_module_p, message_name, message_template_p, status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        IF message_template_p = NIL THEN
          osp$find_parameter_help_message (help_module_p, c$default_help, message_template_p, status);
          IF NOT status.normal OR (message_template_p = NIL) THEN
            RETURN; {----->
          IFEND;
        IFEND;

        IF display_control.page_width > osc$status_message_width THEN
          max_message_line := osc$status_message_width;
        ELSE
          max_message_line := display_control.page_width;
        IFEND;

        group_count := 0;
        FOR group := syc$scvg_first_external_group TO UPPERVALUE (syt$system_constant_value_group) DO
          IF group IN candidate.groups THEN
            group_count := group_count + 1;
          IFEND;
        FOREND;

        PUSH message_parameters_p: [1 .. c$number_of_values_before_group + group_count - 1];

{Name
        message_parameters_p^ [1] := ^candidate.name;

{Value
        fip#addl_initialize (str, '');
        fip#addl_integer_v2 (str, candidate.value, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        PUSH message_parameters_p^ [2]: [str.size];
        message_parameters_p^ [2]^ := str.value (1, str.size);

{Range
        fip#addl_initialize (str, '');
        fip#addl_integer_v2 (str, candidate.min, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        fip#addl_string (str, ' .. ');
        fip#addl_integer_v2 (str, candidate.max, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        PUSH message_parameters_p^ [3]: [str.size];
        message_parameters_p^ [3]^ := str.value (1, str.size);

{Changable ater DS
        IF syc$scvg_deadstart_only IN candidate.groups THEN
          fip#addl_initialize (str, 'FALSE');
        ELSE
          fip#addl_initialize (str, 'TRUE');
        IFEND;
        PUSH message_parameters_p^ [4]: [str.size];
        message_parameters_p^ [4]^ := str.value (1, str.size);

{Attribute Type
        IF syc$scvg_undocumented_attribute IN candidate.groups THEN
          fip#addl_initialize (str, 'INTERNAL_ATTRIBUTE');
        ELSE
          fip#addl_initialize (str, 'OFFICIAL_ATTRIBUTE');
        IFEND;
        PUSH message_parameters_p^ [5]: [str.size];
        message_parameters_p^ [5]^ := str.value (1, str.size);

{Saved Values
        FOR value_kind := LOWERVALUE (value_kind) TO UPPERVALUE (value_kind) DO
          IF value_kind IN system_constant_values.defined_saved_values THEN
            fip#addl_initialize (str, '');
            fip#addl_integer_v2 (str, candidate.saved_values [value_kind], radix_information.value,
                  radix_information.specified, status);
            IF NOT status.normal THEN
              RETURN; {----->
            IFEND;
            PUSH message_parameters_p^ [c$number_of_values_before_save + $INTEGER (value_kind)]: [str.size];
            message_parameters_p^ [c$number_of_values_before_save + $INTEGER (value_kind)]^ :=
                  str.value (1, str.size);
          ELSE
            PUSH message_parameters_p^ [c$number_of_values_before_save +
                  $INTEGER (value_kind)]: [STRLENGTH (c$undefined)];
            message_parameters_p^ [c$number_of_values_before_save + $INTEGER (value_kind)]^ := c$undefined;
          IFEND;
        FOREND;

{Group Membership - this is put here, as the actual count depends on the attribute and so also on the
{      form of the template.

        group_count := 0;
        FOR group := syc$scvg_first_external_group TO UPPERVALUE (syt$system_constant_value_group) DO
          IF group IN candidate.groups THEN
            message_parameters_p^ [c$number_of_values_before_group + group_count] := ^v$group_names [group];
            group_count := group_count + 1;
          IFEND;
        FOREND;

        osp$format_help_message (message_template_p, message_parameters_p, max_message_line, message, status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        p$put_message (message);

      PROCEND p$put_help;
?? OLDTITLE ??
?? EJECT ??
{Value
      IF c$do_current_value IN display_options THEN
        fip#addl_initialize (str, ' Current_Value             : ');
        fip#addl_integer_v2 (str, candidate.value, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        p$put_display (str.value (1, str.size));
      IFEND;

{Range
      IF c$do_value_range IN display_options THEN
        fip#addl_initialize (str, ' Value_Range               : ');
        fip#addl_integer_v2 (str, candidate.min, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;

        fip#addl_string (str, ' .. ');
        fip#addl_integer_v2 (str, candidate.max, radix_information.value, radix_information.specified,
              status);
        IF NOT status.normal THEN
          RETURN; {----->
        IFEND;
        p$put_display (str.value (1, str.size));
      IFEND;

{Attribute Type
      IF c$do_group_membership IN display_options THEN
        fip#addl_initialize (str, ' Changable after Deadstart : ');
        IF syc$scvg_deadstart_only IN candidate.groups THEN
          fip#addl_string (str, 'FALSE');
        ELSE
          fip#addl_string (str, 'TRUE');
        IFEND;
        p$put_display (str.value (1, str.size));

        fip#addl_initialize (str, ' Attribute Type            : ');
        IF syc$scvg_undocumented_attribute IN candidate.groups THEN
          fip#addl_string (str, 'INTERNAL_ATTRIBUTE');
        ELSE
          fip#addl_string (str, 'OFFICIAL_ATTRIBUTE');
        IFEND;
        p$put_display (str.value (1, str.size));
      IFEND;

{Saved Values
      IF c$do_saved_values IN display_options THEN
        IF system_constant_values.defined_saved_values = $t$sys_const_saved_values_kinds [] THEN
          fip#addl_initialize (str, ' Saved_Vales               : None');
        ELSE
          fip#addl_initialize (str, ' Saved_Values');
        IFEND;
        p$put_display (str.value (1, str.size));

        FOR value_kind := LOWERVALUE (value_kind) TO UPPERVALUE (value_kind) DO
          IF value_kind IN system_constant_values.defined_saved_values THEN
            fip#addl_initialize (str, '   ');
            fip#addl_string (str, v$sys_const_saved_val_kind_lab [value_kind]);
            fip#addl_string (str, '   : ');

            fip#addl_integer_v2 (str, candidate.saved_values [value_kind], radix_information.value,
                  radix_information.specified, status);
            IF NOT status.normal THEN
              RETURN; {----->
            IFEND;
            p$put_display (str.value (1, str.size));
          IFEND;
        FOREND;
      IFEND;

{Group Membership
      IF c$do_group_membership IN display_options THEN
        fip#addl_initialize (str, ' Group Membership          : ');
        FOR group := syc$scvg_first_external_group TO UPPERVALUE (syt$system_constant_value_group) DO
          IF group IN candidate.groups THEN
            fip#addl_string (str, v$group_names [group]);
            p$put_display (str.value (1, str.size));
            fip#addl_initialize (str, '                             ');
          IFEND;
        FOREND;
      IFEND;

{Help
      IF c$do_help IN display_options THEN
        p$put_help;
      IFEND;

      new_page_requested := TRUE;

    PROCEND p$put_attribute_list;
?? OLDTITLE ??
?? EJECT ??
    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

{ATTRIBUTE_SELECTION
    group_membership_selection.internal := $t$i_group_membership_selection [];
    group_membership_selection.external := $syt$system_const_value_groups [];
    data_value_p := pvt [p$attribute_selection].value;

    WHILE (data_value_p <> NIL) AND (data_value_p^.kind = clc$list) DO
      IF (data_value_p^.element_value <> NIL) AND (data_value_p^.element_value^.kind = clc$keyword) THEN
        IF data_value_p^.element_value^.keyword_value = 'ALL' THEN
          group_membership_selection.internal := group_membership_selection.internal +
                $t$i_group_membership_selection [c$gms_official_attribute, c$gms_changable_after_ds,
                c$gms_unchangable_after_ds];
        ELSEIF data_value_p^.element_value^.keyword_value = 'EVERYTHING' THEN
          group_membership_selection.internal := group_membership_selection.internal +
                $t$i_group_membership_selection [c$gms_official_attribute, c$gms_internal_attribute,
                c$gms_changable_after_ds, c$gms_unchangable_after_ds];
        ELSEIF data_value_p^.element_value^.keyword_value = 'OFFICIAL_ATTRIBUTE' THEN
          group_membership_selection.internal := group_membership_selection.internal +
                $t$i_group_membership_selection [c$gms_official_attribute];
        ELSEIF data_value_p^.element_value^.keyword_value = 'INTERNAL_ATTRIBUTE' THEN
          group_membership_selection.internal := group_membership_selection.internal +
                $t$i_group_membership_selection [c$gms_internal_attribute];
        ELSEIF data_value_p^.element_value^.keyword_value = 'CHANGABLE_AFTER_DEADSTART' THEN
          group_membership_selection.internal := group_membership_selection.internal +
                $t$i_group_membership_selection [c$gms_changable_after_ds];
        ELSEIF data_value_p^.element_value^.keyword_value = 'UNCHANGABLE_AFTER_DEADSTART' THEN
          group_membership_selection.internal := group_membership_selection.internal +
                $t$i_group_membership_selection [c$gms_unchangable_after_ds];
        IFEND;
      IFEND;
      data_value_p := data_value_p^.link;
    WHILEND;

{Ensure that we have at least one of the pairs official/inofficial changable/unachangable after DS set.
    IF group_membership_selection.internal * $t$i_group_membership_selection
          [c$gms_official_attribute, c$gms_internal_attribute] = $t$i_group_membership_selection [] THEN
      group_membership_selection.internal := group_membership_selection.internal +
            $t$i_group_membership_selection [c$gms_official_attribute];
    ELSEIF group_membership_selection.internal * $t$i_group_membership_selection
          [c$gms_changable_after_ds, c$gms_unchangable_after_ds] = $t$i_group_membership_selection [] THEN
      group_membership_selection.internal := group_membership_selection.internal +
            $t$i_group_membership_selection [c$gms_changable_after_ds, c$gms_unchangable_after_ds];
    IFEND;

{ATTRIBUTE_GROUP_MEMBERSHIP
    data_value_p := pvt [p$attribute_group_membership].value;

    IF data_value_p^.kind = clc$keyword THEN
      IF data_value_p^.keyword_value = 'ALL' THEN
        group_membership_selection.external := v$all_group_membership;
      IFEND;
    ELSE
      WHILE (data_value_p <> NIL) AND (data_value_p^.kind = clc$list) DO
        IF (data_value_p^.element_value <> NIL) AND (data_value_p^.element_value^.kind = clc$keyword) THEN

        /scan_group_names/
          FOR group := syc$scvg_first_external_group TO UPPERVALUE (syt$system_constant_value_group) DO
            IF data_value_p^.element_value^.keyword_value = v$group_names [group] THEN
              group_membership_selection.external := group_membership_selection.external +
                    $syt$system_const_value_groups [group];
              EXIT /scan_group_names/; {----->
            IFEND;
          FOREND /scan_group_names/;
        IFEND;

        data_value_p := data_value_p^.link;
      WHILEND;
    IFEND;

{DISPLAY_OPTION
    display_options := $t$display_options [];
    data_value_p := pvt [p$display_option].value;

    IF data_value_p^.kind = clc$keyword THEN
      IF data_value_p^.keyword_value = 'ALL' THEN
        display_options := $t$display_options [c$do_help];
      ELSEIF data_value_p^.keyword_value = 'EVERYTHING' THEN
        display_options := -$t$display_options [];
      IFEND;
    ELSE
      WHILE (data_value_p <> NIL) AND (data_value_p^.kind = clc$list) DO
        IF (data_value_p^.element_value <> NIL) AND (data_value_p^.element_value^.kind = clc$keyword) THEN
          IF data_value_p^.element_value^.keyword_value = 'CURRENT_VALUE' THEN
            display_options := display_options + $t$display_options [c$do_current_value];
          ELSEIF data_value_p^.element_value^.keyword_value = 'GROUP_MEMBERSHIP' THEN
            display_options := display_options + $t$display_options [c$do_group_membership];
          ELSEIF data_value_p^.element_value^.keyword_value = 'SAVED_VALUE' THEN
            display_options := display_options + $t$display_options [c$do_saved_values];
          ELSEIF data_value_p^.element_value^.keyword_value = 'VALUE_RANGE' THEN
            display_options := display_options + $t$display_options [c$do_value_range];
          IFEND;
        IFEND;
        data_value_p := data_value_p^.link;
      WHILEND;
    IFEND;

{DISPLAY_FORMAT
    new_display_page_procedure := NIL;
    IF pvt [p$display_format].specified AND (pvt [p$display_format].value <> NIL) THEN
      IF pvt [p$display_format].value^.keyword_value = 'TABLE' THEN
        output_proc_p := ^p$put_attribute_table_fix_row;
      ELSE
        new_display_page_procedure := ^clp$new_page_procedure;
        output_proc_p := ^p$put_attribute_list;
      IFEND;
    ELSEIF (display_options = $t$display_options [c$do_current_value]) OR
          (display_options = $t$display_options [c$do_value_range]) THEN
      output_proc_p := ^p$put_attribute_table_old;
    ELSE
      new_display_page_procedure := ^clp$new_page_procedure;
      output_proc_p := ^p$put_attribute_list;
    IFEND;

{RADIX:
    radix_information.value := pvt [p$radix].value^.integer_value.value;
    radix_information.specified := radix_information.value <> 10;

    clp$get_work_area (#RING (^work_area), work_area, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    output_open := FALSE;
    #SPOIL (output_open);
    osp$establish_block_exit_hndlr (^p$abort_handler);

    new_page_requested := FALSE;
    attribute_name := '';
    ring_attributes.r1 := #RING (^ring_attributes);
    ring_attributes.r2 := #RING (^ring_attributes);
    ring_attributes.r3 := #RING (^ring_attributes);
    clp$open_display_reference (pvt [p$output].value^.file_value^, new_display_page_procedure, fsc$list,
          ring_attributes, display_control, status);
    IF NOT status.normal THEN
      osp$disestablish_cond_handler;
      RETURN; {----->
    IFEND;
    output_open := TRUE;
    #SPOIL (output_open);

    clv$titles_built := FALSE;
    clv$command_name := 'DISPLAY_SYSTEM_ATTRIBUTES';

    IF display_control.page_width < clc$narrow_page_width THEN
      clv$page_width := clc$narrow_page_width;
    ELSEIF display_control.page_width > clc$wide_page_width THEN
      clv$page_width := clc$wide_page_width;
    ELSE
      clv$page_width := display_control.page_width;
    IFEND;

    attributes_count := 0;
    osp$get_system_constant_values (system_constant_values, work_area^, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    attributes_count := 0;
    attribute_name_value_p := pvt [p$attribute_name].value;
    IF (attribute_name_value_p <> NIL) AND (attribute_name_value_p^.kind = clc$application) THEN
      p$build_string_pattern (attribute_name_value_p^.application_value, work_area^, attribute_name_value_p^,
            status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
    IFEND;


  /output_attributes/
    FOR i := 1 TO system_constant_values.entries_count DO
      IF f$attribute_selected (system_constant_values.entries_p^ [i], attribute_name_value_p,
            group_membership_selection) THEN

        {Save the name for the subtitle
        attribute_name := system_constant_values.entries_p^ [i].name;
        attributes_count := attributes_count + 1;

        IF new_page_requested THEN
          IF (display_control.page_format = amc$burstable_form) OR
                (display_control.page_format = amc$non_burstable_form) THEN
            clp$new_display_page (display_control, status);
          ELSE
            clp$new_display_line (display_control, 2, status);
          IFEND;
        IFEND;

        output_proc_p^ (system_constant_values.entries_p^ [i], display_options, radix_information,
              display_control, status);
        IF NOT status.normal THEN
          EXIT /output_attributes/; {----->
        IFEND;
      IFEND;
    FOREND /output_attributes/;

    IF status.normal THEN
      status_p := ^status;
    ELSE
      PUSH status_p;
    IFEND;

    clp$close_display (display_control, status_p^);
    osp$disestablish_cond_handler;

    IF (attributes_count = 0) AND status_p^.normal THEN
      attribute_name_value_p := pvt [p$attribute_name].value;
      IF (attribute_name_value_p^.kind = clc$list)
{   } AND (clp$count_list_elements (attribute_name_value_p) = 1) THEN

{do we now get the status message text or not??????

        osp$set_status_abnormal ('SY', sye$unknown_parameter_name,
              attribute_name_value_p^.element_value^.name_value, status);
      ELSE
        osp$set_status_abnormal ('SY', sye$unknown_parameter_name,
              'No Attributes match the specified parameters', status);
      IFEND;
    IFEND;

  PROCEND osp$display_system_attribute;
?? OLDTITLE ??
MODEND osm$s_and_d_sys_attrs;
