?? NEWTITLE := 'NOS/VE Job Scheduling : administer_scheduling' ??
MODULE jmm$administer_scheduling;

{ PURPOSE:
{   This module contains the code for the ADMINISTER_SCHEDULING utility.
{   The subcommands of this utility are defined here with the exception
{   of the DISPLAY_PROFILE_SUMMARY and GENERATE_PROFILE commands.  The
{   sub utilities are also defined separately.  The ADMINISTER_SCHEDULING
{   utility is used to create and modify a description of a sites
{   scheduling called a scheduling profile.  This profile can then be
{   activated in a utility called MANAGE_ACTIVE_SCHEDULING.
{
{ DESIGN:
{   This module only contains the framework for the utility - basically just
{   the PDTs and Command Tables.

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc jmt$cpu_time_limit
*copyc jmt$job_priority
*copyc jmt$magnetic_tape_limit
*copyc jmt$sru_limit
*copyc jmt$working_set_size
?? POP ??
*copyc clp$begin_utility
*copyc clp$end_include
*copyc clp$end_utility
*copyc clp$evaluate_parameters
*copyc clp$include_file
*copyc jmp$add_object
*copyc jmp$build_default_profile
*copyc jmp$change_object
*copyc jmp$delete_object
*copyc jmp$get_attributes
*copyc jmp$get_object_list
*copyc jmp$read_profile
*copyc jmp$set_profile
*copyc jmp$write_profile

*copyc jmv$current_profile_level
*copyc jmv$new_profile
*copyc jmv$the_profile
*copyc jmv$utility_functions
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??

  CONST
    default_profile_file_name = '$USER.SCHEDULING_PROFILE';

  VAR
    result_file: ^fst$file_reference := NIL,
    command_file: amt$local_file_name := clc$current_command_input,
    utility_name: string (31) := 'ADMINISTER_SCHEDULING          ',
    utility_attributes: array [1 .. 3] of clt$utility_attribute :=
          [[clc$utility_command_table, * ], [clc$utility_function_proc_table, *
          ], [clc$utility_prompt, [2, 'AS']]];

{ table command_table
{ command (use_profile usep) jmp$_use_profile
{ command (change_list_option, change_list_options, chalo) ..
{   jmp$_change_list_option cm=xref
{ command (create_default_profile credp) jmp$_create_default_profile
{ command (write_profile wrip) jmp$_write_profile
{ command (create_job_category crejc crejca) jmp$_create_job_category
{ command (change_job_category chajc chajca) jmp$_change_job_category
{ command (delete_job_category deljc deljca) jmp$_delete_job_category
{ command (display_job_category display_job_categories disjc disjca) ..
{   jmp$_display_job_category cm=xref
{ command (create_job_priority crejp) jmp$_create_job_priority a=hidden
{ command (change_job_priority chajp) jmp$_change_job_priority a=hidden
{ command (delete_job_priority deljp) jmp$_delete_job_priority a=hidden
{ command (display_job_priority display_job_priorities disjp) ..
{   jmp$_display_job_priority cm=xref a=hidden
{ command (display_profile_summary disps) jmp$_display_profile_summary ..
{   cm=xref
{ command (generate_profile_definition genpd) ..
{   jmp$_generate_profile_definitio cm=xref
{ command (administer_controls admc) jmp$_administer_controls cm=xref
{ command (administer_application adma) jmp$_administer_application cm=xref
{ command (administer_job_class admjc) jmp$_administer_job_class  cm=xref
{ command (administer_service_class admsc) jmp$_administer_service_class ..
{   cm=xref
{ command (administer_output_class admoc) jmp$_administer_output_class ..
{   cm=xref a=hidden
{ command (quit qui) jmp$_quit
{ tablend

?? PUSH (LISTEXT := ON) ??

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

    command_table_entries: [STATIC, READ] array [1 .. 47] of
          clt$command_table_entry := [
          {} ['ADMA                           ', clc$abbreviation_entry,
          clc$normal_usage_entry, 16, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_application],
          {} ['ADMC                           ', clc$abbreviation_entry,
          clc$normal_usage_entry, 15, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_controls],
          {} ['ADMINISTER_APPLICATION         ', clc$nominal_entry,
          clc$normal_usage_entry, 16, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_application],
          {} ['ADMINISTER_CONTROLS            ', clc$nominal_entry,
          clc$normal_usage_entry, 15, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_controls],
          {} ['ADMINISTER_JOB_CLASS           ', clc$nominal_entry,
          clc$normal_usage_entry, 17, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_job_class],
          {} ['ADMINISTER_OUTPUT_CLASS        ', clc$nominal_entry,
          clc$hidden_entry, 19, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_output_class],
          {} ['ADMINISTER_SERVICE_CLASS       ', clc$nominal_entry,
          clc$normal_usage_entry, 18, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_service_class],
          {} ['ADMJC                          ', clc$abbreviation_entry,
          clc$normal_usage_entry, 17, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_job_class],
          {} ['ADMOC                          ', clc$abbreviation_entry,
          clc$hidden_entry, 19, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_output_class],
          {} ['ADMSC                          ', clc$abbreviation_entry,
          clc$normal_usage_entry, 18, clc$automatically_log, clc$linked_call,
          ^jmp$_administer_service_class],
          {} ['CHAJC                          ', clc$alias_entry,
          clc$normal_usage_entry, 6, clc$automatically_log, clc$linked_call,
          ^jmp$_change_job_category],
          {} ['CHAJCA                         ', clc$abbreviation_entry,
          clc$normal_usage_entry, 6, clc$automatically_log, clc$linked_call,
          ^jmp$_change_job_category],
          {} ['CHAJP                          ', clc$abbreviation_entry,
          clc$hidden_entry, 10, clc$automatically_log, clc$linked_call,
          ^jmp$_change_job_priority],
          {} ['CHALO                          ', clc$abbreviation_entry,
          clc$normal_usage_entry, 2, clc$automatically_log, clc$linked_call,
          ^jmp$_change_list_option],
          {} ['CHANGE_JOB_CATEGORY            ', clc$nominal_entry,
          clc$normal_usage_entry, 6, clc$automatically_log, clc$linked_call,
          ^jmp$_change_job_category],
          {} ['CHANGE_JOB_PRIORITY            ', clc$nominal_entry,
          clc$hidden_entry, 10, clc$automatically_log, clc$linked_call,
          ^jmp$_change_job_priority],
          {} ['CHANGE_LIST_OPTION             ', clc$nominal_entry,
          clc$normal_usage_entry, 2, clc$automatically_log, clc$linked_call,
          ^jmp$_change_list_option],
          {} ['CHANGE_LIST_OPTIONS            ', clc$alias_entry,
          clc$normal_usage_entry, 2, clc$automatically_log, clc$linked_call,
          ^jmp$_change_list_option],
          {} ['CREATE_DEFAULT_PROFILE         ', clc$nominal_entry,
          clc$normal_usage_entry, 3, clc$automatically_log, clc$linked_call,
          ^jmp$_create_default_profile],
          {} ['CREATE_JOB_CATEGORY            ', clc$nominal_entry,
          clc$normal_usage_entry, 5, clc$automatically_log, clc$linked_call,
          ^jmp$_create_job_category],
          {} ['CREATE_JOB_PRIORITY            ', clc$nominal_entry,
          clc$hidden_entry, 9, clc$automatically_log, clc$linked_call,
          ^jmp$_create_job_priority],
          {} ['CREDP                          ', clc$abbreviation_entry,
          clc$normal_usage_entry, 3, clc$automatically_log, clc$linked_call,
          ^jmp$_create_default_profile],
          {} ['CREJC                          ', clc$alias_entry,
          clc$normal_usage_entry, 5, clc$automatically_log, clc$linked_call,
          ^jmp$_create_job_category],
          {} ['CREJCA                         ', clc$abbreviation_entry,
          clc$normal_usage_entry, 5, clc$automatically_log, clc$linked_call,
          ^jmp$_create_job_category],
          {} ['CREJP                          ', clc$abbreviation_entry,
          clc$hidden_entry, 9, clc$automatically_log, clc$linked_call,
          ^jmp$_create_job_priority],
          {} ['DELETE_JOB_CATEGORY            ', clc$nominal_entry,
          clc$normal_usage_entry, 7, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_job_category],
          {} ['DELETE_JOB_PRIORITY            ', clc$nominal_entry,
          clc$hidden_entry, 11, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_job_priority],
          {} ['DELJC                          ', clc$alias_entry,
          clc$normal_usage_entry, 7, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_job_category],
          {} ['DELJCA                         ', clc$abbreviation_entry,
          clc$normal_usage_entry, 7, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_job_category],
          {} ['DELJP                          ', clc$abbreviation_entry,
          clc$hidden_entry, 11, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_job_priority],
          {} ['DISJC                          ', clc$alias_entry,
          clc$normal_usage_entry, 8, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_category],
          {} ['DISJCA                         ', clc$abbreviation_entry,
          clc$normal_usage_entry, 8, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_category],
          {} ['DISJP                          ', clc$abbreviation_entry,
          clc$hidden_entry, 12, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_priority],
          {} ['DISPLAY_JOB_CATEGORIES         ', clc$alias_entry,
          clc$normal_usage_entry, 8, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_category],
          {} ['DISPLAY_JOB_CATEGORY           ', clc$nominal_entry,
          clc$normal_usage_entry, 8, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_category],
          {} ['DISPLAY_JOB_PRIORITIES         ', clc$alias_entry,
          clc$hidden_entry, 12, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_priority],
          {} ['DISPLAY_JOB_PRIORITY           ', clc$nominal_entry,
          clc$hidden_entry, 12, clc$automatically_log, clc$linked_call,
          ^jmp$_display_job_priority],
          {} ['DISPLAY_PROFILE_SUMMARY        ', clc$nominal_entry,
          clc$normal_usage_entry, 13, clc$automatically_log, clc$linked_call,
          ^jmp$_display_profile_summary],
          {} ['DISPS                          ', clc$abbreviation_entry,
          clc$normal_usage_entry, 13, clc$automatically_log, clc$linked_call,
          ^jmp$_display_profile_summary],
          {} ['GENERATE_PROFILE_DEFINITION    ', clc$nominal_entry,
          clc$normal_usage_entry, 14, clc$automatically_log, clc$linked_call,
          ^jmp$_generate_profile_definitio],
          {} ['GENPD                          ', clc$abbreviation_entry,
          clc$normal_usage_entry, 14, clc$automatically_log, clc$linked_call,
          ^jmp$_generate_profile_definitio],
          {} ['QUI                            ', clc$abbreviation_entry,
          clc$normal_usage_entry, 20, clc$automatically_log, clc$linked_call,
          ^jmp$_quit],
          {} ['QUIT                           ', clc$nominal_entry,
          clc$normal_usage_entry, 20, clc$automatically_log, clc$linked_call,
          ^jmp$_quit],
          {} ['USEP                           ', clc$abbreviation_entry,
          clc$normal_usage_entry, 1, clc$automatically_log, clc$linked_call,
          ^jmp$_use_profile],
          {} ['USE_PROFILE                    ', clc$nominal_entry,
          clc$normal_usage_entry, 1, clc$automatically_log, clc$linked_call,
          ^jmp$_use_profile],
          {} ['WRIP                           ', clc$abbreviation_entry,
          clc$normal_usage_entry, 4, clc$automatically_log, clc$linked_call,
          ^jmp$_write_profile],
          {} ['WRITE_PROFILE                  ', clc$nominal_entry,
          clc$normal_usage_entry, 4, clc$automatically_log, clc$linked_call,
          ^jmp$_write_profile]];

  PROCEDURE [XREF] jmp$_administer_application
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_administer_controls
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_administer_job_class
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_administer_output_class
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_administer_service_class
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_change_list_option
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_display_job_category
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_display_job_priority
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_display_profile_summary
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] jmp$_generate_profile_definitio
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

?? POP ??
?? OLDTITLE ??
?? NEWTITLE := 'job_category commands', EJECT ??
?? NEWTITLE := 'get_category_attributes', EJECT ??

{ PURPOSE:
{   Common routine to get extract the name and attributes for a job category
{   from the command.  A common routine is used since the form of the command
{   between the create and change commands are identical.

  PROCEDURE get_category_attributes
    (    parameter_list: clt$parameter_list;
     VAR category_name: ^clt$data_value;
     VAR attributes: jmt$object_attribute;
     VAR status: ost$status);

{ PROCEDURE (osm$admjc_crejc) get_category_attributes (
{   category_name, cn: name = $required
{   cpu_time_limit, ctl: (by_name) range of any of
{       key unlimited keyend
{       integer jmc$lowest_cpu_time_limit..jmc$highest_cpu_time_limit
{     anyend = $optional
{   job_mode, jm: (by_name) list 1..1 of key
{       interactive, batch
{     keyend = $optional
{   job_qualifier, job_qualifiers, jq: (by_name) list of name = $optional
{   login_account, login_accounts, la: (by_name) list of name = $optional
{   login_family, login_families, lf: (by_name) list of name = $optional
{   login_project, login_projects, lp: (by_name) list of name = $optional
{   login_user, login_users, lu: (by_name) list of name = $optional
{   magnetic_tape_limit, mtl: (by_name) range of any of
{       key unlimited, unspecified keyend
{       integer jmc$lowest_magnetic_tape_limit..jmc$highest_magnetic_tape_limit
{     anyend = $optional
{   maximum_working_set, maxws: (by_name) range of any of
{       key unlimited keyend
{       integer jmc$lowest_working_set_size..jmc$highest_working_set_size
{     anyend = $optional
{   originating_application_name, originating_application_names, oan: ..
{       (by_name) list of name = $optional
{   sru_limit, sl: (by_name) range of any of
{       key unlimited keyend
{       integer jmc$lowest_sru_limit..jmc$highest_sru_limit
{     anyend = $optional
{   user_job_name, user_job_names, ujn: (by_name) list of name = $optional
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 34] of clt$pdt_parameter_name,
        parameters: array [1 .. 14] 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$range_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$union_type_qualifier,
            type_size_1: clt$type_specification_size,
            element_type_spec_1: record
              header: clt$type_specification_header,
              qualifier: clt$keyword_type_qualifier,
              keyword_specs: array [1 .. 1] of clt$keyword_specification,
            recend,
            type_size_2: clt$type_specification_size,
            element_type_spec_2: record
              header: clt$type_specification_header,
              qualifier: clt$integer_type_qualifier,
            recend,
          recend,
        recend,
        type3: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 2] of clt$keyword_specification,
          recend,
        recend,
        type4: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type5: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type6: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type7: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type8: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type9: record
          header: clt$type_specification_header,
          qualifier: clt$range_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$union_type_qualifier,
            type_size_1: clt$type_specification_size,
            element_type_spec_1: record
              header: clt$type_specification_header,
              qualifier: clt$keyword_type_qualifier,
              keyword_specs: array [1 .. 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$integer_type_qualifier,
            recend,
          recend,
        recend,
        type10: record
          header: clt$type_specification_header,
          qualifier: clt$range_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$union_type_qualifier,
            type_size_1: clt$type_specification_size,
            element_type_spec_1: record
              header: clt$type_specification_header,
              qualifier: clt$keyword_type_qualifier,
              keyword_specs: array [1 .. 1] of clt$keyword_specification,
            recend,
            type_size_2: clt$type_specification_size,
            element_type_spec_2: record
              header: clt$type_specification_header,
              qualifier: clt$integer_type_qualifier,
            recend,
          recend,
        recend,
        type11: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type12: record
          header: clt$type_specification_header,
          qualifier: clt$range_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$union_type_qualifier,
            type_size_1: clt$type_specification_size,
            element_type_spec_1: record
              header: clt$type_specification_header,
              qualifier: clt$keyword_type_qualifier,
              keyword_specs: array [1 .. 1] of clt$keyword_specification,
            recend,
            type_size_2: clt$type_specification_size,
            element_type_spec_2: record
              header: clt$type_specification_header,
              qualifier: clt$integer_type_qualifier,
            recend,
          recend,
        recend,
        type13: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type14: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 47, 46, 358], clc$command, 34, 14, 1, 0,
            0, 0, 14, 'OSM$ADMJC_CREJC'], [['CATEGORY_NAME                  ',
            clc$nominal_entry, 1], ['CN                             ',
            clc$abbreviation_entry, 1], ['CPU_TIME_LIMIT                 ',
            clc$nominal_entry, 2], ['CTL                            ',
            clc$abbreviation_entry, 2], ['JM                             ',
            clc$abbreviation_entry, 3], ['JOB_MODE                       ',
            clc$nominal_entry, 3], ['JOB_QUALIFIER                  ',
            clc$nominal_entry, 4], ['JOB_QUALIFIERS                 ',
            clc$alias_entry, 4], ['JQ                             ',
            clc$abbreviation_entry, 4], ['LA                             ',
            clc$abbreviation_entry, 5], ['LF                             ',
            clc$abbreviation_entry, 6], ['LOGIN_ACCOUNT                  ',
            clc$nominal_entry, 5], ['LOGIN_ACCOUNTS                 ',
            clc$alias_entry, 5], ['LOGIN_FAMILIES                 ',
            clc$alias_entry, 6], ['LOGIN_FAMILY                   ',
            clc$nominal_entry, 6], ['LOGIN_PROJECT                  ',
            clc$nominal_entry, 7], ['LOGIN_PROJECTS                 ',
            clc$alias_entry, 7], ['LOGIN_USER                     ',
            clc$nominal_entry, 8], ['LOGIN_USERS                    ',
            clc$alias_entry, 8], ['LP                             ',
            clc$abbreviation_entry, 7], ['LU                             ',
            clc$abbreviation_entry, 8], ['MAGNETIC_TAPE_LIMIT            ',
            clc$nominal_entry, 9], ['MAXIMUM_WORKING_SET            ',
            clc$nominal_entry, 10], ['MAXWS                          ',
            clc$abbreviation_entry, 10], ['MTL                            ',
            clc$abbreviation_entry, 9], ['OAN                            ',
            clc$abbreviation_entry, 11], ['ORIGINATING_APPLICATION_NAME   ',
            clc$nominal_entry, 11], ['ORIGINATING_APPLICATION_NAMES  ',
            clc$alias_entry, 11], ['SL                             ',
            clc$abbreviation_entry, 12], ['SRU_LIMIT                      ',
            clc$nominal_entry, 12], ['STATUS                         ',
            clc$nominal_entry, 14], ['UJN                            ',
            clc$abbreviation_entry, 13], ['USER_JOB_NAME                  ',
            clc$nominal_entry, 13], ['USER_JOB_NAMES                 ',
            clc$alias_entry, 13]], [

{ PARAMETER 1

      [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, 5,
            clc$required_parameter, 0, 0],

{ PARAMETER 2

      [3, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 91, clc$optional_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_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 97, clc$optional_parameter, 0, 0],

{ PARAMETER 4

      [7, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 5

      [12, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 6

      [15, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 7

      [16, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 8

      [18, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 9

      [22, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 128, clc$optional_parameter, 0,
            0],

{ PARAMETER 10

      [23, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 91, clc$optional_parameter, 0, 0],

{ PARAMETER 11

      [27, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 12

      [30, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 91, clc$optional_parameter, 0, 0],

{ PARAMETER 13

      [33, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_value, clc$immediate_evaluation,
            clc$standard_parameter_checking, 21, clc$optional_parameter, 0, 0],

{ PARAMETER 14

      [31, 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$range_type], [84], [[1, 0, clc$union_type],
            [[clc$integer_type, clc$keyword_type], FALSE, 2], 44,
            [[1, 0, clc$keyword_type], [1], [['UNLIMITED                      '
            , clc$nominal_entry, clc$normal_usage_entry, 1]]], 20,
            [[1, 0, clc$integer_type], [jmc$lowest_cpu_time_limit,
            jmc$highest_cpu_time_limit, 10]]]],

{ PARAMETER 3

      [[1, 0, clc$list_type], [81, 1, 1, FALSE],
            [[1, 0, clc$keyword_type], [2], [['BATCH                          '
            , clc$nominal_entry, clc$normal_usage_entry, 2],
            ['INTERACTIVE                    ', clc$nominal_entry,
            clc$normal_usage_entry, 1]]]],

{ PARAMETER 4

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 5

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 6

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 7

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 8

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 9

      [[1, 0, clc$range_type], [121], [[1, 0, clc$union_type],
            [[clc$integer_type, clc$keyword_type], FALSE, 2], 81,
            [[1, 0, clc$keyword_type], [2], [['UNLIMITED                      '
            , clc$nominal_entry, clc$normal_usage_entry, 1],
            ['UNSPECIFIED                    ', clc$nominal_entry,
            clc$normal_usage_entry, 2]]], 20,
            [[1, 0, clc$integer_type], [jmc$lowest_magnetic_tape_limit,
            jmc$highest_magnetic_tape_limit, 10]]]],

{ PARAMETER 10

      [[1, 0, clc$range_type], [84], [[1, 0, clc$union_type],
            [[clc$integer_type, clc$keyword_type], FALSE, 2], 44,
            [[1, 0, clc$keyword_type], [1], [['UNLIMITED                      '
            , clc$nominal_entry, clc$normal_usage_entry, 1]]], 20,
            [[1, 0, clc$integer_type], [jmc$lowest_working_set_size,
            jmc$highest_working_set_size, 10]]]],

{ PARAMETER 11

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 12

      [[1, 0, clc$range_type], [84], [[1, 0, clc$union_type],
            [[clc$integer_type, clc$keyword_type], FALSE, 2], 44,
            [[1, 0, clc$keyword_type], [1], [['UNLIMITED                      '
            , clc$nominal_entry, clc$normal_usage_entry, 1]]], 20,
            [[1, 0, clc$integer_type], [jmc$lowest_sru_limit,
            jmc$highest_sru_limit, 10]]]],

{ PARAMETER 13

      [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 14

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

?? POP ??

    CONST
      p$category_name = 1,
      p$cpu_time_limit = 2,
      p$job_mode = 3,
      p$job_qualifier = 4,
      p$login_account = 5,
      p$login_family = 6,
      p$login_project = 7,
      p$login_user = 8,
      p$magnetic_tape_limit = 9,
      p$maximum_working_set = 10,
      p$originating_application_name = 11,
      p$sru_limit = 12,
      p$user_job_name = 13,
      p$status = 14;

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

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF status.normal THEN
      jmp$get_attributes (jmc$profile_category, #SEQ (pdt), ^pvt, attributes,
            status);
      category_name := pvt [p$category_name].value;
    IFEND;

  PROCEND get_category_attributes;

?? TITLE := 'jmp$_change_job_category', EJECT ??

{ PURPOSE:
{   Process the CHANGE_JOB_CATEGORY command.
{
{ DESIGN:
{   Determines the job categories to update, fetches the attribute values
{   and updates the job categories by replacing their existing attribute
{   values with these new ones.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS.

  PROCEDURE jmp$_change_job_category
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

    VAR
      the_category: ^clt$data_value,
      the_attributes: jmt$object_attribute;

    status.normal := TRUE;

    jmv$current_profile_level := jmc$profile_category;

    get_category_attributes (parameter_list, the_category, the_attributes,
          status);
    IF status.normal THEN
      jmp$change_object (jmc$profile_category, the_category^, the_attributes,
            jmc$replace, status);
    IFEND;

  PROCEND jmp$_change_job_category;
?? TITLE := 'jmp$_create_job_category', EJECT ??

{ PURPOSE:
{   Process the CREATE_JOB_CATEGORY command.
{
{ DESIGN:
{   Fetches the parameter values from the command and adds the specified
{   job category to the profile.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS.
{   Unlike the other create commands, this command can create a job category
{   with the same name as one that already exists.

  PROCEDURE jmp$_create_job_category
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

    VAR
      new_category: jmt$profile_object_reference,
      the_category: ^clt$data_value,
      the_attributes: jmt$object_attribute;

    status.normal := TRUE;

    jmv$current_profile_level := jmc$profile_category;

    get_category_attributes (parameter_list, the_category, the_attributes,
          status);
    IF status.normal THEN
      jmp$add_object (jmc$profile_category, the_category^.name_value,
            the_attributes, new_category, status);
    IFEND;

  PROCEND jmp$_create_job_category;
?? TITLE := 'jmp$_delete_job_category', EJECT ??

{ PURPOSE:
{   Processes the DELETE_JOB_CATEGORY command.
{
{ DESIGN:
{   Determine the job categories to delete and delete them.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS

  PROCEDURE jmp$_delete_job_category
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_deljc) delete_job_category (
{   category_name, cn: any of
{       key all keyend
{       list of name
{     anyend = $required
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 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$keyword_type_qualifier,
            keyword_specs: array [1 .. 1] 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,
            element_type_spec: record
              header: clt$type_specification_header,
              qualifier: clt$name_type_qualifier,
            recend,
          recend,
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 10, 5, 16, 39, 47, 987], clc$command, 3, 2, 1, 0, 0,
            0, 2, 'OSM$ADMS_DELJC'], [['CATEGORY_NAME                  ',
            clc$nominal_entry, 1], ['CN                             ',
            clc$abbreviation_entry, 1], ['STATUS                         ',
            clc$nominal_entry, 2]], [

{ PARAMETER 1

      [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, 85,
            clc$required_parameter, 0, 0],

{ 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$union_type], [[clc$keyword_type, clc$list_type], FALSE, 2],
            44, [[1, 0, clc$keyword_type], [1],
            [['ALL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 1]]], 21,
            [[1, 0, clc$list_type], [5, 1, clc$max_list_size, FALSE],
            [[1, 0, clc$name_type], [1, osc$max_name_size]]]],

{ PARAMETER 2

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

?? POP ??

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

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

    status.normal := TRUE;

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

    jmp$delete_object (jmc$profile_category, pvt [p$category_name].value^,
          status);

  PROCEND jmp$_delete_job_category;
?? OLDTITLE ??
?? TITLE := 'job_priority commands', EJECT ??
?? NEWTITLE := 'get_priority_attributes', EJECT ??

{ PURPOSE:
{   Common routine to get extract the name and attributes for a job priority
{   from the command.  A common routine is used since the form of the command
{   between the create and change commands are identical.

  PROCEDURE get_priority_attributes
    (    parameter_list: clt$parameter_list;
     VAR priority_name: ^clt$data_value;
     VAR attributes: jmt$object_attribute;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_crejp) get_priority_attributes (
{   priority_name, pn: name = $required
{   dispatching_bias, db: (by_name) integer -9..9 = 0
{   initiation_bias, ib: (by_name) integer ..
{       -jmc$highest_job_priority..jmc$highest_job_priority = 0
{   output_bias, ob: (by_name) integer ..
{       -jmc$highest_job_priority..jmc$highest_job_priority = 0
{   scheduling_bias, sb: (by_name) integer ..
{       -jmc$highest_job_priority..jmc$highest_job_priority = 0
{   timeslice_bias, tb: (by_name) integer -10000000..10000000 = 0
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 13] of clt$pdt_parameter_name,
        parameters: array [1 .. 7] 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$integer_type_qualifier,
          default_value: string (1),
        recend,
        type3: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
          default_value: string (1),
        recend,
        type4: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
          default_value: string (1),
        recend,
        type5: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
          default_value: string (1),
        recend,
        type6: record
          header: clt$type_specification_header,
          qualifier: clt$integer_type_qualifier,
          default_value: string (1),
        recend,
        type7: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 11, 22, 13, 518], clc$command, 13, 7, 1, 0, 0,
            0, 7, 'OSM$ADMS_CREJP'], [['DB                             ',
            clc$abbreviation_entry, 2], ['DISPATCHING_BIAS               ',
            clc$nominal_entry, 2], ['IB                             ',
            clc$abbreviation_entry, 3], ['INITIATION_BIAS                ',
            clc$nominal_entry, 3], ['OB                             ',
            clc$abbreviation_entry, 4], ['OUTPUT_BIAS                    ',
            clc$nominal_entry, 4], ['PN                             ',
            clc$abbreviation_entry, 1], ['PRIORITY_NAME                  ',
            clc$nominal_entry, 1], ['SB                             ',
            clc$abbreviation_entry, 5], ['SCHEDULING_BIAS                ',
            clc$nominal_entry, 5], ['STATUS                         ',
            clc$nominal_entry, 7], ['TB                             ',
            clc$abbreviation_entry, 6], ['TIMESLICE_BIAS                 ',
            clc$nominal_entry, 6]], [

{ PARAMETER 1

      [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, 5,
            clc$required_parameter, 0, 0],

{ PARAMETER 2

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

{ PARAMETER 3

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

{ PARAMETER 4

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

{ PARAMETER 5

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

{ PARAMETER 6

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

{ PARAMETER 7

      [11, 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$integer_type], [-9, 9, 10], '0'],

{ PARAMETER 3

      [[1, 0, clc$integer_type], [-jmc$highest_job_priority,
            jmc$highest_job_priority, 10], '0'],

{ PARAMETER 4

      [[1, 0, clc$integer_type], [-jmc$highest_job_priority,
            jmc$highest_job_priority, 10], '0'],

{ PARAMETER 5

      [[1, 0, clc$integer_type], [-jmc$highest_job_priority,
            jmc$highest_job_priority, 10], '0'],

{ PARAMETER 6

      [[1, 0, clc$integer_type], [-10000000, 10000000, 10], '0'],

{ PARAMETER 7

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

?? POP ??

    CONST
      p$priority_name = 1,
      p$dispatching_bias = 2,
      p$initiation_bias = 3,
      p$output_bias = 4,
      p$scheduling_bias = 5,
      p$timeslice_bias = 6,
      p$status = 7;

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

    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF status.normal THEN
      jmp$get_attributes (jmc$profile_priority, #SEQ (pdt), ^pvt, attributes,
            status);
      priority_name := pvt [p$priority_name].value;
    IFEND;

  PROCEND get_priority_attributes;
?? NEWTITLE := 'jmp$_change_job_priority', EJECT ??

{ PURPOSE:
{   Process the CHANGE_JOB_PRIORITY command.
{
{ DESIGN:
{   Determines the job priorities to update, fetches the attribute values
{   and updates the job priorities by replacing their existing attribute
{   values with these new ones.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS.

  PROCEDURE jmp$_change_job_priority
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

    VAR
      the_attributes: jmt$object_attribute,
      the_priority: ^clt$data_value;

    status.normal := TRUE;

    get_priority_attributes (parameter_list, the_priority, the_attributes,
          status);
    IF status.normal THEN
      jmp$change_object (jmc$profile_priority, the_priority^, the_attributes,
            jmc$replace, status);
    IFEND;

  PROCEND jmp$_change_job_priority;
?? TITLE := 'jmp$_create_job_priority', EJECT ??

{ PURPOSE:
{   Process the CREATE_JOB_PRIORITY command.
{
{ DESIGN:
{   Fetches the parameter values from the command and adds the specified
{   job priority to the profile.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS.

  PROCEDURE jmp$_create_job_priority
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

    VAR
      new_priority: jmt$profile_object_reference,
      the_attributes: jmt$object_attribute,
      the_priority: ^clt$data_value;

    status.normal := TRUE;

    jmv$current_profile_level := jmc$profile_priority;

    get_priority_attributes (parameter_list, the_priority, the_attributes,
          status);
    IF status.normal THEN
      jmp$add_object (jmc$profile_priority, the_priority^.name_value,
            the_attributes, new_priority, status);
    IFEND;

  PROCEND jmp$_create_job_priority;
?? TITLE := 'jmp$_delete_job_priority', EJECT ??

{ PURPOSE:
{   Processes the DELETE_JOB_PRIORITY command.
{
{ DESIGN:
{   Determine the job priorities to delete and delete them.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS

  PROCEDURE jmp$_delete_job_priority
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_deljp) delete_job_priority (
{   priority_name, pn: name = $required
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 49, 58, 199], clc$command, 3, 2, 1, 0, 0,
            0, 2, 'OSM$ADMS_DELJP'], [['PN                             ',
            clc$abbreviation_entry, 1], ['PRIORITY_NAME                  ',
            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, 5,
            clc$required_parameter, 0, 0],

{ 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$name_type], [1, osc$max_name_size]],

{ PARAMETER 2

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

?? POP ??

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

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

    status.normal := TRUE;

    jmv$current_profile_level := jmc$profile_priority;
    clp$evaluate_parameters (parameter_list, #SEQ (pdt), NIL, ^pvt, status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

    jmp$delete_object (jmc$profile_priority, pvt [p$priority_name].value^,
          status);

  PROCEND jmp$_delete_job_priority;
?? OLDTITLE ??
?? TITLE := 'jmp$_create_default_profile', EJECT ??

{ PURPOSE:
{   Process the CREATE_DEFAULT_PROFILE command which creates the standard
{   scheduling profile.
{
{ DESIGN:
{   Set the result file based on the RESULT parameter and re-create the
{   default profile.
{
{ NOTES:
{   See JMM$ADMINISTER_DEFINITIONS.

  PROCEDURE jmp$_create_default_profile
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_credp) create_default_profile (
{   result, r: file = $user.scheduling_profile.$next
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          default_value: string (30),
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 50, 20, 771], clc$command, 3, 2, 0, 0, 0,
            0, 2, 'OSM$ADMS_CREDP'], [['R                              ',
            clc$abbreviation_entry, 1], ['RESULT                         ',
            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, 30],

{ 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], '$user.scheduling_profile.$next'],

{ PARAMETER 2

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

?? POP ??

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

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

    status.normal := TRUE;

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

    jmp$build_default_profile (status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

    set_result_file (pvt [p$result].value^.file_value^);

  PROCEND jmp$_create_default_profile;
?? TITLE := 'jmp$_quit ', EJECT ??

{ PURPOSE:
{   Exits the command utility.
{
{ DESIGN:
{   Terminates the commmand utility.

  PROCEDURE jmp$_quit
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_qui) quit (
{   save_change, sc: boolean = true
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          default_value: string (4),
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 50, 43, 416], clc$command, 3, 2, 0, 0, 0,
            0, 2, 'OSM$ADMS_QUI'], [['SAVE_CHANGE                    ',
            clc$nominal_entry, 1], ['SC                             ',
            clc$abbreviation_entry, 1], ['STATUS                         ',
            clc$nominal_entry, 2]], [

{ PARAMETER 1

      [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, 3,
            clc$optional_default_parameter, 0, 4],

{ 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$boolean_type], 'true'],

{ PARAMETER 2

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

?? POP ??

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

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

    status.normal := TRUE;

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

    IF pvt [p$save_change].value^.boolean_value.value THEN
      jmp$write_profile (result_file^, jmv$the_profile, status);
      IF NOT status.normal THEN
        RETURN
      IFEND;
    IFEND;

    clp$end_include (utility_name, status);

  PROCEND jmp$_quit;
?? TITLE := 'set_result_file', EJECT ??

{ PURPOSE:
{   Saves the result file name for later use by the utility.
{
{ DESIGN:
{   Allocate space for the file name and save it.

  PROCEDURE set_result_file
    (    file_name: fst$file_reference);

    IF result_file <> NIL THEN
      FREE result_file;
    IFEND;
    ALLOCATE result_file: [STRLENGTH (file_name)];
    result_file^ := file_name;

  PROCEND set_result_file;

?? TITLE := 'jmp$_use_profile', EJECT ??

{ PURPOSE:
{   Process the USE_PROFILE command which defines the profile file to
{   be used within the utility.
{
{ DESIGN:
{   Get the file name.  Attempt to read the file.  If successful then
{   make it the working profile and define the result file name to
{   the input file name + '.$next' if otherwise not specified.
{
{ NOTES:
{   See JMM$ADMINISTER_PROFILE.

  PROCEDURE jmp$_use_profile
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_usep) use_profile (
{   base, b: file = $user.scheduling_profile
{   result, r: file = $optional
{   status)

?? PUSH (LISTEXT := ON) ??

    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,
          default_value: string (24),
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
        type3: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 51, 2, 904], clc$command, 5, 3, 0, 0, 0,
            0, 3, 'OSM$ADMS_USEP'], [['B                              ',
            clc$abbreviation_entry, 1], ['BASE                           ',
            clc$nominal_entry, 1], ['R                              ',
            clc$abbreviation_entry, 2], ['RESULT                         ',
            clc$nominal_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$optional_default_parameter, 0, 24],

{ 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, 3,
            clc$optional_parameter, 0, 0],

{ PARAMETER 3

      [5, 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], '$user.scheduling_profile'],

{ PARAMETER 2

      [[1, 0, clc$file_type]],

{ PARAMETER 3

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

?? POP ??

    CONST
      p$base = 1,
      p$result = 2,
      p$status = 3;

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

    VAR
      base_file: ^fst$file_reference,
      size: integer;

    status.normal := TRUE;

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

    base_file := pvt [p$base].value^.file_value;

    IF pvt [p$result].specified THEN
      set_result_file (pvt [p$result].value^.file_value^);
      result_file^ := pvt [p$result].value^.file_value^;
    ELSE
      FREE result_file;
      size := STRLENGTH (base_file^);
      ALLOCATE result_file: [size + 6];
      result_file^ := base_file^;
      result_file^ (size + 1, 6) := '.$next';
    IFEND;

    IF base_file^ <> '$NULL' THEN
      jmp$read_profile (base_file^, jmv$new_profile, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      jmp$set_profile (jmv$new_profile);
    IFEND;

  PROCEND jmp$_use_profile;
?? TITLE := 'jmp$_write_profile', EJECT ??

{ PURPOSE:
{   Process the WRITE_PROFILE command.
{
{ DESIGN:
{   Write the working profile data to the specified file.
{
{ NOTES:
{   See JMM$ADMINISTER_PROFILE.

  PROCEDURE jmp$_write_profile
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms_wrip) write_profile (
{   result, r: file = $optional
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 3] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 51, 28, 909], clc$command, 3, 2, 0, 0, 0,
            0, 2, 'OSM$ADMS_WRIP'], [['R                              ',
            clc$abbreviation_entry, 1], ['RESULT                         ',
            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_parameter, 0, 0],

{ 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]],

{ PARAMETER 2

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

?? POP ??

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

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

    status.normal := TRUE;

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

    IF pvt [p$result].specified THEN
      jmp$write_profile (pvt [p$result].value^.file_value^, jmv$the_profile,
            status);
    ELSE
      jmp$write_profile (result_file^, jmv$the_profile, status);
    IFEND;

  PROCEND jmp$_write_profile;
?? TITLE := '[XDCL] jmp$_administer_scheduling', EJECT ??

{ PURPOSE:
{   Starts the ADMINISTER_SCHEDULING command utility.
{
{ DESIGN:
{   Pass the command table to command_language.

  PROCEDURE [XDCL] jmp$_administer_scheduling
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

{ PROCEDURE (osm$adms) administer_scheduling (
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 23, 11, 45, 58, 617], clc$command, 1, 1, 0, 0, 0,
            0, 1, 'OSM$ADMS'], [['STATUS                         ',
            clc$nominal_entry, 1]], [

{ PARAMETER 1

      [1, 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$status_type]]];

?? POP ??

    CONST
      p$status = 1;

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

    CONST
      result_file_name = default_profile_file_name CAT '.$next';

    VAR
      profile_status: ost$status;

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

    jmp$build_default_profile (status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

    set_result_file (default_profile_file_name CAT '.$next');

    jmp$read_profile (default_profile_file_name, jmv$new_profile,
          profile_status);
    IF profile_status.normal THEN
      jmp$set_profile (jmv$new_profile);
    IFEND;

    utility_attributes [1].command_table := command_table;
    utility_attributes [2].function_processor_table := jmv$utility_functions;
    clp$begin_utility (utility_name, utility_attributes, status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

    clp$include_file (command_file, '', utility_name, status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

    clp$end_utility (utility_name, status);

  PROCEND jmp$_administer_scheduling;
MODEND jmm$administer_scheduling;
