?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Statistics Facility: Administer Security Audit' ??
MODULE sfm$security_audit_utility;
?? NEWTITLE := 'Global Declarations referenced by this module', EJECT ??
?? PUSH (LISTEXT := ON) ??
?? POP ??
*copyc avp$family_administrator
*copyc avp$system_administrator
*copyc clp$begin_utility
*copyc clp$build_standard_title
*copyc clp$close_display
*copyc clp$convert_integer_to_string
*copyc clp$end_include
*copyc clp$end_utility
*copyc clp$evaluate_parameters
*copyc clp$include_file
*copyc clp$new_display_line
*copyc clp$new_display_page
?? NEWTITLE := 'Dummy title' ??
*copyc clp$new_page_procedure
?? OLDTITLE ??
*copyc clp$open_display_reference
*copyc clp$put_display
*copyc clp$put_partial_display
*copyc clp$reset_for_next_display_page
*copyc clp$trimmed_string_size
*copyc mmp$create_scratch_segment
*copyc mmp$delete_scratch_segment
*copyc osp$disestablish_cond_handler
*copyc osp$establish_block_exit_hndlr
*copyc sfp$activate_audit
*copyc sfp$activate_job_statistic
*copyc sfp$activate_system_statistic
*copyc sfp$convert_stat_code_to_name
*copyc sfp$convert_stat_name_to_code
*copyc sfp$deactivate_audit
*copyc sfp$deactivate_job_statistic
*copyc sfp$deactivate_system_statistic
*copyc sfp$get_audited_operations
*copyc sfp$lock_statistic
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??

