?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Job Management : Job Class Commands' ??
MODULE jmm$job_class_commands;

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clt$file
*copyc clt$value
*copyc CLE$ECC_MISCELLANEOUS
*copyc oss$job_paged_literal
*copyc jmc$job_management_id
*copyc JME$JOB_SCHEDULER_CONDITIONS
*copyc CLE$ECC_PARAMETER_LIST
*copyc jmt$dispatching_priority
*copyc jmt$job_class
*copyc jmt$job_class_set
*copyc jmt$job_counts
*copyc JMC$MAXIMUM_CONSTANTS
*copyc OST$STATUS
?? POP ??

*copyc CLP$SCAN_PARAMETER_LIST
*copyc CLP$GET_VALUE
*copyc CLP$SCAN_PARAMETER_LIST
*copyc jmp$determine_job_class
*copyc jmp$set_job_class_limits
*copyc osp$set_status_abnormal
*copyc osp$verify_system_privilege
?? TITLE := 'Global Declarations Declared by This Module', EJECT ??

  VAR
    priority_table: [STATIC, READ, oss$job_paged_literal] array [1 .. 15] of record
      dispatching_priority: jmt$dispatching_priority,
      name: string (7),
    recend := [[jmc$null_dispatching_priority, 'DEFAULT'], [jmc$priority_p1, 'P1     '],
          [jmc$priority_p2, 'P2     '], [jmc$priority_p3, 'P3     '], [jmc$priority_p4, 'P4     '],
          [jmc$priority_p5, 'P5     '], [jmc$priority_p6, 'P6     '], [jmc$priority_p7, 'P7     '],
          [jmc$priority_p8, 'P8     '], [jmc$priority_p9, 'P9     '], [jmc$priority_p10, 'P10    '],
          [jmc$priority_p11, 'P11    '], [jmc$priority_p12, 'P12    '], [jmc$priority_p13, 'P13    '],
          [jmc$priority_p14, 'P14    ']];


?? TITLE := '    CLP$SET_JOB_CLASS_LIMIT_COMMAND', EJECT ??

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

{  PDT set_job_class_limits_pdt (
{        job_class, jc : LIST OF NAME = all
{        number, n : INTEGER 0 .. jmc$maximum_job_count = 0
{        status)

?? PUSH (LISTEXT := ON) ??

    VAR
      set_job_class_limits_pdt: [STATIC, READ, cls$pdt] clt$parameter_descriptor_table :=
            [^set_job_class_limits_pdt_names, ^set_job_class_limits_pdt_params];

    VAR
      set_job_class_limits_pdt_names: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 5] of
            clt$parameter_name_descriptor := [['JOB_CLASS', 1], ['JC', 1], ['NUMBER', 2], ['N', 2],
            ['STATUS', 3]];

    VAR
      set_job_class_limits_pdt_params: [STATIC, READ, cls$pdt_parameters] array [1 .. 3] of
            clt$parameter_descriptor := [

{ JOB_CLASS JC }
      [[clc$optional_with_default, ^set_job_class_limits_pdt_dv1], 1, clc$max_value_sets, 1, 1,
            clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ NUMBER N }
      [[clc$optional_with_default, ^set_job_class_limits_pdt_dv2], 1, 1, 1, 1,
            clc$value_range_not_allowed, [NIL, clc$integer_value, 0, jmc$maximum_job_count]],

{ STATUS }
      [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed,
            [NIL, clc$variable_reference, clc$array_not_allowed, clc$status_value]]];

    VAR
      set_job_class_limits_pdt_dv1: [STATIC, READ, cls$pdt_names_and_defaults] string (3) := 'all';

    VAR
      set_job_class_limits_pdt_dv2: [STATIC, READ, cls$pdt_names_and_defaults] string (1) := '0';

?? POP ??

    VAR
      selected_job_class: jmt$job_class_set,
      job_class: jmt$job_class,
      max_jobs: 0 .. jmc$max_ijl_ord,
      value: clt$value;

    clp$scan_parameter_list (parameter_list, set_job_class_limits_pdt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    clp$get_value ('JOB_CLASS', 1, 1, clc$low, value, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    IF value.name.value = 'ALL' THEN
      selected_job_class := (-$jmt$job_class_set []) - $jmt$job_class_set [jmc$system_job_class];
    ELSE
      jmp$determine_job_class (value.name.value, job_class, status);
      IF NOT status.normal THEN
        RETURN;
      IFEND;
      selected_job_class := $jmt$job_class_set [job_class];
    IFEND;

    clp$get_value ('NUMBER', 1, 1, clc$low, value, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    max_jobs := value.int.value;
    jmp$set_job_class_limits (selected_job_class, max_jobs, status);

  PROCEND clp$set_job_class_limit_command;
?? TITLE := '[XDCL] jmp$change_class_attr_cmnd', EJECT ??

{ PURPOSE:
{   The purpose of this request is to change the attributes of the job and
{   serrvice class tables.
{ NOTES:
{   This request is retained for compatibility.  It is replaced functionally by
{   commands under the ADMINISTER_SCHEDULING and MANAGE_ACTIVE_SCHEDULING utilities.

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

{ PDT chaca_pdt (
{ class_name, cn: LIST OF NAME = all
{ name, n: NAME
{ abbreviation, a: NAME
{ prolog, p: STRING
{ epilog, e: STRING
{ mode, m: KEY all, batch, b, interactive, i
{ immediate_initiation_candidate, iic: BOOLEAN
{ page_aging_interval, pai: LIST 1..2 RANGE OF INTEGER 1000..3600000000
{ cyclic_aging_interval, cai: LIST 1..2 RANGE OF INTEGER 1000..3600000000
{ min_working_set, minws: LIST 1..2 RANGE OF INTEGER 20..65535
{ max_working_set, maxws: LIST 1..2 RANGE OF INTEGER 20..65535
{ dispatching_control, dc: LIST 1..5, 4 OF ANY
{ dispatching_priority, dp : LIST 1..2 RANGE OF NAME
{ dispatching_timeslice, dt, dispatching_timeslice_time, dtt: LIST 2 OF INTEGER 1000..10000000
{ detached_job_wait_time, djwt: LIST 1..2 RANGE OF INTEGER 0..65535
{ cpu_time_limit, ctl: INTEGER 1000000..0ffffffffff(16)
{ low_priority,lp: INTEGER 0..16000000
{ high_priority,hp: INTEGER 0..16000000
{ initial_priority,ip: INTEGER 0..16000000
{ max_initiated_jobs,maxij: INTEGER 0..jmc$max_ijl_ord
{ max_active_jobs,maxaj: INTEGER 0..100
{ initial_working_set,iws: INTEGER 0..65535
{ memory_resource_bias,mrb: INTEGER 0..100
{ cpu_resource_bias,crb: INTEGER 0..100
{ io_resource_bias,irb: INTEGER 0..100
{ residence_resource_bias,rrb: INTEGER 0..100
{ initial_slope,is: INTEGER -10000..10000
{ initial_b,ib: INTEGER 0..10000
{ mid_slope,ms: INTEGER -10000..10000
{ mid_b,mb: INTEGER 0..10000
{ final_slope,fs: INTEGER -10000..10000
{ final_b,fb: INTEGER 0..10000
{ initial_job_phase,ijp: INTEGER 0..0ffffffffffff(16)
{ mid_job_phase,mjp: INTEGER 0..0ffffffffffff(16)
{ final_job_phase,fjp: INTEGER 0..0ffffffffffff(16)
{ class_switch_threshold,cst: INTEGER 0..0ffffffffffff(16)
{ next_class,nc: NAME
{ priority_bias,pb: INTEGER 0..10000
{ guaranteed_service,gs: INTEGER 0..0ffffffffffff(16)
{ input_age_factor,iaf: INTEGER 0..16000000
{ swap_age_factor,saf: INTEGER 0..16000000
{ swapped_priority_increment,spi: INTEGER 0..16000000
{ swapin_increment,si: INTEGER 0..16000000
{ STATUS)

?? PUSH (LISTEXT := ON) ??

  VAR
    chaca_pdt: [STATIC, READ, cls$pdt] clt$parameter_descriptor_table := [^chaca_pdt_names, ^chaca_pdt_params
      ];

  VAR
    chaca_pdt_names: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 89] of
      clt$parameter_name_descriptor := [['CLASS_NAME', 1], ['CN', 1], ['NAME', 2], ['N', 2], ['ABBREVIATION',
      3], ['A', 3], ['PROLOG', 4], ['P', 4], ['EPILOG', 5], ['E', 5], ['MODE', 6], ['M', 6], [
      'IMMEDIATE_INITIATION_CANDIDATE', 7], ['IIC', 7], ['PAGE_AGING_INTERVAL', 8], ['PAI', 8], [
      'CYCLIC_AGING_INTERVAL', 9], ['CAI', 9], ['MIN_WORKING_SET', 10], ['MINWS', 10], ['MAX_WORKING_SET', 11]
      , ['MAXWS', 11], ['DISPATCHING_CONTROL', 12], ['DC', 12], ['DISPATCHING_PRIORITY', 13], ['DP', 13], [
      'DISPATCHING_TIMESLICE', 14], ['DT', 14], ['DISPATCHING_TIMESLICE_TIME', 14], ['DTT', 14], [
      'DETACHED_JOB_WAIT_TIME', 15], ['DJWT', 15], ['CPU_TIME_LIMIT', 16], ['CTL', 16], ['LOW_PRIORITY', 17],
      ['LP', 17], ['HIGH_PRIORITY', 18], ['HP', 18], ['INITIAL_PRIORITY', 19], ['IP', 19], [
      'MAX_INITIATED_JOBS', 20], ['MAXIJ', 20], ['MAX_ACTIVE_JOBS', 21], ['MAXAJ', 21], ['INITIAL_WORKING_SET'
      , 22], ['IWS', 22], ['MEMORY_RESOURCE_BIAS', 23], ['MRB', 23], ['CPU_RESOURCE_BIAS', 24], ['CRB', 24], [
      'IO_RESOURCE_BIAS', 25], ['IRB', 25], ['RESIDENCE_RESOURCE_BIAS', 26], ['RRB', 26], ['INITIAL_SLOPE', 27
      ], ['IS', 27], ['INITIAL_B', 28], ['IB', 28], ['MID_SLOPE', 29], ['MS', 29], ['MID_B', 30], ['MB', 30],
      ['FINAL_SLOPE', 31], ['FS', 31], ['FINAL_B', 32], ['FB', 32], ['INITIAL_JOB_PHASE', 33], ['IJP', 33], [
      'MID_JOB_PHASE', 34], ['MJP', 34], ['FINAL_JOB_PHASE', 35], ['FJP', 35], ['CLASS_SWITCH_THRESHOLD', 36]
      , ['CST', 36], ['NEXT_CLASS', 37], ['NC', 37], ['PRIORITY_BIAS', 38], ['PB', 38], ['GUARANTEED_SERVICE'
      , 39], ['GS', 39], ['INPUT_AGE_FACTOR', 40], ['IAF', 40], ['SWAP_AGE_FACTOR', 41], ['SAF', 41], [
      'SWAPPED_PRIORITY_INCREMENT', 42], ['SPI', 42], ['SWAPIN_INCREMENT', 43], ['SI', 43], ['STATUS', 44]];

  VAR
    chaca_pdt_params: [STATIC, READ, cls$pdt_parameters] array [1 .. 44] of clt$parameter_descriptor := [

{ CLASS_NAME CN }
    [[clc$optional_with_default, ^chaca_pdt_dv1], 1, clc$max_value_sets,1, 1, clc$value_range_not_allowed,
      [NIL, clc$name_value, 1, osc$max_name_size]],

{ NAME N }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ ABBREVIATION A }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ PROLOG P }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$string_value, 0, osc$max_string_size
      ]],

{ EPILOG E }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$string_value, 0, osc$max_string_size
      ]],

{ MODE M }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [^chaca_pdt_kv6, clc$keyword_value]],

{ IMMEDIATE_INITIATION_CANDIDATE IIC }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$boolean_value]],

{ PAGE_AGING_INTERVAL PAI }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 1000, 3600000000]],

{ CYCLIC_AGING_INTERVAL CAI }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 1000, 3600000000]],

{ MIN_WORKING_SET MINWS }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 20, 65535]],

{ MAX_WORKING_SET MAXWS }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 20, 65535]],

{ DISPATCHING_CONTROL DC }
    [[clc$optional], 1, 5, 4, 4, clc$value_range_not_allowed, [NIL, clc$any_value]],

{ DISPATCHING_PRIORITY DP }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ DISPATCHING_TIMESLICE DT DISPATCHING_TIMESLICE_TIME DTT }
    [[clc$optional], 2, 2, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 1000, 10000000]],

{ DETACHED_JOB_WAIT_TIME DJWT }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 0, 65535]],

{ CPU_TIME_LIMIT CTL }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 1000000,
      0ffffffffff(16)]],

{ LOW_PRIORITY LP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ HIGH_PRIORITY HP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ INITIAL_PRIORITY IP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ MAX_INITIATED_JOBS MAXIJ }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, jmc$max_ijl_ord]],

{ MAX_ACTIVE_JOBS MAXAJ }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ INITIAL_WORKING_SET IWS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 65535]],

{ MEMORY_RESOURCE_BIAS MRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ CPU_RESOURCE_BIAS CRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ IO_RESOURCE_BIAS IRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ RESIDENCE_RESOURCE_BIAS RRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ INITIAL_SLOPE IS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, -10000, 10000]],

{ INITIAL_B IB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ MID_SLOPE MS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, -10000, 10000]],

{ MID_B MB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ FINAL_SLOPE FS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, -10000, 10000]],

{ FINAL_B FB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ INITIAL_JOB_PHASE IJP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ MID_JOB_PHASE MJP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ FINAL_JOB_PHASE FJP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ CLASS_SWITCH_THRESHOLD CST }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ NEXT_CLASS NC }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ PRIORITY_BIAS PB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ GUARANTEED_SERVICE GS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ INPUT_AGE_FACTOR IAF }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ SWAP_AGE_FACTOR SAF }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ SWAPPED_PRIORITY_INCREMENT SPI }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ SWAPIN_INCREMENT SI }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ STATUS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$variable_reference,
      clc$array_not_allowed, clc$status_value]]];

  VAR
    chaca_pdt_kv6: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 5] of ost$name := ['ALL','BATCH','B'
      ,'INTERACTIVE','I'];

  VAR
    chaca_pdt_dv1: [STATIC, READ, cls$pdt_names_and_defaults] string (3) := 'all';

?? POP ??

    clp$scan_parameter_list (param_list, chaca_pdt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Issue a warning message stating that this command has been replaced by
{ the ADMINISTER_SCHEDULING and MANAGE_ACTIVE_SCHEDULING utilities.

    osp$set_status_abnormal (jmc$job_management_id, jme$use_adms_or_manas_utility, '', status);

  PROCEND jmp$change_class_attr_cmnd;
?? TITLE := 'JMP$CONVERT_DISP_PR_TO_STRING', EJECT ??

  PROCEDURE [XDCL] jmp$convert_disp_pr_to_string
    (    dispatching_priority: jmt$dispatching_priority;
     VAR str: ost$string;
     VAR status: ost$status);

    VAR
      i: integer;

    osp$verify_system_privilege;
    status.normal := TRUE;
    FOR i := LOWERBOUND (priority_table) TO UPPERBOUND (priority_table) DO
      IF priority_table [i].dispatching_priority = dispatching_priority THEN
        str.value := priority_table [i].name;
        str.size := 3;
        RETURN;
      IFEND;
    FOREND;

    osp$set_status_abnormal ('JM', jme$invalid_dispatch_priority, ' ', status);

  PROCEND jmp$convert_disp_pr_to_string;

?? TITLE := 'JMP$CONVERT_STRING_TO_DISP_PR', EJECT ??

  PROCEDURE [XDCL] jmp$convert_string_to_disp_pr
    (    name: ost$name;
     VAR dispatching_priority: jmt$dispatching_priority;
     VAR status: ost$status);

    VAR
      i: integer;

    status.normal := TRUE;

    FOR i := LOWERBOUND (priority_table) TO UPPERBOUND (priority_table) DO
      IF priority_table [i].name = name THEN
        dispatching_priority := priority_table [i].dispatching_priority;
        RETURN;
      IFEND;
    FOREND;

    osp$set_status_abnormal ('JM', jme$invalid_dispatch_priority, ' ', status);

  PROCEND jmp$convert_string_to_disp_pr;
?? TITLE := '[XDCL] jmp$create_job_class_command', EJECT ??

{ PURPOSE:
{   The purpose of this request is to add a new job class to the job class table
{   and a corresponding service class to the service class table.
{ NOTES:
{   This request is retained for compatibility.  It is replaced functionally by
{   commands under the ADMINISTER_SCHEDULING utility.

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

{ PDT crejc_pdt (
{ default_values, dv: NAME
{ index, i: INTEGER 3..255 = $REQUIRED
{ name, n: NAME = $REQUIRED
{ abbreviation, a: NAME
{ prolog, p: STRING
{ epilog, e: STRING
{ mode, m: KEY all, batch, b interactive, i = batch
{ immediate_initiation_candidate, iic: BOOLEAN
{ page_aging_interval, pai: LIST 1..2 RANGE OF INTEGER 1000..3600000000
{ cyclic_aging_interval, cai: LIST 1..2 RANGE OF INTEGER 1000..3600000000
{ min_working_set, minws: LIST 1..2 RANGE OF INTEGER 20..65535
{ max_working_set, maxws: LIST 1..2 RANGE OF INTEGER 20..65535
{ dispatching_control, dc: LIST 1..5, 4 OF ANY
{ dispatching_priority, dp: LIST 1..2 RANGE OF NAME
{ dispatching_timeslice, dt, dispatching_timeslice_time, dtt: LIST 2 OF INTEGER 1000..10000000
{ detached_job_wait_time, djwt: LIST 1..2 RANGE OF INTEGER 0..65535
{ cpu_time_limit, ctl: INTEGER 1000000..0ffffffffff(16)
{ low_priority, lp: INTEGER 0..16000000
{ high_priority, hp: INTEGER 0..16000000
{ initial_priority, ip: INTEGER 0..16000000
{ max_initiated_jobs, maxij: INTEGER 0..jmc$max_ijl_ord
{ max_active_jobs, maxaj: INTEGER 0..100
{ initial_working_set, iws: INTEGER 0..65535
{ memory_resource_bias, mrb: INTEGER 0..100
{ cpu_resource_bias, crb: INTEGER 0..100
{ io_resource_bias, irb: INTEGER 0..100
{ residence_resource_bias, rrb: INTEGER 0..100
{ initial_slope, is: INTEGER -10000..10000
{ initial_b, ib: INTEGER 0..10000
{ mid_slope, ms: INTEGER -10000..10000
{ mid_b, mb: INTEGER 0..10000
{ final_slope, fs: INTEGER -10000..10000
{ final_b, fb: INTEGER 0..10000
{ initial_job_phase, ijp: INTEGER 0..0ffffffffffff(16)
{ mid_job_phase, mjp: INTEGER 0..0ffffffffffff(16)
{ final_job_phase, fjp: INTEGER 0..0ffffffffffff(16)
{ class_switch_threshold,cst: INTEGER 0..0ffffffffffff(16)
{ next_class,nc: NAME
{ priority_bias,pb: INTEGER 0..10000
{ guaranteed_service, gs: INTEGER 0..0ffffffffffff(16)
{ input_age_factor, iaf: INTEGER 0..16000000
{ swap_age_factor, saf: INTEGER 0..16000000
{ swapped_priority_increment, spi: INTEGER 0..16000000
{ swapin_increment, si: INTEGER 0..16000000
{ STATUS)

?? PUSH (LISTEXT := ON) ??

  VAR
    crejc_pdt: [STATIC, READ, cls$pdt] clt$parameter_descriptor_table := [^crejc_pdt_names, ^crejc_pdt_params
      ];

  VAR
    crejc_pdt_names: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 91] of
      clt$parameter_name_descriptor := [['DEFAULT_VALUES', 1], ['DV', 1], ['INDEX', 2], ['I', 2], ['NAME', 3]
      , ['N', 3], ['ABBREVIATION', 4], ['A', 4], ['PROLOG', 5], ['P', 5], ['EPILOG', 6], ['E', 6], ['MODE', 7]
      , ['M', 7], ['IMMEDIATE_INITIATION_CANDIDATE', 8], ['IIC', 8], ['PAGE_AGING_INTERVAL', 9], ['PAI', 9], [
      'CYCLIC_AGING_INTERVAL', 10], ['CAI', 10], ['MIN_WORKING_SET', 11], ['MINWS', 11], ['MAX_WORKING_SET',
      12], ['MAXWS', 12], ['DISPATCHING_CONTROL', 13], ['DC', 13], ['DISPATCHING_PRIORITY', 14], ['DP', 14], [
      'DISPATCHING_TIMESLICE', 15], ['DT', 15], ['DISPATCHING_TIMESLICE_TIME', 15], ['DTT', 15], [
      'DETACHED_JOB_WAIT_TIME', 16], ['DJWT', 16], ['CPU_TIME_LIMIT', 17], ['CTL', 17], ['LOW_PRIORITY', 18],
      ['LP', 18], ['HIGH_PRIORITY', 19], ['HP', 19], ['INITIAL_PRIORITY', 20], ['IP', 20], [
      'MAX_INITIATED_JOBS', 21], ['MAXIJ', 21], ['MAX_ACTIVE_JOBS', 22], ['MAXAJ', 22], ['INITIAL_WORKING_SET'
      , 23], ['IWS', 23], ['MEMORY_RESOURCE_BIAS', 24], ['MRB', 24], ['CPU_RESOURCE_BIAS', 25], ['CRB', 25], [
      'IO_RESOURCE_BIAS', 26], ['IRB', 26], ['RESIDENCE_RESOURCE_BIAS', 27], ['RRB', 27], ['INITIAL_SLOPE', 28
      ], ['IS', 28], ['INITIAL_B', 29], ['IB', 29], ['MID_SLOPE', 30], ['MS', 30], ['MID_B', 31], ['MB', 31],
      ['FINAL_SLOPE', 32], ['FS', 32], ['FINAL_B', 33], ['FB', 33], ['INITIAL_JOB_PHASE', 34], ['IJP', 34], [
      'MID_JOB_PHASE', 35], ['MJP', 35], ['FINAL_JOB_PHASE', 36], ['FJP', 36], ['CLASS_SWITCH_THRESHOLD', 37]
      , ['CST', 37], ['NEXT_CLASS', 38], ['NC', 38], ['PRIORITY_BIAS', 39], ['PB', 39], ['GUARANTEED_SERVICE'
      , 40], ['GS', 40], ['INPUT_AGE_FACTOR', 41], ['IAF', 41], ['SWAP_AGE_FACTOR', 42], ['SAF', 42], [
      'SWAPPED_PRIORITY_INCREMENT', 43], ['SPI', 43], ['SWAPIN_INCREMENT', 44], ['SI', 44], ['STATUS', 45]];

  VAR
    crejc_pdt_params: [STATIC, READ, cls$pdt_parameters] array [1 .. 45] of clt$parameter_descriptor := [

{ DEFAULT_VALUES DV }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ INDEX I }
    [[clc$required], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 3, 255]],

{ NAME N }
    [[clc$required], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ ABBREVIATION A }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ PROLOG P }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$string_value, 0, osc$max_string_size
      ]],

{ EPILOG E }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$string_value, 0, osc$max_string_size
      ]],

{ MODE M }
    [[clc$optional_with_default, ^crejc_pdt_dv7], 1, 1, 1, 1, clc$value_range_not_allowed, [^crejc_pdt_kv7,
      clc$keyword_value]],

{ IMMEDIATE_INITIATION_CANDIDATE IIC }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$boolean_value]],

{ PAGE_AGING_INTERVAL PAI }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 1000, 3600000000]],

{ CYCLIC_AGING_INTERVAL CAI }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 1000, 3600000000]],

{ MIN_WORKING_SET MINWS }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 20, 65535]],

{ MAX_WORKING_SET MAXWS }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 20, 65535]],

{ DISPATCHING_CONTROL DC }
    [[clc$optional], 1, 5, 4, 4, clc$value_range_not_allowed, [NIL, clc$any_value]],

{ DISPATCHING_PRIORITY DP }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ DISPATCHING_TIMESLICE DT DISPATCHING_TIMESLICE_TIME DTT }
    [[clc$optional], 2, 2, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 1000, 10000000]],

{ DETACHED_JOB_WAIT_TIME DJWT }
    [[clc$optional], 1, 2, 1, 1, clc$value_range_allowed, [NIL, clc$integer_value, 0, 65535]],

{ CPU_TIME_LIMIT CTL }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 1000000,
      0ffffffffff(16)]],

{ LOW_PRIORITY LP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ HIGH_PRIORITY HP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ INITIAL_PRIORITY IP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ MAX_INITIATED_JOBS MAXIJ }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, jmc$max_ijl_ord]],

{ MAX_ACTIVE_JOBS MAXAJ }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ INITIAL_WORKING_SET IWS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 65535]],

{ MEMORY_RESOURCE_BIAS MRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ CPU_RESOURCE_BIAS CRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ IO_RESOURCE_BIAS IRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ RESIDENCE_RESOURCE_BIAS RRB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 100]],

{ INITIAL_SLOPE IS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, -10000, 10000]],

{ INITIAL_B IB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ MID_SLOPE MS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, -10000, 10000]],

{ MID_B MB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ FINAL_SLOPE FS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, -10000, 10000]],

{ FINAL_B FB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ INITIAL_JOB_PHASE IJP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ MID_JOB_PHASE MJP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ FINAL_JOB_PHASE FJP }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ CLASS_SWITCH_THRESHOLD CST }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ NEXT_CLASS NC }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ PRIORITY_BIAS PB }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 10000]],

{ GUARANTEED_SERVICE GS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 0ffffffffffff(16)]],

{ INPUT_AGE_FACTOR IAF }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ SWAP_AGE_FACTOR SAF }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ SWAPPED_PRIORITY_INCREMENT SPI }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ SWAPIN_INCREMENT SI }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$integer_value, 0, 16000000]],

{ STATUS }
    [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed, [NIL, clc$variable_reference,
      clc$array_not_allowed, clc$status_value]]];

  VAR
    crejc_pdt_kv7: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 5] of ost$name := ['ALL','BATCH','B'
      ,'INTERACTIVE','I'];

  VAR
    crejc_pdt_dv7: [STATIC, READ, cls$pdt_names_and_defaults] string (5) := 'batch';

?? POP ??

    clp$scan_parameter_list (param_list, crejc_pdt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Issue a warning message stating that this command has been replaced by
{ the ADMINISTER_SCHEDULING utility.

    osp$set_status_abnormal (jmc$job_management_id, jme$use_adms_utility, '', status);

  PROCEND jmp$create_job_class_command;
?? TITLE := '[XDCL] jmp$delete_job_class_command', EJECT ??

{ PURPOSE:
{   The purpose of this request is to delete an existing job class from the job
{   class table and its corresponding service class from the service class table.
{ NOTES:
{   This request is retained for compatibility.  It is replaced functionally by
{   commands under the ADMINISTER_SCHEDULING utility.

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

{
{   PDT deljc_pdt (
{   name, n: LIST OF NAME = $REQUIRED
{   STATUS)

?? PUSH (LISTEXT := ON) ??

    VAR
      deljc_pdt: [STATIC, READ, cls$pdt] clt$parameter_descriptor_table :=
            [^deljc_pdt_names, ^deljc_pdt_params];

    VAR
      deljc_pdt_names: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 3] of
            clt$parameter_name_descriptor := [['NAME', 1], ['N', 1], ['STATUS', 2]];

    VAR
      deljc_pdt_params: [STATIC, READ, cls$pdt_parameters] array [1 .. 2] of clt$parameter_descriptor := [

{ NAME N }
      [[clc$required], 1, clc$max_value_sets, 1, 1, clc$value_range_not_allowed,
            [NIL, clc$name_value, 1, osc$max_name_size]],

{ STATUS }
      [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed,
            [NIL, clc$variable_reference, clc$array_not_allowed, clc$status_value]]];

?? POP ??

    clp$scan_parameter_list (param_list, deljc_pdt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Issue a warning message stating that this command has been replaced by
{ the ADMINISTER_SCHEDULING utility.

    osp$set_status_abnormal (jmc$job_management_id, jme$use_adms_utility, '', status);

  PROCEND jmp$delete_job_class_command;
?? TITLE := '[XDCL] jmp$display_class_attribute_cmd', EJECT ??

{ PURPOSE:
{   The purpose of this request is to display the attributes of the job and
{   service class tables.
{ NOTES:
{   This request is retained for compatibility.  It is replaced functionally by
{   commands under the ADMINISTER_SCHEDULING and MANAGE_ACTIVE_SCHEDULING utilities.

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

{ PDT dca_pdt (
{ class,c: LIST OF NAME = all
{ output,o: FILE = $OUTPUT
{ STATUS);


    VAR
      dca_pdt: [STATIC, READ, cls$pdt] clt$parameter_descriptor_table := [^dca_pdt_names, ^dca_pdt_params];

    VAR
      dca_pdt_names: [STATIC, READ, cls$pdt_names_and_defaults] array [1 .. 5] of
            clt$parameter_name_descriptor := [['CLASS', 1], ['C', 1], ['OUTPUT', 2], ['O', 2], ['STATUS', 3]];

    VAR
      dca_pdt_params: [STATIC, READ, cls$pdt_parameters] array [1 .. 3] of clt$parameter_descriptor := [

{ CLASS C }
      [[clc$optional_with_default, ^dca_pdt_dv1], 1, clc$max_value_sets, 1, 1,
            clc$value_range_not_allowed, [NIL, clc$name_value, 1, osc$max_name_size]],

{ OUTPUT O }
      [[clc$optional_with_default, ^dca_pdt_dv2], 1, 1, 1, 1, clc$value_range_not_allowed,
            [NIL, clc$file_value]],

{ STATUS }
      [[clc$optional], 1, 1, 1, 1, clc$value_range_not_allowed,
            [NIL, clc$variable_reference, clc$array_not_allowed, clc$status_value]]];

    VAR
      dca_pdt_dv1: [STATIC, READ, cls$pdt_names_and_defaults] string (3) := 'all';

    VAR
      dca_pdt_dv2: [STATIC, READ, cls$pdt_names_and_defaults] string (7) := '$OUTPUT';


    clp$scan_parameter_list (param_list, dca_pdt, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

{ Issue a warning message stating that this command has been replaced by
{ the ADMINISTER_SCHEDULING and MANAGE_ACTIVE_SCHEDULING utilities.

    osp$set_status_abnormal (jmc$job_management_id, jme$use_adms_or_manas_utility, '', status);

  PROCEND jmp$display_class_attribute_cmd;

MODEND jmm$job_class_commands;