{ Constants that define the column starting positions and widths for the DISAO command.

  CONST
    stat_name_column_start = 1,
    stat_name_column_width = 10,
    locked_column_start = 11,
    locked_column_width = 4,
    operation_column_start = 16,
    operation_column_width = osc$max_name_size,
    criteria_column_start = 48,
    criteria_column_width = osc$max_name_size,
    subcriteria_column_start = 50,
    subcriteria_column_width = osc$max_name_size;

  CONST
    avc$admsa_utility_name = 'ADMINISTER_SECURITY_AUDIT      ',
    avc$admsa_utility_prompt = 'ASA';

  VAR
    audit_operation_name: [STATIC, READ] array [sft$audited_operation] of string (osc$max_name_size) :=
          ['Attach File                    ', 'Change File Attributes         ',
          'Change Object Name             ', 'Create Object                  ',
          'Create Permit                  ', 'Delete Object                  ',
          'Delete Permit                  ', 'Load FAP                       ',
          'Mount Magnetic Tape            ', 'Job End                        ',
          'Execute Program                ', 'Process Command                ',
          'User Identification            ', 'Activate Capability            ',
          'Change Validation Field        ', 'Change Validation Field Name   ',
          'Change Validation Record       ', 'Change Security Password       ',
          'Create Validation Field        ', 'Create Validation Record       ',
          'Deactivate Capability          ', 'Delete Validation Field        ',
          'Delete Validation Record       ', 'Force Security Password        ',
          'Force User Password            ', 'User Validation                '];


  VAR
    audit_selector_name: [STATIC, READ] array [sft$audit_selector] of string (osc$max_name_size) :=
          [osc$null_name, 'Result', 'Command Source', 'Access Modes', 'Catalog Owner'];

  VAR
    catalog_owner_name: [STATIC, READ] array [sft$catalog_owner] of string (osc$max_name_size) := ['Owner',
          'Non-owner', 'System'];

  VAR
    command_source_name: [STATIC, READ] array [sft$command_source] of string (osc$max_name_size) :=
          ['Primary Commands', 'Secondary Commands'];

  VAR
    operation_result_name: [STATIC, READ] array [sft$operation_result] of string (osc$max_name_size) :=
          ['Successful', 'Unsuccessful'];

  VAR
    access_mode_name: [STATIC, READ] array [pft$usage_options] of string (osc$max_name_size) := ['Read',
          'Shorten', 'Append', 'Modify', 'Execute'];

  VAR
    routing_control_table_id: sft$routing_control_table_id;

*copyc clv$display_variables
?? OLDTITLE ??
?? NEWTITLE := 'put_subtitle', EJECT ??

{ PURPOSE:
{   This procedure places the column headings on the output file.

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

    VAR
      display_line: string (clc$narrow_page_width);

    status.normal := TRUE;

    display_line := ' ';
    display_line (stat_name_column_start, stat_name_column_width) := 'Statistic';
    display_line (locked_column_start, locked_column_width) := 'Lock ';
    display_line (operation_column_start, operation_column_width) := 'Operation';
    display_line (criteria_column_start, criteria_column_width) := 'Selection Criteria';
    clp$put_display (display_control, display_line, clc$trim, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    display_line := ' ';
    display_line (stat_name_column_start, stat_name_column_width) := '---------';
    display_line (locked_column_start, locked_column_width) := '---- ';
    display_line (operation_column_start, operation_column_width) := '-------------------------------';
    display_line (criteria_column_start, criteria_column_width) := '-------------------------------';
    clp$put_display (display_control, display_line, clc$trim, status);

  PROCEND put_subtitle;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_administer_security_audit', EJECT ??

{ PURPOSE:
{   This is the starting point for the ADMINISTER_SECURITY_AUDIT utility.  ADMINISTER_SECURITY_AUDIT is used
{   to control auditing of security related activities.

  PROCEDURE [XDCL] sfp$_administer_security_audit
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa) administer_security_audit, admsa (
{   scope, s: key
{       (job, j)
{       (system, s)
{     keyend = system
{   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 .. 4] of clt$keyword_specification,
        default_value: string (6),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 29, 9, 27, 58, 74],
    clc$command, 3, 2, 0, 0, 0, 0, 2, 'OSM$ADMSA'], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['SCOPE                          ',clc$nominal_entry, 1],
    ['STATUS                         ',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, 155,
  clc$optional_default_parameter, 0, 6],
{ PARAMETER 2
    [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$keyword_type], [4], [
    ['J                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['JOB                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['SYSTEM                         ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'system'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

?? EJECT ??

{ table admsa_command_table type=command
{ command (activate_file_auditing, actfa)                              p=sfp$_activate_file_auditing
{ command (activate_job_auditing, actja)                               p=sfp$_activate_job_auditing
{ command (activate_statistic, acts)                                   p=sfp$_activate_statistic
{ command (activate_validation_auditing, actva)                        p=sfp$_activate_validation_auditi
{ command (deactivate_file_auditing, deafa)                            p=sfp$_deactivate_file_auditing
{ command (deactivate_job_auditing, deaja)                             p=sfp$_deactivate_job_auditing
{ command (deactivate_statistic, deas)                                 p=sfp$_deactivate_statistic
{ command (deactivate_validation_auditing, deava)                      p=sfp$_deactivate_validation_audi
{ command (display_audited_operations, disao)                          p=sfp$_display_audited_operations
{ command (quit, end_administer_security_audit, endasa, qui)           p=sfp$_end_administer_security_au
{ tablend

?? PUSH (LISTEXT := ON) ??

    VAR
      admsa_command_table: [STATIC, READ] ^clt$command_table := ^admsa_command_table_entries,

      admsa_command_table_entries: [STATIC, READ] array [1 .. 22] of clt$command_table_entry := [
            {} ['ACTFA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_file_auditing],
            {} ['ACTIVATE_FILE_AUDITING         ', clc$nominal_entry, clc$normal_usage_entry, 1,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_file_auditing],
            {} ['ACTIVATE_JOB_AUDITING          ', clc$nominal_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_job_auditing],
            {} ['ACTIVATE_STATISTIC             ', clc$nominal_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_statistic],
            {} ['ACTIVATE_VALIDATION_AUDITING   ', clc$nominal_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_validation_auditi],
            {} ['ACTJA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 2,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_job_auditing],
            {} ['ACTS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 3,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_statistic],
            {} ['ACTVA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 4,
            clc$automatically_log, clc$linked_call, ^sfp$_activate_validation_auditi],
            {} ['DEACTIVATE_FILE_AUDITING       ', clc$nominal_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_file_auditing],
            {} ['DEACTIVATE_JOB_AUDITING        ', clc$nominal_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_job_auditing],
            {} ['DEACTIVATE_STATISTIC           ', clc$nominal_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_statistic],
            {} ['DEACTIVATE_VALIDATION_AUDITING ', clc$nominal_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_validation_audi],
            {} ['DEAFA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 5,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_file_auditing],
            {} ['DEAJA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 6,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_job_auditing],
            {} ['DEAS                           ', clc$abbreviation_entry, clc$normal_usage_entry, 7,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_statistic],
            {} ['DEAVA                          ', clc$abbreviation_entry, clc$normal_usage_entry, 8,
            clc$automatically_log, clc$linked_call, ^sfp$_deactivate_validation_audi],
            {} ['DISAO                          ', clc$abbreviation_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^sfp$_display_audited_operations],
            {} ['DISPLAY_AUDITED_OPERATIONS     ', clc$nominal_entry, clc$normal_usage_entry, 9,
            clc$automatically_log, clc$linked_call, ^sfp$_display_audited_operations],
            {} ['ENDASA                         ', clc$alias_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^sfp$_end_administer_security_au],
            {} ['END_ADMINISTER_SECURITY_AUDIT  ', clc$alias_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^sfp$_end_administer_security_au],
            {} ['QUI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^sfp$_end_administer_security_au],
            {} ['QUIT                           ', clc$nominal_entry, clc$normal_usage_entry, 10,
            clc$automatically_log, clc$linked_call, ^sfp$_end_administer_security_au]];

?? POP ??

    VAR
      admsa_utility_attributes: ^clt$utility_attributes;

?? EJECT ??
    status.normal := TRUE;

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

    IF pvt [p$scope].value^.keyword_value = 'SYSTEM' THEN
      routing_control_table_id := sfc$sys_routing_control_table;
    ELSE
      routing_control_table_id := sfc$job_routing_control_table;
    IFEND;

{ Start up the ADMSA utility.

    PUSH admsa_utility_attributes: [1 .. 2];
    admsa_utility_attributes^ [1].key := clc$utility_prompt;
    admsa_utility_attributes^ [1].prompt.value := avc$admsa_utility_prompt;
    admsa_utility_attributes^ [1].prompt.size := clp$trimmed_string_size
          (admsa_utility_attributes^ [1].prompt.value);
    admsa_utility_attributes^ [2].key := clc$utility_command_table;
    admsa_utility_attributes^ [2].command_table := admsa_command_table;
    clp$begin_utility (avc$admsa_utility_name, admsa_utility_attributes^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$include_file (clc$current_command_input, '', avc$admsa_utility_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (avc$admsa_utility_name, status);

  PROCEND sfp$_administer_security_audit;
?? OLDTITLE ??
?? NEWTITLE := 'get_access_mode_criteria', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the ACCESS_MODE parameter into audit selection
{   criteria.

  PROCEDURE get_access_mode_criteria
    (    parameter_value: ^clt$data_value;
     VAR audit_selection_entry: sft$audit_selection_entry);

    VAR
      current_parameter_value: ^clt$data_value;

{  Initialize audit selection entry for an empty set of access modes.

    audit_selection_entry.selector := sfc$as_access_mode_set;
    audit_selection_entry.access_mode_set := $pft$usage_selections [];

{  Set current parameter value to the pointer of the first entry in the list of specified values.

    current_parameter_value := parameter_value;

{ If the kind is keyword then ALL was specified.

    IF current_parameter_value^.kind = clc$keyword THEN
      audit_selection_entry.access_mode_set := $pft$usage_selections
            [pfc$read, pfc$shorten, pfc$append, pfc$modify, pfc$execute];
    ELSE

    /assign_access_mode_set/
      WHILE current_parameter_value <> NIL DO
        IF current_parameter_value^.element_value^.keyword_value = 'APPEND' THEN
          audit_selection_entry.access_mode_set := audit_selection_entry.access_mode_set +
                $pft$usage_selections [pfc$append];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'EXECUTE' THEN
          audit_selection_entry.access_mode_set := audit_selection_entry.access_mode_set +
                $pft$usage_selections [pfc$execute];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'MODIFY' THEN
          audit_selection_entry.access_mode_set := audit_selection_entry.access_mode_set +
                $pft$usage_selections [pfc$modify];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'READ' THEN
          audit_selection_entry.access_mode_set := audit_selection_entry.access_mode_set +
                $pft$usage_selections [pfc$read];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'SHORTEN' THEN
          audit_selection_entry.access_mode_set := audit_selection_entry.access_mode_set +
                $pft$usage_selections [pfc$shorten];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'WRITE' THEN
          audit_selection_entry.access_mode_set := audit_selection_entry.access_mode_set +
                $pft$usage_selections [pfc$shorten, pfc$append, pfc$modify];
        IFEND;
        current_parameter_value := current_parameter_value^.link;
      WHILEND /assign_access_mode_set/;
    IFEND;

  PROCEND get_access_mode_criteria;
?? OLDTITLE ??
?? NEWTITLE := 'get_catalog_owner_criteria', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the CATALOG_OWNER parameter into audit
{   selection criteria.

  PROCEDURE get_catalog_owner_criteria
    (    parameter_value: ^clt$data_value;
     VAR audit_selection_entry: sft$audit_selection_entry);

    VAR
      current_parameter_value: ^clt$data_value;

{  Initialize audit selection entry for catalog owner to the empty set.

    audit_selection_entry.selector := sfc$as_catalog_owner_set;
    audit_selection_entry.catalog_owner_set := $sft$catalog_owner_set [];

{  Set current parameter value to the pointer of the first entry in the list of specified values.

    current_parameter_value := parameter_value;

{ If the kind is keyword then ALL was specified.

    IF current_parameter_value^.kind = clc$keyword THEN
      audit_selection_entry.catalog_owner_set := $sft$catalog_owner_set
            [sfc$co_owner, sfc$co_non_owner, sfc$co_system];
    ELSE

    /assign_catalog_owner/
      WHILE current_parameter_value <> NIL DO
        IF current_parameter_value^.element_value^.keyword_value = 'NON_OWNER' THEN
          audit_selection_entry.catalog_owner_set := audit_selection_entry.catalog_owner_set +
                $sft$catalog_owner_set [sfc$co_non_owner];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'OWNER' THEN
          audit_selection_entry.catalog_owner_set := audit_selection_entry.catalog_owner_set +
                $sft$catalog_owner_set [sfc$co_owner];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'SYSTEM' THEN
          audit_selection_entry.catalog_owner_set := audit_selection_entry.catalog_owner_set +
                $sft$catalog_owner_set [sfc$co_system];
        IFEND;
        current_parameter_value := current_parameter_value^.link;
      WHILEND /assign_catalog_owner/;
    IFEND;

  PROCEND get_catalog_owner_criteria;
?? OLDTITLE ??
?? NEWTITLE := 'get_command_source_criteria', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the COMMAND_SOURCE parameter into audit
{   selection criteria.

  PROCEDURE get_command_source_criteria
    (    parameter_value: ^clt$data_value;
     VAR audit_selection_entry: sft$audit_selection_entry);

{  Initialize audit selection entry for command source to the empty set.

    audit_selection_entry.selector := sfc$as_command_source_set;
    audit_selection_entry.command_source_set := $sft$command_source_set [];

    IF parameter_value^.keyword_value = 'PRIMARY_COMMANDS' THEN
      audit_selection_entry.command_source_set := audit_selection_entry.command_source_set +
            $sft$command_source_set [sfc$cs_primary_command_file];
    ELSE {parameter_value^.keyword_value = 'ALL_COMMANDS' THEN}
      audit_selection_entry.command_source_set := $sft$command_source_set
            [sfc$cs_primary_command_file, sfc$cs_secondary_command_file];
    IFEND;

  PROCEND get_command_source_criteria;
?? OLDTITLE ??
?? NEWTITLE := 'get_fs_audit_operation_set', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the OPERATION parameter on the file system auditing
{   commands into its internal value.

  PROCEDURE get_fs_audit_operation_set
    (    parameter_value: ^clt$data_value;
     VAR selected_operations: sft$audited_operation_set);

    VAR
      current_parameter_value: ^clt$data_value;

{  Initialize the selected operations to the empty set.

    selected_operations := $sft$audited_operation_set [];

{  Set current parameter value to the pointer of the first entry in the list of specified values.

    current_parameter_value := parameter_value;

{ If the kind is keyword then ALL was specified.

    IF current_parameter_value^.kind = clc$keyword THEN
      selected_operations := $sft$audited_operation_set [sfc$ao_fs_attach_file, sfc$ao_fs_change_attribute,
            sfc$ao_fs_change_name, sfc$ao_fs_create_object, sfc$ao_fs_create_permit, sfc$ao_fs_delete_object,
            sfc$ao_fs_delete_permit, sfc$ao_fs_load_fap, sfc$ao_fs_magnetic_tape_mount];
    ELSE

    /assign_fs_audit_operation/
      WHILE current_parameter_value <> NIL DO
        IF current_parameter_value^.element_value^.keyword_value = 'ATTACH_FILE' THEN
          selected_operations := selected_operations + $sft$audited_operation_set [sfc$ao_fs_attach_file];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'LOAD_FAP' THEN
          selected_operations := selected_operations + $sft$audited_operation_set [sfc$ao_fs_load_fap];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'MANAGE_OBJECT' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_fs_change_attribute, sfc$ao_fs_create_object, sfc$ao_fs_delete_object];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'MANAGE_PERMIT' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_fs_create_permit, sfc$ao_fs_delete_permit];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'MOUNT_REMOVABLE_MEDIA' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_fs_magnetic_tape_mount];
        IFEND;
        current_parameter_value := current_parameter_value^.link;
      WHILEND /assign_fs_audit_operation/;
    IFEND;

  PROCEND get_fs_audit_operation_set;
?? OLDTITLE ??
?? NEWTITLE := 'get_job_audit_operation_set', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the OPERATION parameter on the job auditing commands
{   into its internal value.

  PROCEDURE get_job_audit_operation_set
    (    parameter_value: ^clt$data_value;
     VAR selected_operations: sft$audited_operation_set);

    VAR
      current_parameter_value: ^clt$data_value;

{  Initialize the selected operations to the empty set.

    selected_operations := $sft$audited_operation_set [];

{  Set current parameter value to the pointer of the first entry in the list of specified values.

    current_parameter_value := parameter_value;

{ If the kind is keyword then ALL was specified.

    IF current_parameter_value^.kind = clc$keyword THEN
      selected_operations := $sft$audited_operation_set [sfc$ao_job_execute_program,
            sfc$ao_job_process_command];
    ELSE

    /assign_job_audit_operation/
      WHILE current_parameter_value <> NIL DO
        IF current_parameter_value^.element_value^.keyword_value = 'EXECUTE_PROGRAM' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_job_execute_program];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'PROCESS_COMMAND' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_job_process_command];
        IFEND;
        current_parameter_value := current_parameter_value^.link;
      WHILEND /assign_job_audit_operation/;
    IFEND;

  PROCEND get_job_audit_operation_set;
?? OLDTITLE ??
?? NEWTITLE := 'get_result_criteria', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the RESULT parameter into audit selection criteria.

  PROCEDURE get_result_criteria
    (    parameter_value: ^clt$data_value;
     VAR audit_selection_entry: sft$audit_selection_entry);

{  Initialize audit selection entry for result to the empty set.

    audit_selection_entry.selector := sfc$as_operation_result_set;
    audit_selection_entry.operation_result_set := $sft$operation_result_set [];

    IF parameter_value^.keyword_value = 'SUCCESSFUL' THEN
      audit_selection_entry.operation_result_set := audit_selection_entry.operation_result_set +
            $sft$operation_result_set [sfc$or_successful];
    ELSEIF parameter_value^.keyword_value = 'UNSUCCESSFUL' THEN
      audit_selection_entry.operation_result_set := audit_selection_entry.operation_result_set +
            $sft$operation_result_set [sfc$or_unsuccessful];
    ELSE {parameter_value^.keyword_value = 'ALL' THEN}
      audit_selection_entry.operation_result_set := $sft$operation_result_set
            [sfc$or_successful, sfc$or_unsuccessful];
    IFEND;

  PROCEND get_result_criteria;
?? OLDTITLE ??
?? NEWTITLE := 'get_val_audit_operation_set', EJECT ??

{ PURPOSE:
{   This procedure translates the value specified for the OPERATION parameter on the validation auditing
{   commands into its internal value.

  PROCEDURE get_val_audit_operation_set
    (    parameter_value: ^clt$data_value;
     VAR selected_operations: sft$audited_operation_set);

    VAR
      current_parameter_value: ^clt$data_value;

{  Initialize the selected operations to the empty set.

    selected_operations := $sft$audited_operation_set [];

{  Set current parameter value to the pointer of the first entry in the list of specified values.

    current_parameter_value := parameter_value;

{ If the kind is keyword then ALL was specified.

    IF current_parameter_value^.kind = clc$keyword THEN
      selected_operations := $sft$audited_operation_set [sfc$ao_val_activate_capability,
            sfc$ao_val_change_field, sfc$ao_val_change_field_name, sfc$ao_val_change_record,
            sfc$ao_val_change_security_pw, sfc$ao_val_create_field, sfc$ao_val_create_record,
            sfc$ao_val_deact_capability, sfc$ao_val_delete_field, sfc$ao_val_delete_record,
            sfc$ao_val_force_security_pw, sfc$ao_val_force_user_password, sfc$ao_val_prevalidate_user];
    ELSE

    /assign_val_audit_operation/
      WHILE current_parameter_value <> NIL DO
        IF current_parameter_value^.element_value^.keyword_value = 'MANAGE_FIELD' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_val_change_field, sfc$ao_val_change_field_name, sfc$ao_val_create_field,
                sfc$ao_val_delete_field]
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'MANAGE_SECURITY_PASSWORD' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_val_change_security_pw, sfc$ao_val_force_security_pw];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'MANAGE_VALIDATION' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_val_change_record, sfc$ao_val_create_record, sfc$ao_val_delete_record,
                sfc$ao_val_force_user_password];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'USE_CAPABILITY' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_val_activate_capability, sfc$ao_val_deact_capability];
        ELSEIF current_parameter_value^.element_value^.keyword_value = 'USER_VALIDATION' THEN
          selected_operations := selected_operations + $sft$audited_operation_set
                [sfc$ao_val_prevalidate_user];
        IFEND;
        current_parameter_value := current_parameter_value^.link;
      WHILEND /assign_val_audit_operation/;
    IFEND;

  PROCEND get_val_audit_operation_set;
?? OLDTITLE ??
?? NEWTITLE := 'ADMINISTER_SECURITY_AUDIT Subcommand Processors', EJECT ??
?? NEWTITLE := 'sfp$_activate_file_auditing', EJECT ??

{ PURPOSE:
{   This procedure initiates the ACTIVATE_FILE_AUDITING subcommand.

  PROCEDURE sfp$_activate_file_auditing
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_actfa) activate_file_auditing, actfa (
{   lock, l: boolean = $required
{   operation, operations, o: any of
{       list of key
{         (attach_file, af)
{         (load_fap, lf)
{         (manage_object, mo)
{         (manage_permit, mp)
{         (mount_removable_media, mrm)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   result, r: key
{       (successful, s)
{       (unsuccessful, u)
{       all
{     keyend = all
{   catalog_owner, co: any of
{       list of key
{         (non_owner, no)
{         (owner, o)
{         (system, s)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   access_mode, access_modes, am: any of
{       list of key
{         (append, a)
{         (execute, e)
{         (modify, m)
{         (read, r)
{         (shorten, s)
{         (write, w)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 13] of clt$pdt_parameter_name,
      parameters: array [1 .. 6] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      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,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 10] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 5] of clt$keyword_specification,
        default_value: string (3),
      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$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 6] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        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$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 12] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type6: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 29, 9, 37, 40, 819],
    clc$command, 13, 6, 1, 0, 0, 0, 6, 'OSM$ADMSA_ACTFA'], [
    ['ACCESS_MODE                    ',clc$nominal_entry, 5],
    ['ACCESS_MODES                   ',clc$alias_entry, 5],
    ['AM                             ',clc$abbreviation_entry, 5],
    ['CATALOG_OWNER                  ',clc$nominal_entry, 4],
    ['CO                             ',clc$abbreviation_entry, 4],
    ['L                              ',clc$abbreviation_entry, 1],
    ['LOCK                           ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OPERATION                      ',clc$nominal_entry, 2],
    ['OPERATIONS                     ',clc$alias_entry, 2],
    ['R                              ',clc$abbreviation_entry, 3],
    ['RESULT                         ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 6]],
    [
{ PARAMETER 1
    [7, 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$required_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 457,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [12, 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, 192,
  clc$optional_default_parameter, 0, 3],
{ 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, 309,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 5
    [1, 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, 531,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 6
    [13, 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$boolean_type]],
{ PARAMETER 2
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    393, [[1, 0, clc$list_type], [377, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [10], [
        ['AF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['ATTACH_FILE                    ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['LF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['LOAD_FAP                       ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['MANAGE_OBJECT                  ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['MANAGE_PERMIT                  ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['MO                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['MOUNT_REMOVABLE_MEDIA          ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['MP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['MRM                            ', clc$abbreviation_entry, clc$normal_usage_entry, 5]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [5], [
    ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['SUCCESSFUL                     ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['U                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['UNSUCCESSFUL                   ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'all'],
{ PARAMETER 4
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    245, [[1, 0, clc$list_type], [229, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [6], [
        ['NO                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['NON_OWNER                      ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['O                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['OWNER                          ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['SYSTEM                         ', clc$nominal_entry, clc$normal_usage_entry, 3]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 5
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    467, [[1, 0, clc$list_type], [451, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [12], [
        ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['APPEND                         ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['E                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['EXECUTE                        ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['M                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['MODIFY                         ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['R                              ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['READ                           ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
        ['SHORTEN                        ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['W                              ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
        ['WRITE                          ', clc$nominal_entry, clc$normal_usage_entry, 6]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 6
    [[1, 0, clc$status_type]]];

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

    CONST
      p$lock = 1,
      p$operation = 2,
      p$result = 3,
      p$catalog_owner = 4,
      p$access_mode = 5,
      p$status = 6;

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

    VAR
      audit_selection_criteria: ^sft$audit_selection_criteria,
      audited_operation_set: sft$audited_operation_set;

    status.normal := TRUE;

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

    PUSH audit_selection_criteria: [1 .. 3];
    get_result_criteria (pvt [p$result].value, audit_selection_criteria^ [1]);
    get_catalog_owner_criteria (pvt [p$catalog_owner].value, audit_selection_criteria^ [2]);
    get_access_mode_criteria (pvt [p$access_mode].value, audit_selection_criteria^ [3]);

    get_fs_audit_operation_set (pvt [p$operation].value, audited_operation_set);

{ Insure that name changes are audited.

    audited_operation_set := audited_operation_set + $sft$audited_operation_set [sfc$ao_fs_change_name];

    sfp$activate_audit (audited_operation_set, audit_selection_criteria^, routing_control_table_id,
          pvt [p$lock].value^.boolean_value.value, status);

  PROCEND sfp$_activate_file_auditing;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_activate_job_auditing', EJECT ??

{ PURPOSE:
{   This procedure initiates the ACTIVATE_JOB_AUDITING subcommand.

  PROCEDURE sfp$_activate_job_auditing
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_actja) activate_job_auditing, actja (
{   lock, l: boolean = $required
{   operation, operations, o: any of
{       list of key
{         (execute_program, ep)
{         (process_command, pc)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   result, r: key
{       (successful, s)
{       (unsuccessful, u)
{       all
{     keyend = all
{   command_source, cs: key
{       (all_commands, ac)
{       (primary_commands, pc)
{     keyend = primary_commands
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 10] of clt$pdt_parameter_name,
      parameters: array [1 .. 5] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
      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,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 4] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 5] of clt$keyword_specification,
        default_value: string (3),
      recend,
      type4: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 4] of clt$keyword_specification,
        default_value: string (16),
      recend,
      type5: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 4, 21, 12, 1, 3, 419],
    clc$command, 10, 5, 1, 0, 0, 0, 5, 'OSM$ADMSA_ACTJA'], [
    ['COMMAND_SOURCE                 ',clc$nominal_entry, 4],
    ['CS                             ',clc$abbreviation_entry, 4],
    ['L                              ',clc$abbreviation_entry, 1],
    ['LOCK                           ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OPERATION                      ',clc$nominal_entry, 2],
    ['OPERATIONS                     ',clc$alias_entry, 2],
    ['R                              ',clc$abbreviation_entry, 3],
    ['RESULT                         ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 5]],
    [
{ PARAMETER 1
    [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, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 235,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [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, 192,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 4
    [1, 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_default_parameter, 0, 16],
{ PARAMETER 5
    [10, 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$boolean_type]],
{ PARAMETER 2
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    171, [[1, 0, clc$list_type], [155, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [4], [
        ['EP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['EXECUTE_PROGRAM                ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['PC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['PROCESS_COMMAND                ', clc$nominal_entry, clc$normal_usage_entry, 2]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [5], [
    ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['SUCCESSFUL                     ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['U                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['UNSUCCESSFUL                   ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'all'],
{ PARAMETER 4
    [[1, 0, clc$keyword_type], [4], [
    ['AC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['ALL_COMMANDS                   ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['PC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['PRIMARY_COMMANDS               ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'primary_commands'],
{ PARAMETER 5
    [[1, 0, clc$status_type]]];

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

    CONST
      p$lock = 1,
      p$operation = 2,
      p$result = 3,
      p$command_source = 4,
      p$status = 5;

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

    VAR
      audit_selection_criteria: ^sft$audit_selection_criteria,
      audited_operation_set: sft$audited_operation_set;

    status.normal := TRUE;

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

    PUSH audit_selection_criteria: [1 .. 2];
    get_result_criteria (pvt [p$result].value, audit_selection_criteria^ [1]);
    get_command_source_criteria (pvt [p$command_source].value, audit_selection_criteria^ [2]);

    get_job_audit_operation_set (pvt [p$operation].value, audited_operation_set);

    sfp$activate_audit (audited_operation_set, audit_selection_criteria^, routing_control_table_id,
          pvt [p$lock].value^.boolean_value.value, status);

  PROCEND sfp$_activate_job_auditing;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_activate_statistic', EJECT ??

{ PURPOSE:
{   This procedure initiates the ACTIVATE_STATISTIC subcommand.

  PROCEDURE sfp$_activate_statistic
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_acts) activate_statistic, acts (
{   lock, l: boolean = $required
{   statistic, statistics, s: list of statistic_code = $required
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 6] 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$list_type_qualifier,
        element_type_spec: record
          header: clt$type_specification_header,
        recend,
      recend,
      type3: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 5, 1, 14, 57, 56, 384],
    clc$command, 6, 3, 2, 0, 0, 0, 3, 'OSM$ADMSA_ACTS'], [
    ['L                              ',clc$abbreviation_entry, 1],
    ['LOCK                           ',clc$nominal_entry, 1],
    ['S                              ',clc$abbreviation_entry, 2],
    ['STATISTIC                      ',clc$nominal_entry, 2],
    ['STATISTICS                     ',clc$alias_entry, 2],
    ['STATUS                         ',clc$nominal_entry, 3]],
    [
{ 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, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 19, 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$boolean_type]],
{ PARAMETER 2
    [[1, 0, clc$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$statistic_code_type]]
    ],
{ PARAMETER 3
    [[1, 0, clc$status_type]]];

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

    CONST
      p$lock = 1,
      p$statistic = 2,
      p$status = 3;

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

    VAR
      current_parameter_value: ^clt$data_value,
      statistic_name: ost$name;

    status.normal := TRUE;

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

    current_parameter_value := pvt [p$statistic].value;

    WHILE current_parameter_value <> NIL DO
      sfp$convert_stat_code_to_name (current_parameter_value^.element_value^.statistic_code_value,
            statistic_name, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF routing_control_table_id = sfc$sys_routing_control_table THEN
        sfp$activate_system_statistic (current_parameter_value^.element_value^.statistic_code_value,
              $sft$binary_logset [pmc$security_log], status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        IF pvt [p$lock].value^.boolean_value.value THEN
          sfp$lock_statistic (current_parameter_value^.element_value^.statistic_code_value,
                $sft$binary_logset [pmc$security_log], routing_control_table_id, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
      ELSE
        sfp$activate_job_statistic (current_parameter_value^.element_value^.statistic_code_value,
              $sft$binary_logset [pmc$security_log], status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
        IF pvt [p$lock].value^.boolean_value.value THEN
          sfp$lock_statistic (current_parameter_value^.element_value^.statistic_code_value,
                $sft$binary_logset [pmc$security_log], routing_control_table_id, status);
          IF NOT status.normal THEN
            RETURN;
          IFEND;
        IFEND;
      IFEND;

      current_parameter_value := current_parameter_value^.link;
    WHILEND;

  PROCEND sfp$_activate_statistic;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_activate_validation_auditi', EJECT ??

{ PURPOSE:
{   This procedure initiates the ACTIVATE_VALIDATION_AUDITING subcommand.

  PROCEDURE sfp$_activate_validation_auditi
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_actva) activate_validation_auditing, actva (
{   lock, l: boolean = $required
{   operation, operations, o: any of
{       list of key
{         (manage_field, mf)
{         (manage_security_password, mspw)
{         (manage_validation, mv)
{         (use_capability, uc)
{         (user_validation, uv)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   result, r: key
{       (successful, s)
{       (unsuccessful, u)
{       all
{     keyend = all
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 8] 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$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: 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 .. 10] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type3: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 5] of clt$keyword_specification,
        default_value: string (3),
      recend,
      type4: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 4, 12, 17, 12, 37, 546],
    clc$command, 8, 4, 1, 0, 0, 0, 4, 'OSM$ADMSA_ACTVA'], [
    ['L                              ',clc$abbreviation_entry, 1],
    ['LOCK                           ',clc$nominal_entry, 1],
    ['O                              ',clc$abbreviation_entry, 2],
    ['OPERATION                      ',clc$nominal_entry, 2],
    ['OPERATIONS                     ',clc$alias_entry, 2],
    ['R                              ',clc$abbreviation_entry, 3],
    ['RESULT                         ',clc$nominal_entry, 3],
    ['STATUS                         ',clc$nominal_entry, 4]],
    [
{ 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, 3, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [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, 457,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 3
    [7, 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, 192,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 4
    [8, 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$boolean_type]],
{ PARAMETER 2
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$list_type],
    FALSE, 2],
    393, [[1, 0, clc$list_type], [377, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [10], [
        ['MANAGE_FIELD                   ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['MANAGE_SECURITY_PASSWORD       ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['MANAGE_VALIDATION              ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['MF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['MSPW                           ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['MV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['UC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['USER_VALIDATION                ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['USE_CAPABILITY                 ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['UV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 3
    [[1, 0, clc$keyword_type], [5], [
    ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['S                              ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
    ['SUCCESSFUL                     ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['U                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['UNSUCCESSFUL                   ', clc$nominal_entry, clc$normal_usage_entry, 2]]
    ,
    'all'],
{ PARAMETER 4
    [[1, 0, clc$status_type]]];

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

    CONST
      p$lock = 1,
      p$operation = 2,
      p$result = 3,
      p$status = 4;

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

    VAR
      audit_selection_criteria: ^sft$audit_selection_criteria,
      audited_operation_set: sft$audited_operation_set;

    status.normal := TRUE;

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

    PUSH audit_selection_criteria: [1 .. 1];
    get_result_criteria (pvt [p$result].value, audit_selection_criteria^ [1]);

    get_val_audit_operation_set (pvt [p$operation].value, audited_operation_set);

    sfp$activate_audit (audited_operation_set, audit_selection_criteria^, routing_control_table_id,
          pvt [p$lock].value^.boolean_value.value, status);

  PROCEND sfp$_activate_validation_auditi;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_deactivate_file_auditing', EJECT ??

{ PURPOSE:
{   This procedure initiates the DEACTIVATE_FILE_AUDITING subcommand.

  PROCEDURE sfp$_deactivate_file_auditing
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_deafa) deactivate_file_auditing, deafa (
{   operation, operations, o: any of
{       list of key
{         (attach_file, af)
{         (load_fap, lf)
{         (manage_object, mo)
{         (manage_permit, mp)
{         (mount_removable_media, mrm)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] 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$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 10] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 6, 29, 10, 26, 21, 527],
    clc$command, 4, 2, 0, 0, 0, 0, 2, 'OSM$ADMSA_DEAFA'], [
    ['O                              ',clc$abbreviation_entry, 1],
    ['OPERATION                      ',clc$nominal_entry, 1],
    ['OPERATIONS                     ',clc$alias_entry, 1],
    ['STATUS                         ',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, 457,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [4, 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$list_type],
    FALSE, 2],
    393, [[1, 0, clc$list_type], [377, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [10], [
        ['AF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['ATTACH_FILE                    ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['LF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['LOAD_FAP                       ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['MANAGE_OBJECT                  ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['MANAGE_PERMIT                  ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['MO                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['MOUNT_REMOVABLE_MEDIA          ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['MP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['MRM                            ', clc$abbreviation_entry, clc$normal_usage_entry, 5]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

    VAR
      audited_operation_set: sft$audited_operation_set;

    status.normal := TRUE;

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

    get_fs_audit_operation_set (pvt [p$operation].value, audited_operation_set);

    sfp$deactivate_audit (audited_operation_set, routing_control_table_id, status);

  PROCEND sfp$_deactivate_file_auditing;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_deactivate_job_auditing', EJECT ??

{ PURPOSE:
{   This procedure initiates the DEACTIVATE_JOB_AUDITING subcommand.

  PROCEDURE sfp$_deactivate_job_auditing
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_deaja) deactivate_job_auditing, deaja (
{   operation, operations, o: any of
{       list of key
{         (execute_program, ep)
{         (process_command, pc)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] 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$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 4] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 4, 12, 17, 17, 39, 739],
    clc$command, 4, 2, 0, 0, 0, 0, 2, 'OSM$ADMSA_DEAJA'], [
    ['O                              ',clc$abbreviation_entry, 1],
    ['OPERATION                      ',clc$nominal_entry, 1],
    ['OPERATIONS                     ',clc$alias_entry, 1],
    ['STATUS                         ',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, 235,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [4, 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$list_type],
    FALSE, 2],
    171, [[1, 0, clc$list_type], [155, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [4], [
        ['EP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['EXECUTE_PROGRAM                ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['PC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['PROCESS_COMMAND                ', clc$nominal_entry, clc$normal_usage_entry, 2]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

    VAR
      audited_operation_set: sft$audited_operation_set;

    status.normal := TRUE;

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

    get_job_audit_operation_set (pvt [p$operation].value, audited_operation_set);

    sfp$deactivate_audit (audited_operation_set, routing_control_table_id, status);

  PROCEND sfp$_deactivate_job_auditing;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_deactivate_statistic', EJECT ??

{ PURPOSE:
{   This procedure initiates the DEACTIVATE_STATISTIC subcommand.

  PROCEDURE sfp$_deactivate_statistic
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_deas) deactivate_statistic, deas (
{   statistic, statistics, s: list of statistic_code = $required
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] 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,
        recend,
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 5, 3, 16, 5, 33, 368],
    clc$command, 4, 2, 1, 0, 0, 0, 2, 'OSM$ADMSA_DEAS'], [
    ['S                              ',clc$abbreviation_entry, 1],
    ['STATISTIC                      ',clc$nominal_entry, 1],
    ['STATISTICS                     ',clc$alias_entry, 1],
    ['STATUS                         ',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, 19, clc$required_parameter,
  0, 0],
{ PARAMETER 2
    [4, 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$list_type], [3, 1, clc$max_list_size, FALSE],
      [[1, 0, clc$statistic_code_type]]
    ],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

    VAR
      current_parameter_value: ^clt$data_value,
      statistic_name: ost$name;

    status.normal := TRUE;

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

    current_parameter_value := pvt [p$statistic].value;

    WHILE current_parameter_value <> NIL DO
      sfp$convert_stat_code_to_name (current_parameter_value^.element_value^.statistic_code_value,
            statistic_name, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;

      IF routing_control_table_id = sfc$sys_routing_control_table THEN
        sfp$deactivate_system_statistic (current_parameter_value^.element_value^.statistic_code_value,
              $sft$binary_logset [pmc$security_log], status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      ELSE
        sfp$deactivate_job_statistic (current_parameter_value^.element_value^.statistic_code_value,
              $sft$binary_logset [pmc$security_log], status);
        IF NOT status.normal THEN
          RETURN;
        IFEND;
      IFEND;

      current_parameter_value := current_parameter_value^.link;
    WHILEND;

  PROCEND sfp$_deactivate_statistic;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_display_audited_operations', EJECT ??

{ PURPOSE:
{   This procedure initiates the DISPLAY_AUDITED_OPERATIONS subcommand.

  PROCEDURE sfp$_display_audited_operations
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_disao) display_audited_operations, disao (
{   output, o: file = $output
{   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,
        default_value: string (7),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 4, 12, 17, 38, 33, 264],
    clc$command, 3, 2, 0, 0, 0, 0, 2, 'OSM$ADMSA_DISAO'], [
    ['O                              ',clc$abbreviation_entry, 1],
    ['OUTPUT                         ',clc$nominal_entry, 1],
    ['STATUS                         ',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, 3,
  clc$optional_default_parameter, 0, 7],
{ PARAMETER 2
    [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$file_type],
    '$output'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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


    VAR
      current_audit_control: ^sft$audit_control,
      current_routing_control: ^sft$routing_control,
      display_control: clt$display_control,
      display_line: string (80),
      display_line_length: 0 .. 80,
      file_contents: amt$file_contents,
      ignore_status: ost$status,
      index: integer,
      ring_attributes: amt$ring_attributes,
      routing_control: ^sft$routing_control,
      scratch_segment: amt$segment_pointer,
      statistic_name: ost$name,
      work_area: ^SEQ ( * );

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

{ PURPOSE:
{   This is a block exit condition handler that is used to insure that the scratch segment is deleted and
{   the output file is closed.

    PROCEDURE condition_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;

      mmp$delete_scratch_segment (scratch_segment, ignore_status);
      clp$close_display (display_control, ignore_status);

    PROCEND condition_handler;

?? OLDTITLE, EJECT ??
    status.normal := TRUE;

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

    osp$establish_block_exit_hndlr (^condition_handler);

    mmp$create_scratch_segment (amc$sequence_pointer, mmc$as_random, scratch_segment, status);
    #SPOIL (scratch_segment);
    RESET scratch_segment.sequence_pointer;
    work_area := scratch_segment.sequence_pointer;

    REPEAT
      sfp$get_audited_operations (routing_control_table_id, work_area, routing_control, status);
    UNTIL (status.normal) OR (status.condition <> sfe$call_again_job_recovered);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clv$titles_built := FALSE;
    clv$command_name := 'display_audited_operations';
    ring_attributes.r1 := #RING (^ring_attributes);
    ring_attributes.r2 := #RING (^ring_attributes);
    ring_attributes.r3 := #RING (^ring_attributes);
    file_contents := amc$list;

    clp$open_display_reference (pvt [p$output].value^.file_value^, ^clp$new_page_procedure, file_contents,
          ring_attributes, display_control, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    IF ((display_control.page_format <> amc$burstable_form) AND
          (display_control.page_format <> amc$non_burstable_form)) THEN
      put_subtitle (display_control, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
    IFEND;


    current_routing_control := routing_control;
    WHILE current_routing_control <> NIL DO
      sfp$convert_stat_code_to_name (current_routing_control^.statistic_code, statistic_name, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      IF current_routing_control^.audit_control_p <> NIL THEN
        current_audit_control := current_routing_control^.audit_control_p;
        WHILE current_audit_control <> NIL DO
          display_line := ' ';
          display_line (stat_name_column_start, stat_name_column_width) := statistic_name;
          IF current_audit_control^.locked THEN
            display_line (locked_column_start, locked_column_width) := 'Yes ';
          ELSE
            display_line (locked_column_start, locked_column_width) := 'No  ';
          IFEND;
          display_line (operation_column_start, operation_column_width) :=
                audit_operation_name [current_audit_control^.operation];

        /process_selection_criteria/
          FOR index := 1 TO UPPERBOUND (current_audit_control^.selection_criteria) DO
            IF current_audit_control^.selection_criteria [index].selector = sfc$as_null_selector THEN
              IF UPPERBOUND (current_audit_control^.selection_criteria) = 1 THEN
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              CYCLE /process_selection_criteria/;
            ELSEIF ((current_audit_control^.operation <> sfc$ao_fs_attach_file) AND
                  (current_audit_control^.selection_criteria [index].selector = sfc$as_access_mode_set)) THEN
              CYCLE /process_selection_criteria/;
            ELSEIF ((current_audit_control^.operation <> sfc$ao_job_process_command) AND
                  (current_audit_control^.selection_criteria [index].selector = sfc$as_command_source_set))
                  THEN
              CYCLE /process_selection_criteria/;
            ELSEIF ((current_audit_control^.operation IN
                  $sft$audited_operation_set[sfc$ao_fs_magnetic_tape_mount, sfc$ao_fs_load_fap]) AND
                  (current_audit_control^.selection_criteria [index].selector = sfc$as_catalog_owner_set))
                  THEN
              CYCLE /process_selection_criteria/;
            IFEND;

            display_line (criteria_column_start, criteria_column_width) :=
                  audit_selector_name [current_audit_control^.selection_criteria [index].selector];
            clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                  clc$trim, {ignore} status);
            display_line := ' ';
            CASE current_audit_control^.selection_criteria [index].selector OF
            = sfc$as_operation_result_set =
              IF sfc$or_successful IN current_audit_control^.selection_criteria [index].
                    operation_result_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      operation_result_name [sfc$or_successful];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF sfc$or_unsuccessful IN current_audit_control^.selection_criteria [index].
                    operation_result_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      operation_result_name [sfc$or_unsuccessful];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
            = sfc$as_command_source_set =
              IF sfc$cs_primary_command_file IN current_audit_control^.selection_criteria [index].
                    command_source_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      command_source_name [sfc$cs_primary_command_file];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF sfc$cs_secondary_command_file IN current_audit_control^.selection_criteria [index].
                    command_source_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      command_source_name [sfc$cs_secondary_command_file];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
            = sfc$as_access_mode_set =
              IF pfc$read IN current_audit_control^.selection_criteria [index].access_mode_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      access_mode_name [pfc$read];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF pfc$shorten IN current_audit_control^.selection_criteria [index].access_mode_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      access_mode_name [pfc$shorten];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF pfc$append IN current_audit_control^.selection_criteria [index].access_mode_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      access_mode_name [pfc$append];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF pfc$modify IN current_audit_control^.selection_criteria [index].access_mode_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      access_mode_name [pfc$modify];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF pfc$execute IN current_audit_control^.selection_criteria [index].access_mode_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      access_mode_name [pfc$execute];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
            = sfc$as_catalog_owner_set =
              IF sfc$co_owner IN current_audit_control^.selection_criteria [index].catalog_owner_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      catalog_owner_name [sfc$co_owner];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF sfc$co_non_owner IN current_audit_control^.selection_criteria [index].catalog_owner_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      catalog_owner_name [sfc$co_non_owner];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
              IF sfc$co_system IN current_audit_control^.selection_criteria [index].catalog_owner_set THEN
                display_line (subcriteria_column_start, subcriteria_column_width) :=
                      catalog_owner_name [sfc$co_system];
                clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)),
                      clc$trim, {ignore} status);
              IFEND;
            ELSE
            CASEND;
            display_line := ' ';
          FOREND /process_selection_criteria/;
          current_audit_control := current_audit_control^.forward;
        WHILEND;
      ELSE
        display_line := ' ';
        display_line (stat_name_column_start, stat_name_column_width) := statistic_name;
        IF pmc$security_log IN current_routing_control^.locked_logs THEN
          display_line (locked_column_start, locked_column_width) := 'Yes ';
        ELSE
          display_line (locked_column_start, locked_column_width) := 'No  ';
        IFEND;
        clp$put_display (display_control, display_line (1, clp$trimmed_string_size (display_line)), clc$trim,
              {ignore} status);
      IFEND;
      clp$put_display (display_control, ' ', clc$trim, {ignore} status);
      current_routing_control := current_routing_control^.forward;
    WHILEND;

    osp$disestablish_cond_handler;

    mmp$delete_scratch_segment (scratch_segment, status);
    IF NOT status.normal THEN
      clp$close_display (display_control, ignore_status);
    ELSE
      clp$close_display (display_control, status);
    IFEND;

  PROCEND sfp$_display_audited_operations;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_deactivate_validation_audi', EJECT ??

{ PURPOSE:
{   This procedure initiates the DEACTIVATE_VALIDATION_AUDITING subcommand.

  PROCEDURE sfp$_deactivate_validation_audi
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_deava) deactivate_validation_auditing, deava (
{   operation, operations, o: any of
{       list of key
{         (manage_field, mf)
{         (manage_security_password, mspw)
{         (manage_validation, mv)
{         (use_capability, uc)
{         (user_validation, uv)
{       keyend
{       key
{         all
{       keyend
{     anyend = all
{   status)

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 4] 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$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 10] of clt$keyword_specification,
          recend,
        recend,
        type_size_2: clt$type_specification_size,
        element_type_spec_2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 1] of clt$keyword_specification,
        recend,
        default_value: string (3),
      recend,
      type2: record
        header: clt$type_specification_header,
      recend,
    recend := [
    [1,
    [89, 4, 12, 17, 20, 20, 254],
    clc$command, 4, 2, 0, 0, 0, 0, 2, 'OSM$ADMSA_DEAVA'], [
    ['O                              ',clc$abbreviation_entry, 1],
    ['OPERATION                      ',clc$nominal_entry, 1],
    ['OPERATIONS                     ',clc$alias_entry, 1],
    ['STATUS                         ',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, 457,
  clc$optional_default_parameter, 0, 3],
{ PARAMETER 2
    [4, 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$list_type],
    FALSE, 2],
    393, [[1, 0, clc$list_type], [377, 1, clc$max_list_size, FALSE],
        [[1, 0, clc$keyword_type], [10], [
        ['MANAGE_FIELD                   ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['MANAGE_SECURITY_PASSWORD       ', clc$nominal_entry, clc$normal_usage_entry, 2],
        ['MANAGE_VALIDATION              ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['MF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['MSPW                           ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['MV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['UC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['USER_VALIDATION                ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['USE_CAPABILITY                 ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['UV                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5]]
        ]
      ],
    44, [[1, 0, clc$keyword_type], [1], [
      ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ]
    ,
    'all'],
{ PARAMETER 2
    [[1, 0, clc$status_type]]];

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

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

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

    VAR
      audited_operation_set: sft$audited_operation_set;

    status.normal := TRUE;

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

    get_val_audit_operation_set (pvt [p$operation].value, audited_operation_set);

    sfp$deactivate_audit (audited_operation_set, routing_control_table_id, status);

  PROCEND sfp$_deactivate_validation_audi;
?? OLDTITLE ??
?? NEWTITLE := 'sfp$_end_administer_security_au', EJECT ??

{ PURPOSE:
{   This is the command processor for the END_ADMINISTER_VALIDATIONS subcommand.

  PROCEDURE sfp$_end_administer_security_au
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$admsa_endasa) quit, end_administer_security_audit, endasa, qui

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
    recend := [
    [1,
    [89, 4, 12, 17, 35, 34, 904],
    clc$command, 0, 0, 0, 0, 0, 0, 0, 'OSM$ADMSA_ENDASA']];

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

    status.normal := TRUE;

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

    clp$end_include (avc$admsa_utility_name, status);

  PROCEND sfp$_end_administer_security_au;
?? OLDTITLE ??
?? OLDTITLE ??
MODEND sfm$security_audit_utility;
