?? NEWTITLE := 'NOS/VE Job Scheduling : administer_functions' ??
MODULE jmm$administer_functions;
?? RIGHT := 110 ??

{ PURPOSE:
{   Provide the routines to process the functions used in the job
{   scheduling utilities ADMINISTER_SCHEDULING, and MANAGE_ACTIVE_SCHEDULING.

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc clt$function_processor_table
*copyc jmc$job_management_id
*copyc jme$object_display_errors
*copyc jme$function_has_no_value
?? POP ??
*copyc clp$evaluate_parameters
*copyc clp$make_boolean_value
*copyc clp$make_file_value
*copyc clp$make_integer_value
*copyc clp$make_keyword_value
*copyc clp$make_list_value
*copyc clp$make_name_value
*copyc clp$make_range_value
*copyc clp$make_record_value
*copyc clp$make_unspecified_value
*copyc jmp$get_attributes_for_display
*copyc jmp$get_object
*copyc osp$append_status_parameter
*copyc osp$set_status_abnormal
*copyc pmp$generate_unique_name

*copyc jmv$current_class_name
*copyc jmv$current_profile_level
*copyc jmv$dispatching_priority_names
*copyc jmv$object_definition
*copyc jmv$the_profile
*copyc osv$lower_to_upper
?? OLDTITLE ??
?? NEWTITLE := 'Global Declarations Declared by This Module', EJECT ??

{ table jmv$utility_functions function scope=xdcl
{ function $application             p=jmp$$application
{ function $controls                p=jmp$$controls
{ function $job_class               p=jmp$$job_class
{ function $service_class           p=jmp$$service_class
{ function $output_class            p=jmp$$output_class availability=hidden
{ function $current_application     p=jmp$$current_application
{ function ($current_mainframe $current_controls) p=jmp$$current_controls
{ function $current_job_category    p=jmp$$current_job_category
{ function $current_job_class       p=jmp$$current_job_class
{ function $current_service_class   p=jmp$$current_service_class
{ function $current_output_class    p=jmp$$current_output_class availability=hidden
{ function $current_profile_level   p=jmp$$current_profile_level
{ function $profile_identification  p=jmp$$profile_identification availability=advanced_usage
{ function $profile_summary         p=jmp$$profile_summary
{ tablend

?? PUSH (LISTEXT := ON) ??

  VAR
    jmv$utility_functions: [XDCL, READ] ^clt$function_processor_table := ^jmv$utility_functions_entries,

    jmv$utility_functions_entries: [STATIC, READ] array [1 .. 15] of clt$function_proc_table_entry := [
          {} ['$APPLICATION                   ', clc$nominal_entry, clc$normal_usage_entry, 1,
          clc$linked_call, ^jmp$$application],
          {} ['$CONTROLS                      ', clc$nominal_entry, clc$normal_usage_entry, 2,
          clc$linked_call, ^jmp$$controls],
          {} ['$CURRENT_APPLICATION           ', clc$nominal_entry, clc$normal_usage_entry, 6,
          clc$linked_call, ^jmp$$current_application],
          {} ['$CURRENT_CONTROLS              ', clc$abbreviation_entry, clc$normal_usage_entry, 7,
          clc$linked_call, ^jmp$$current_controls],
          {} ['$CURRENT_JOB_CATEGORY          ', clc$nominal_entry, clc$normal_usage_entry, 8,
          clc$linked_call, ^jmp$$current_job_category],
          {} ['$CURRENT_JOB_CLASS             ', clc$nominal_entry, clc$normal_usage_entry, 9,
          clc$linked_call, ^jmp$$current_job_class],
          {} ['$CURRENT_MAINFRAME             ', clc$nominal_entry, clc$normal_usage_entry, 7,
          clc$linked_call, ^jmp$$current_controls],
          {} ['$CURRENT_OUTPUT_CLASS          ', clc$nominal_entry, clc$hidden_entry, 11, clc$linked_call,
          ^jmp$$current_output_class],
          {} ['$CURRENT_PROFILE_LEVEL         ', clc$nominal_entry, clc$normal_usage_entry, 12,
          clc$linked_call, ^jmp$$current_profile_level],
          {} ['$CURRENT_SERVICE_CLASS         ', clc$nominal_entry, clc$normal_usage_entry, 10,
          clc$linked_call, ^jmp$$current_service_class],
          {} ['$JOB_CLASS                     ', clc$nominal_entry, clc$normal_usage_entry, 3,
          clc$linked_call, ^jmp$$job_class],
          {} ['$OUTPUT_CLASS                  ', clc$nominal_entry, clc$hidden_entry, 5, clc$linked_call,
          ^jmp$$output_class],
          {} ['$PROFILE_IDENTIFICATION        ', clc$nominal_entry, clc$advanced_usage_entry, 13,
          clc$linked_call, ^jmp$$profile_identification],
          {} ['$PROFILE_SUMMARY               ', clc$nominal_entry, clc$normal_usage_entry, 14,
          clc$linked_call, ^jmp$$profile_summary],
          {} ['$SERVICE_CLASS                 ', clc$nominal_entry, clc$normal_usage_entry, 4,
          clc$linked_call, ^jmp$$service_class]];

?? POP ??
?? OLDTITLE ??
?? NEWTITLE := 'attribute', EJECT ??

{ PURPOSE:
{   Processes the $xxx functions which returns the value for the
{   attributes of an xxx object on the profile.  'xxx' may be an
{   application, controls, job_class, service_class, or output_class.
{
{ DESIGN:
{   Locate the desired object, merge the objects attributes with the defaults,
{   determine the attribute to be returned, and return that value.
{

  PROCEDURE build_attributes
    (    profile_level: jmt$profile_object_kinds;
         pvt: array [1 .. 2] of clt$parameter_value;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

    VAR
      temp: integer,
      attribute: jmt$object_attribute,
      attribute_definition: jmt$profile_declaration,
      attribute_index: jmt$object_attribute_index,
      attribute_name: ost$name,
      field_index: jmt$object_attribute_index,
      high_index: jmt$object_attribute_index,
      i: jmt$object_attribute_index,
      ignored: jmt$profile_object_reference,
      low_index: jmt$object_attribute_index,
      middle_index: jmt$object_attribute_index,
      object_parameters: ^jmt$object_parameter_list,
      the_object: jmt$profile_object_reference;

    the_object := jmv$the_profile.objects [profile_level];
    jmp$get_object (pvt [1].value^.name_value, profile_level, the_object, ignored, status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    attribute_definition := jmv$object_definition [profile_level].declaration;
    object_parameters := jmv$object_definition [profile_level].sorted_parameters;

    jmp$get_attributes_for_display (jmv$the_profile, the_object^, attribute, status);

    attribute_name := pvt [2].value^.keyword_value;
    IF attribute_name = 'ALL' THEN
      high_index := UPPERBOUND (attribute.attribute_list^);
      FOR i := 1 TO high_index DO
        IF attribute.attribute_list^ [i].kind = jmc$empty THEN
          high_index := high_index - 1;
        IFEND;
      FOREND;

      field_index := 1;
      clp$make_record_value (high_index, work_area, result);
      FOR i := 1 TO UPPERBOUND (object_parameters^) DO
        IF NOT object_parameters^ [i].abbreviation THEN
          attribute_index := object_parameters^ [i].attribute_index;
          IF attribute.attribute_list^ [attribute_index].kind <> jmc$empty THEN
            result^.field_values^ [field_index].name := object_parameters^ [i].name;
            build_scl_value_from_attribute (attribute.attribute_list^ [attribute_index],
                  attribute_definition.declarations^ [attribute_index]^,
                  work_area, result^.field_values^ [field_index].value, status);
            field_index := field_index + 1;
          IFEND;
        IFEND;
      FOREND;

    ELSE { attribute name specified }
      high_index := UPPERBOUND (object_parameters^);
      low_index := 1;

    /find_attribute/
      REPEAT
        temp := high_index + low_index;
        middle_index := temp DIV 2;
        IF object_parameters^ [middle_index].name < attribute_name THEN
          low_index := middle_index + 1;
        ELSEIF object_parameters^ [middle_index].name > attribute_name THEN
          high_index := middle_index - 1;
        ELSE
          attribute_index := object_parameters^ [middle_index].attribute_index;
          EXIT /find_attribute/; {----->
        IFEND;
      UNTIL low_index > high_index;
      IF low_index > high_index THEN
        osp$set_status_abnormal (jmc$job_management_id, jme$unknown_attribute, attribute_name, status);
        RETURN; {----->
      IFEND;

      build_scl_value_from_attribute (attribute.attribute_list^ [attribute_index],
            attribute_definition.declarations^ [attribute_index]^, work_area, result, status);
    IFEND;

  PROCEND build_attributes;
?? TITLE := 'build_scl_value_from_attribute', EJECT ??

{ PURPOSE:
{   This routine converts the attribute value to an scl value.
{
{ DESIGN:
{   Builds the appropriate scl variable equivalent for the various attribute
{   values.  The keyword attribute values are converted into strings.
{   Attributes that have more then one value are not converted since there
{   are no scl structures that they could map into reliably.

  PROCEDURE build_scl_value_from_attribute
    (    attribute: jmt$object_attribute;
         attribute_definition: jmt$profile_declaration;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

    VAR
      variable_dimension: integer,
      element: ^clt$data_value,
      name: ost$name,
      i: integer;

    CASE attribute.kind OF

    = jmc$all =
      clp$make_keyword_value ('ALL', work_area, result);

    = jmc$unspecified =
      clp$make_keyword_value ('UNSPECIFIED', work_area, result);

    = jmc$unlimited =
      clp$make_keyword_value ('UNLIMITED', work_area, result);

    = jmc$system_default =
      clp$make_keyword_value ('SYSTEM_DEFAULT', work_area, result);

    = jmc$none =
      clp$make_keyword_value ('NONE', work_area, result);

    = jmc$object =
      clp$make_name_value (attribute.object_p^.name, work_area, result);

    = jmc$number =
      clp$make_integer_value (attribute.number, 10, FALSE, work_area, result);

    = jmc$dispatching_priority =
      clp$make_name_value (jmv$dispatching_priority_names [attribute.number], work_area, result);

    = jmc$boolean =
      clp$make_boolean_value (attribute.bool, clc$true_false_boolean, work_area, result);

    = jmc$file =
      clp$make_file_value (attribute.file^, work_area, result);

    = jmc$name =
      clp$make_name_value (attribute.name^, work_area, result);

    = jmc$empty, jmc$default =
      osp$set_status_abnormal (jmc$job_management_id, jme$parameter_has_no_value, attribute_definition.name,
            status);

    = jmc$range =
      clp$make_range_value (work_area, result);
      build_scl_value_from_attribute (attribute.attribute_list^ [1], attribute_definition.declarations^ [1]^,
            work_area, result^.low_value, status);
      IF attribute.attribute_list^ [2].kind = jmc$empty THEN
        clp$make_unspecified_value (work_area, result^.high_value);
      ELSE
        build_scl_value_from_attribute (attribute.attribute_list^ [2],
              attribute_definition.declarations^ [1]^, work_area, result^.high_value, status);
      IFEND;

    = jmc$list, jmc$editable_list =
      variable_dimension := UPPERBOUND (attribute.attribute_list^);

      result := NIL;
      FOR i := variable_dimension DOWNTO 1 DO
        clp$make_list_value (work_area, element);
        build_scl_value_from_attribute (attribute.attribute_list^ [i],
              attribute_definition.declarations^ [1]^, work_area, element^.element_value, status);
        element^.link := result;
        element^.generated_via_list_rest := FALSE;
        result := element;
      FOREND;

    = jmc$type =
      variable_dimension := UPPERBOUND (attribute.attribute_list^);

      clp$make_record_value (variable_dimension, work_area, result);
      FOR i := 1 TO variable_dimension DO
        #TRANSLATE (osv$lower_to_upper, attribute_definition.declarations^ [i]^.
              name, result^.field_values^ [i].name);
        build_scl_value_from_attribute (attribute.attribute_list^ [i],
              attribute_definition.declarations^ [i]^, work_area, result^.field_values^ [i].value, status);
      FOREND;
    CASEND;
  PROCEND build_scl_value_from_attribute;
?? TITLE := 'current_object', EJECT ??

{ PURPOSE:
{    Processes functions of the form $CURRENT_object_kind.
{
{ DESIGN:
{    All commands which manipulate an object store the name of that object
{    in jmv$current_class_name.  This function returns that as a name value.

  PROCEDURE current_object
    (    profile_level: jmt$profile_object_kinds;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

    VAR
      i: integer,
      entry: ^^clt$data_value,
      name_list: ^array [1 .. * ] of ost$name;

    name_list := jmv$current_class_name [profile_level];
    IF name_list = NIL THEN
      osp$set_status_abnormal (jmc$job_management_id, jme$function_has_no_value,
            jmv$object_definition [profile_level].declaration.name, status);
      clp$make_unspecified_value (work_area, result);

    ELSEIF UPPERBOUND (name_list^) = 1 THEN
      clp$make_name_value (name_list^ [1], work_area, result);

    ELSE
      entry := ^result;
      FOR i := 1 TO UPPERBOUND (name_list^) DO
        clp$make_list_value (work_area, entry^);
        clp$make_name_value (name_list^ [i], work_area, entry^^.element_value);
        entry := ^entry^^.link;
      FOREND;
      entry^ := NIL;
    IFEND;

  PROCEND current_object;
?? TITLE := 'jmp$$application', EJECT ??

{ PURPOSE:
{   Processes the $application function which returns the attributes of the
{   specific application.
{

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

{ FUNCTION $application (
{   application_name: name = $required
{   attribute: key
{       all
{       (cyclic_aging_interval, cai)
{       (enable_application_scheduling, eas)
{       (maximum_working_set, maxws)
{       (minimum_working_set, minws)
{       (page_aging_interval, pai)
{       (service_class, sc)
{     hidden_key
{       (definition_name, dn)
{     keyend = all
{  )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 15] of clt$keyword_specification,
          default_value: string (3),
        recend,
      recend := [[1, [88, 10, 13, 18, 26, 50, 487], clc$function, 2, 2, 1, 0, 0, 0, 0, '$APPLICATION'],
            [['APPLICATION_NAME               ', clc$nominal_entry, 1],
            ['ATTRIBUTE                      ', clc$nominal_entry, 2]], [

{ PARAMETER 1

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

{ PARAMETER 2

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

{ PARAMETER 1

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

{ PARAMETER 2

      [[1, 0, clc$keyword_type], [15], [['ALL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['CAI                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['CYCLIC_AGING_INTERVAL          ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['DEFINITION_NAME                ', clc$nominal_entry,
            clc$hidden_entry, 8], ['DN                             ', clc$abbreviation_entry,
            clc$hidden_entry, 8], ['EAS                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['ENABLE_APPLICATION_SCHEDULING  ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['MAXIMUM_WORKING_SET            ', clc$nominal_entry,
            clc$normal_usage_entry, 4], ['MAXWS                          ', clc$abbreviation_entry,
            clc$normal_usage_entry, 4], ['MINIMUM_WORKING_SET            ', clc$nominal_entry,
            clc$normal_usage_entry, 5], ['MINWS                          ', clc$abbreviation_entry,
            clc$normal_usage_entry, 5], ['PAGE_AGING_INTERVAL            ', clc$nominal_entry,
            clc$normal_usage_entry, 6], ['PAI                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 6], ['SC                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 7], ['SERVICE_CLASS                  ', clc$nominal_entry,
            clc$normal_usage_entry, 7]], 'all']];

?? POP ??

    CONST
      p$application_name = 1,
      p$attribute = 2;

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

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

    build_attributes (jmc$profile_application, pvt, work_area, result, status);

  PROCEND jmp$$application;
?? TITLE := 'jmp$$controls', EJECT ??

{ PURPOSE:
{   Processes the $controls function which returns the attributes for the
{   specified controls.
{

  PROCEDURE jmp$$controls
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $controls (
{   controls_name: name = $required
{   attribute: key
{       all
{       (abbreviation, a)
{       (cpu_dispatching_allocation, cda)
{       (cpu_dispatching_interval, cdi)
{       (cpu_quantum_time, cqt)
{       (dual_state_priority_control, dspc)
{       (enable_job_leveling, ejl)
{       (idle_dispatching_queue_time, idqt)
{       (initiation_excluded_categories, iec)
{       (initiation_required_categories, irc)
{       (job_leveling_interval, jli)
{       (job_leveling_priority_bias, jlpb)
{       (scheduling_memory_levels, sml)
{       (service_calculation_interval, sci)
{       (validation_excluded_categories, vec)
{       (validation_required_categories, vrc)
{     hidden_key
{       (profile_identification, pi)
{     keyend = all
{  )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 33] of clt$keyword_specification,
          default_value: string (3),
        recend,
      recend := [[1, [88, 10, 13, 18, 27, 6, 794], clc$function, 2, 2, 1, 0, 0, 0, 0, '$CONTROLS'],
            [['ATTRIBUTE                      ', clc$nominal_entry, 2],
            ['CONTROLS_NAME                  ', clc$nominal_entry, 1]], [

{ PARAMETER 1

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

{ PARAMETER 2

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

{ PARAMETER 1

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

{ PARAMETER 2

      [[1, 0, clc$keyword_type], [33], [['A                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['ABBREVIATION                   ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['ALL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['CDA                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['CDI                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 4], ['CPU_DISPATCHING_ALLOCATION     ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['CPU_DISPATCHING_INTERVAL       ', clc$nominal_entry,
            clc$normal_usage_entry, 4], ['CPU_QUANTUM_TIME               ', clc$nominal_entry,
            clc$normal_usage_entry, 5], ['CQT                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 5], ['DSPC                           ', clc$abbreviation_entry,
            clc$normal_usage_entry, 6], ['DUAL_STATE_PRIORITY_CONTROL    ', clc$nominal_entry,
            clc$normal_usage_entry, 6], ['EJL                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 7], ['ENABLE_JOB_LEVELING            ', clc$nominal_entry,
            clc$normal_usage_entry, 7], ['IDLE_DISPATCHING_QUEUE_TIME    ', clc$nominal_entry,
            clc$normal_usage_entry, 8], ['IDQT                           ', clc$abbreviation_entry,
            clc$normal_usage_entry, 8], ['IEC                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 9], ['INITIATION_EXCLUDED_CATEGORIES ', clc$nominal_entry,
            clc$normal_usage_entry, 9], ['INITIATION_REQUIRED_CATEGORIES ', clc$nominal_entry,
            clc$normal_usage_entry, 10], ['IRC                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 10], ['JLI                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 11], ['JLPB                           ', clc$abbreviation_entry,
            clc$normal_usage_entry, 12], ['JOB_LEVELING_INTERVAL          ', clc$nominal_entry,
            clc$normal_usage_entry, 11], ['JOB_LEVELING_PRIORITY_BIAS     ', clc$nominal_entry,
            clc$normal_usage_entry, 12], ['PI                             ', clc$abbreviation_entry,
            clc$hidden_entry, 17], ['PROFILE_IDENTIFICATION         ', clc$nominal_entry, clc$hidden_entry,
            17], ['SCHEDULING_MEMORY_LEVELS       ', clc$nominal_entry, clc$normal_usage_entry, 13],
            ['SCI                            ', clc$abbreviation_entry, clc$normal_usage_entry, 14],
            ['SERVICE_CALCULATION_INTERVAL   ', clc$nominal_entry, clc$normal_usage_entry, 14],
            ['SML                            ', clc$abbreviation_entry, clc$normal_usage_entry, 13],
            ['VALIDATION_EXCLUDED_CATEGORIES ', clc$nominal_entry, clc$normal_usage_entry, 15],
            ['VALIDATION_REQUIRED_CATEGORIES ', clc$nominal_entry, clc$normal_usage_entry, 16],
            ['VEC                            ', clc$abbreviation_entry, clc$normal_usage_entry, 15],
            ['VRC                            ', clc$abbreviation_entry, clc$normal_usage_entry, 16]], 'all']];

?? POP ??

    CONST
      p$controls_name = 1,
      p$attribute = 2;

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

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

    build_attributes (jmc$profile_controls, pvt, work_area, result, status);

  PROCEND jmp$$controls;
?? TITLE := 'jmp$$current_application', EJECT ??

{ PURPOSE:
{    Processes the $CURRENT_APPLICATION function which returns the name
{    of the last application specified in a command.
{
{ DESIGN:
{    Calls current_object.

  PROCEDURE jmp$$current_application
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $current_application

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 11, 37, 598], clc$function, 0, 0, 0, 0, 0, 0, 0, '$CURRENT_APPLICATION']];

?? POP ??

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

    current_object (jmc$profile_application, work_area, result, status);
  PROCEND jmp$$current_application;
?? TITLE := 'jmp$$current_controls', EJECT ??

{ PURPOSE:
{    Processes the $CURRENT_MAINFRAME function which returns the name
{    of the last controls specified in a command.
{
{ DESIGN:
{    Calls current_object.

  PROCEDURE jmp$$current_controls
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION $current_controls

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 12, 26, 987], clc$function, 0, 0, 0, 0, 0, 0, 0, '$CURRENT_CONTROLS']];

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

    current_object (jmc$profile_controls, work_area, result, status);
  PROCEND jmp$$current_controls;
?? TITLE := 'jmp$$current_job_category', EJECT ??

{ PURPOSE:
{    Processes the $CURRENT_JOB_CATEGORY function which returns the name
{    of the last job_category specified in a command.
{
{ DESIGN:
{    Calls current_object.

  PROCEDURE jmp$$current_job_category
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION $current_job_category

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 12, 58, 369], clc$function, 0, 0, 0, 0, 0, 0, 0,
            '$CURRENT_JOB_CATEGORY']];

?? POP ??

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

    current_object (jmc$profile_category, work_area, result, status);
  PROCEND jmp$$current_job_category;
?? TITLE := 'jmp$$current_job_class', EJECT ??

{ PURPOSE:
{    Processes the $CURRENT_JOB_CLASS function which returns the name
{    of the last job_class specified in a command.
{
{ DESIGN:
{    Calls current_object.

  PROCEDURE jmp$$current_job_class
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION $current_job_class

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 13, 29, 695], clc$function, 0, 0, 0, 0, 0, 0, 0, '$CURRENT_JOB_CLASS']];

?? POP ??

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

    current_object (jmc$profile_job_class, work_area, result, status);
  PROCEND jmp$$current_job_class;
?? TITLE := 'jmp$$current_output_class', EJECT ??

{ PURPOSE:
{    Processes the $CURRENT_OUTPUT_CLASS function which returns the name
{    of the last output_class specified in a command.
{
{ DESIGN:
{    Calls current_object.

  PROCEDURE jmp$$current_output_class
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION $current_output_class

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 13, 54, 831], clc$function, 0, 0, 0, 0, 0, 0, 0,
            '$CURRENT_OUTPUT_CLASS']];

?? POP ??

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

    current_object (jmc$profile_output_class, work_area, result, status);
  PROCEND jmp$$current_output_class;
?? TITLE := 'jmp$$current_profile_level', EJECT ??

{ PURPOSE:
{   Processes the $current_profile_level function which returns the level
{   of the profile last used.  Level refers here to the type of object
{   that was last manipulated (changed, displayed, etc.) like Job_class,
{   Service_class, Application, Controls, Job_category, Output_class, or
{   Job_priority.
{
{ DESIGN:
{   Each command that manipulates a profile object and each utility stores
{   the profile level in jmv$current_profile_level which this function
{   returns as a name value.

  PROCEDURE jmp$$current_profile_level
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION $current_profile_level

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 14, 34, 205], clc$function, 0, 0, 0, 0, 0, 0, 0,
            '$CURRENT_PROFILE_LEVEL']];

?? POP ??

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

    clp$make_name_value (jmv$object_definition [jmv$current_profile_level].declaration.name, work_area,
          result);

  PROCEND jmp$$current_profile_level;
?? TITLE := 'jmp$$current_service_class', EJECT ??

{ PURPOSE:
{    Processes the $CURRENT_SERVICE_CLASS function which returns the name
{    of the last service_class specified in a command.
{
{ DESIGN:
{    Calls current_object.

  PROCEDURE jmp$$current_service_class
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{  FUNCTION $current_service_class

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
      recend := [[1, [88, 5, 3, 10, 15, 12, 860], clc$function, 0, 0, 0, 0, 0, 0, 0,
            '$CURRENT_SERVICE_CLASS']];

?? POP ??

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

    current_object (jmc$profile_service_class, work_area, result, status);
  PROCEND jmp$$current_service_class;
?? TITLE := 'jmp$$profile_identification', EJECT ??

{ PURPOSE:
{   Processes the $profile_identification function which returns the value for
{   the specified profile_identification of an object on the profile.
{
{ DESIGN:
{   Locate the desired object, merge the objects profile_identifications with
{   the defaults, determine the profile_identification to be returned,
{   and return that value.
{
{ NOTES:
{   Until there is a way to return mixed data only single values will be
{   returned.

  PROCEDURE jmp$$profile_identification
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $profile_identification (
{   object: any of
{       key
{         header
{       keyend
{       record
{         object_name: name
{         profile_level: key
{           (job_class, jcl)
{           (service_class, sc)
{           (application, a)
{           (job_category, jc)
{           (controls, c)
{         keyend
{       recend
{     anyend = $required
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 1] of clt$pdt_parameter_name,
      parameters: array [1 .. 1] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$union_type_qualifier,
        type_size_1: clt$type_specification_size,
        element_type_spec_1: record
          header: clt$type_specification_header,
          qualifier: clt$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$record_type_qualifier,
          field_spec_1: clt$field_specification,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
          field_spec_2: clt$field_specification,
          element_type_spec_2: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 10] of clt$keyword_specification,
          recend,
        recend,
      recend,
    recend := [
    [1,
    [102, 8, 9, 10, 49, 50, 110],
    clc$function, 1, 1, 1, 0, 0, 0, 0, ''], [
    ['OBJECT                         ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 525,
  clc$required_parameter, 0, 0]],
{ PARAMETER 1
    [[1, 0, clc$union_type], [[clc$keyword_type, clc$record_type],
    FALSE, 2],
    44, [[1, 0, clc$keyword_type], [1], [
      ['HEADER                         ', clc$nominal_entry, clc$normal_usage_entry, 1]]
      ],
    461, [[1, 0, clc$record_type], [2],
      ['OBJECT_NAME                    ', clc$required_field, 5], [[1, 0, clc$name_type], [1,
  osc$max_name_size]],
      ['PROFILE_LEVEL                  ', clc$required_field, 377], [[1, 0, clc$keyword_type], [10], [
        ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
        ['APPLICATION                    ', clc$nominal_entry, clc$normal_usage_entry, 3],
        ['C                              ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
        ['CONTROLS                       ', clc$nominal_entry, clc$normal_usage_entry, 5],
        ['JC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
        ['JCL                            ', clc$abbreviation_entry, clc$normal_usage_entry, 1],
        ['JOB_CATEGORY                   ', clc$nominal_entry, clc$normal_usage_entry, 4],
        ['JOB_CLASS                      ', clc$nominal_entry, clc$normal_usage_entry, 1],
        ['SC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
        ['SERVICE_CLASS                  ', clc$nominal_entry, clc$normal_usage_entry, 2]]
        ]
      ]
    ]];

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

    CONST
      p$object = 1;

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

    VAR
      profile_level: jmt$profile_object_kinds,
      ignored: jmt$profile_object_reference,
      the_object: jmt$profile_object_reference,
      name_size: integer,
      name: ost$name;

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

    IF pvt [p$object].value^.kind = clc$keyword THEN
      clp$make_name_value (jmv$the_profile.definition_id, work_area, result);
    ELSE
      profile_level := jmv$current_profile_level;
      IF pvt [p$object].value^.field_values^ [2].value^.kind = clc$name THEN
        name := pvt [p$object].value^.field_values^ [2].value^.name_value;
        profile_level := LOWERVALUE (profile_level);
        WHILE name <> jmv$object_definition [profile_level].declaration.name DO
          profile_level := SUCC (profile_level);
        WHILEND;
      IFEND;
      name := pvt [p$object].value^.field_values^ [1].value^.name_value;

      jmp$get_object (name, profile_level, the_object, ignored, status);
      IF NOT status.normal THEN
        RETURN; {----->
      IFEND;
      clp$make_name_value (the_object^.definition_id, work_area, result);
    IFEND;

  PROCEND jmp$$profile_identification;
?? TITLE := 'jmp$$profile_summary', EJECT ??

{ PURPOSE:
{   Processes the $profile_summary function which returns the value for
{   the specified profile_summary of an object on the profile.
{
{ DESIGN:
{   Locate the desired object, merge the objects profile_summarys with
{   the defaults, determine the profile_summary to be returned,
{   and return that value.
{
{ NOTES:
{   Until there is a way to return mixed data only single values will be
{   returned.

  PROCEDURE jmp$$profile_summary
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $profile_summary (
{   profile_level: key
{     (job_class, jcl) (service_class, sc) (application, a)
{     (job_category, jc) (controls, c)
{    keyend = $required
{  )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 1] of clt$pdt_parameter_name,
        parameters: array [1 .. 1] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 10] of clt$keyword_specification,
        recend,
      recend := [[1, [88, 10, 13, 18, 27, 36, 578], clc$function, 1, 1, 1, 0, 0, 0, 0, '$PROFILE_SUMMARY'],
            [['PROFILE_LEVEL                  ', clc$nominal_entry, 1]], [

{ PARAMETER 1

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

{ PARAMETER 1

      [[1, 0, clc$keyword_type], [10], [['A                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['APPLICATION                    ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['C                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 5], ['CONTROLS                       ', clc$nominal_entry,
            clc$normal_usage_entry, 5], ['JC                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 4], ['JCL                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 1], ['JOB_CATEGORY                   ', clc$nominal_entry,
            clc$normal_usage_entry, 4], ['JOB_CLASS                      ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['SC                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['SERVICE_CLASS                  ', clc$nominal_entry,
            clc$normal_usage_entry, 2]]]];

?? POP ??

    CONST
      p$profile_level = 1;

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

    VAR
      name: ost$name,
      node: ^clt$data_value,
      previous: ^^clt$data_value,
      profile_level: jmt$profile_object_kinds,
      the_object: jmt$profile_object_reference;

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

    name := pvt [p$profile_level].value^.name_value;
    profile_level := LOWERVALUE (profile_level);
    WHILE name <> jmv$object_definition [profile_level].declaration.name DO
      profile_level := SUCC (profile_level);
    WHILEND;

    the_object := jmv$the_profile.objects [profile_level];
    IF the_object = NIL THEN
      clp$make_list_value (work_area, node);
      result^.link := NIL;
      result^.element_value := NIL;
    ELSE
      previous := ^result;
      WHILE the_object <> NIL DO
        clp$make_list_value (work_area, node);
        node^.link := NIL;
        node^.generated_via_list_rest := FALSE;
        clp$make_name_value (the_object^.name, work_area, node^.element_value);
        previous^ := node;
        the_object := the_object^.next_object;
        previous := ^node^.link;
      WHILEND;
    IFEND;

  PROCEND jmp$$profile_summary;
?? TITLE := 'jmp$$job_class', EJECT ??

{ PURPOSE:
{   Processes the $job_class function which returns the attributes of the
{   specified job_class.
{

  PROCEDURE jmp$$job_class
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $job_class (
{   class_name: name = $required
{   attribute: key
{       all
{       (abbreviation, a)
{       (automatic_class_selection, acs)
{       (cpu_time_limit, ctl)
{       (cyclic_aging_interval, cai)
{       (defer_on_submit, dos)
{       (detached_job_wait_time, djwt)
{       (enable_class_initiation, eci)
{       (epilog, e)
{       (excluded_categories, ec)
{       (immediate_initiation_candidate, iic)
{       (initial_service_class, isc)
{       (initial_working_set, iws)
{       (initiated_jobs, ij)
{       (initiation_age_interval, iai)
{       (initiation_level, il)
{       (job_leveling_priority_bias, jlpb)
{       (magnetic_tape_limit, mtl)
{       (maximum_working_set, maxws)
{       (minimum_working_set, minws)
{       (multiple_job_bias, mjb)
{       (page_aging_interval, pai)
{       (prolog, p)
{       (queued_jobs, qj)
{       (required_categories, rc)
{       (selection_priority, sp)
{       (sru_limit, sl)
{     hidden_key
{       (definition_name, dn)
{       (profile_index, pi)
{       (job_class_index, jci)
{     keyend = all
{  )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 59] of clt$keyword_specification,
        default_value: string (3),
      recend,
    recend := [
    [1,
    [90, 1, 26, 11, 40, 2, 676],
    clc$function, 2, 2, 1, 0, 0, 0, 0, ''], [
    ['ATTRIBUTE                      ',clc$nominal_entry, 2],
    ['CLASS_NAME                     ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 5, clc$required_parameter, 0, 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation,
  clc$standard_parameter_checking, 2190, clc$optional_default_parameter, 0, 3
  ]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [59], [
    ['A                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 2],
    ['ABBREVIATION                   ', clc$nominal_entry,
  clc$normal_usage_entry, 2],
    ['ACS                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 3],
    ['ALL                            ', clc$nominal_entry,
  clc$normal_usage_entry, 1],
    ['AUTOMATIC_CLASS_SELECTION      ', clc$nominal_entry,
  clc$normal_usage_entry, 3],
    ['CAI                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 5],
    ['CPU_TIME_LIMIT                 ', clc$nominal_entry,
  clc$normal_usage_entry, 4],
    ['CTL                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 4],
    ['CYCLIC_AGING_INTERVAL          ', clc$nominal_entry,
  clc$normal_usage_entry, 5],
    ['DEFER_ON_SUBMIT                ', clc$nominal_entry,
  clc$normal_usage_entry, 6],
    ['DEFINITION_NAME                ', clc$nominal_entry, clc$hidden_entry, 28
  ],
    ['DETACHED_JOB_WAIT_TIME         ', clc$nominal_entry,
  clc$normal_usage_entry, 7],
    ['DJWT                           ', clc$abbreviation_entry,
  clc$normal_usage_entry, 7],
    ['DN                             ', clc$abbreviation_entry,
  clc$hidden_entry, 28],
    ['DOS                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 6],
    ['E                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 9],
    ['EC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 10],
    ['ECI                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 8],
    ['ENABLE_CLASS_INITIATION        ', clc$nominal_entry,
  clc$normal_usage_entry, 8],
    ['EPILOG                         ', clc$nominal_entry,
  clc$normal_usage_entry, 9],
    ['EXCLUDED_CATEGORIES            ', clc$nominal_entry,
  clc$normal_usage_entry, 10],
    ['IAI                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 15],
    ['IIC                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 11],
    ['IJ                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 14],
    ['IL                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 16],
    ['IMMEDIATE_INITIATION_CANDIDATE ', clc$nominal_entry,
  clc$normal_usage_entry, 11],
    ['INITIAL_SERVICE_CLASS          ', clc$nominal_entry,
  clc$normal_usage_entry, 12],
    ['INITIAL_WORKING_SET            ', clc$nominal_entry,
  clc$normal_usage_entry, 13],
    ['INITIATED_JOBS                 ', clc$nominal_entry,
  clc$normal_usage_entry, 14],
    ['INITIATION_AGE_INTERVAL        ', clc$nominal_entry,
  clc$normal_usage_entry, 15],
    ['INITIATION_LEVEL               ', clc$nominal_entry,
  clc$normal_usage_entry, 16],
    ['ISC                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 12],
    ['IWS                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 13],
    ['JCI                            ', clc$abbreviation_entry,
  clc$hidden_entry, 30],
    ['JLPB                           ', clc$abbreviation_entry,
  clc$normal_usage_entry, 17],
    ['JOB_CLASS_INDEX                ', clc$nominal_entry, clc$hidden_entry, 30
  ],
    ['JOB_LEVELING_PRIORITY_BIAS     ', clc$nominal_entry,
  clc$normal_usage_entry, 17],
    ['MAGNETIC_TAPE_LIMIT            ', clc$nominal_entry,
  clc$normal_usage_entry, 18],
    ['MAXIMUM_WORKING_SET            ', clc$nominal_entry,
  clc$normal_usage_entry, 19],
    ['MAXWS                          ', clc$abbreviation_entry,
  clc$normal_usage_entry, 19],
    ['MINIMUM_WORKING_SET            ', clc$nominal_entry,
  clc$normal_usage_entry, 20],
    ['MINWS                          ', clc$abbreviation_entry,
  clc$normal_usage_entry, 20],
    ['MJB                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 21],
    ['MTL                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 18],
    ['MULTIPLE_JOB_BIAS              ', clc$nominal_entry,
  clc$normal_usage_entry, 21],
    ['P                              ', clc$abbreviation_entry,
  clc$normal_usage_entry, 23],
    ['PAGE_AGING_INTERVAL            ', clc$nominal_entry,
  clc$normal_usage_entry, 22],
    ['PAI                            ', clc$abbreviation_entry,
  clc$normal_usage_entry, 22],
    ['PI                             ', clc$abbreviation_entry,
  clc$hidden_entry, 29],
    ['PROFILE_INDEX                  ', clc$nominal_entry, clc$hidden_entry, 29
  ],
    ['PROLOG                         ', clc$nominal_entry,
  clc$normal_usage_entry, 23],
    ['QJ                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 24],
    ['QUEUED_JOBS                    ', clc$nominal_entry,
  clc$normal_usage_entry, 24],
    ['RC                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 25],
    ['REQUIRED_CATEGORIES            ', clc$nominal_entry,
  clc$normal_usage_entry, 25],
    ['SELECTION_PRIORITY             ', clc$nominal_entry,
  clc$normal_usage_entry, 26],
    ['SL                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 27],
    ['SP                             ', clc$abbreviation_entry,
  clc$normal_usage_entry, 26],
    ['SRU_LIMIT                      ', clc$nominal_entry,
  clc$normal_usage_entry, 27]]
    ,
    'all']];

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

    CONST
      p$class_name = 1,
      p$attribute = 2;

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

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

    build_attributes (jmc$profile_job_class, pvt, work_area, result, status);

  PROCEND jmp$$job_class;
?? TITLE := 'jmp$$output_class', EJECT ??

{ PURPOSE:
{   Processes the $output_class function which returns the attributes of the
{   specified output_class.
{

  PROCEDURE jmp$$output_class
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $output_class (
{   class_name: name = $required
{   attribute: key
{       all
{       (abbreviation, a)
{       (delivery_priority, dp)
{       (enable_class_scheduling, ecs)
{       (output_age_interval, oai)
{     hidden_key
{       (definition_name, dn)
{       (output_class_index, oci)
{     keyend = all
{  )

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 2] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$keyword_type_qualifier,
          keyword_specs: array [1 .. 13] of clt$keyword_specification,
          default_value: string (3),
        recend,
      recend := [[1, [88, 10, 13, 18, 28, 8, 480], clc$function, 2, 2, 1, 0, 0, 0, 0, '$OUTPUT_CLASS'],
            [['ATTRIBUTE                      ', clc$nominal_entry, 2],
            ['CLASS_NAME                     ', clc$nominal_entry, 1]], [

{ PARAMETER 1

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

{ PARAMETER 2

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

{ PARAMETER 1

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

{ PARAMETER 2

      [[1, 0, clc$keyword_type], [13], [['A                              ', clc$abbreviation_entry,
            clc$normal_usage_entry, 2], ['ABBREVIATION                   ', clc$nominal_entry,
            clc$normal_usage_entry, 2], ['ALL                            ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['DEFINITION_NAME                ', clc$nominal_entry,
            clc$hidden_entry, 6], ['DELIVERY_PRIORITY              ', clc$nominal_entry,
            clc$normal_usage_entry, 3], ['DN                             ', clc$abbreviation_entry,
            clc$hidden_entry, 6], ['DP                             ', clc$abbreviation_entry,
            clc$normal_usage_entry, 3], ['ECS                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 4], ['ENABLE_CLASS_SCHEDULING        ', clc$nominal_entry,
            clc$normal_usage_entry, 4], ['OAI                            ', clc$abbreviation_entry,
            clc$normal_usage_entry, 5], ['OCI                            ', clc$abbreviation_entry,
            clc$hidden_entry, 7], ['OUTPUT_AGE_INTERVAL            ', clc$nominal_entry,
            clc$normal_usage_entry, 5], ['OUTPUT_CLASS_INDEX             ', clc$nominal_entry,
            clc$hidden_entry, 7]], 'all']];

?? POP ??

    CONST
      p$class_name = 1,
      p$attribute = 2;

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

    build_attributes (jmc$profile_output_class, pvt, work_area, result, status);

  PROCEND jmp$$output_class;
?? TITLE := 'jmp$$service_class', EJECT ??

{ PURPOSE:
{   Processes the $service_class function which returns the attributes of the
{   specified service_class.
{

  PROCEDURE jmp$$service_class
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

{ FUNCTION $service_class (
{   class_name: name = $required
{   attribute: key
{       all
{       (abbreviation, a)
{       (active_jobs, aj)
{       (aio_limit, aiol)
{       (attempt_preemption, ap)
{       (class_service_threshold, cst)
{       (dispatching_control, dc)
{       (enable_class_execution, ece)
{       (guaranteed_service_quantum, gsq)
{       (long_wait_think_time, lwtt)
{       (maximum_active_jobs, maxaj)
{       (next_service_class, nsc)
{       (queued_jobs, qj)
{       (scheduling_priority, sp)
{       (service_factors, sf)
{       (swap_jobs_in_longwait, sjil)
{       (swapped_jobs, sj)
{     hidden_key
{       (definition_name, dn)
{       (service_class_index, sci)
{     keyend = all
{   )

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

  VAR
    pdt: [STATIC, READ, cls$declaration_section] record
      header: clt$pdt_header,
      names: array [1 .. 2] of clt$pdt_parameter_name,
      parameters: array [1 .. 2] of clt$pdt_parameter,
      type1: record
        header: clt$type_specification_header,
        qualifier: clt$name_type_qualifier,
      recend,
      type2: record
        header: clt$type_specification_header,
        qualifier: clt$keyword_type_qualifier,
        keyword_specs: array [1 .. 37] of clt$keyword_specification,
        default_value: string (3),
      recend,
    recend := [
    [1,
    [106, 8, 18, 19, 27, 42, 129],
    clc$function, 2, 2, 1, 0, 0, 0, 0, ''], [
    ['ATTRIBUTE                      ',clc$nominal_entry, 2],
    ['CLASS_NAME                     ',clc$nominal_entry, 1]],
    [
{ PARAMETER 1
    [2, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 5, clc$required_parameter, 0
  , 0],
{ PARAMETER 2
    [1, clc$normal_usage_entry, clc$non_secure_parameter,
    $clt$parameter_spec_methods[clc$specify_positionally],
    clc$pass_by_value, clc$immediate_evaluation, clc$standard_parameter_checking, 1376,
  clc$optional_default_parameter, 0, 3]],
{ PARAMETER 1
    [[1, 0, clc$name_type], [1, osc$max_name_size]],
{ PARAMETER 2
    [[1, 0, clc$keyword_type], [37], [
    ['A                              ', clc$abbreviation_entry, clc$normal_usage_entry, 2],
    ['ABBREVIATION                   ', clc$nominal_entry, clc$normal_usage_entry, 2],
    ['ACTIVE_JOBS                    ', clc$nominal_entry, clc$normal_usage_entry, 3],
    ['AIOL                           ', clc$abbreviation_entry, clc$normal_usage_entry, 4],
    ['AIO_LIMIT                      ', clc$nominal_entry, clc$normal_usage_entry, 4],
    ['AJ                             ', clc$abbreviation_entry, clc$normal_usage_entry, 3],
    ['ALL                            ', clc$nominal_entry, clc$normal_usage_entry, 1],
    ['AP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 5],
    ['ATTEMPT_PREEMPTION             ', clc$nominal_entry, clc$normal_usage_entry, 5],
    ['CLASS_SERVICE_THRESHOLD        ', clc$nominal_entry, clc$normal_usage_entry, 6],
    ['CST                            ', clc$abbreviation_entry, clc$normal_usage_entry, 6],
    ['DC                             ', clc$abbreviation_entry, clc$normal_usage_entry, 7],
    ['DEFINITION_NAME                ', clc$nominal_entry, clc$hidden_entry, 18],
    ['DISPATCHING_CONTROL            ', clc$nominal_entry, clc$normal_usage_entry, 7],
    ['DN                             ', clc$abbreviation_entry, clc$hidden_entry, 18],
    ['ECE                            ', clc$abbreviation_entry, clc$normal_usage_entry, 8],
    ['ENABLE_CLASS_EXECUTION         ', clc$nominal_entry, clc$normal_usage_entry, 8],
    ['GSQ                            ', clc$abbreviation_entry, clc$normal_usage_entry, 9],
    ['GUARANTEED_SERVICE_QUANTUM     ', clc$nominal_entry, clc$normal_usage_entry, 9],
    ['LONG_WAIT_THINK_TIME           ', clc$nominal_entry, clc$normal_usage_entry, 10],
    ['LWTT                           ', clc$abbreviation_entry, clc$normal_usage_entry, 10],
    ['MAXAJ                          ', clc$abbreviation_entry, clc$normal_usage_entry, 11],
    ['MAXIMUM_ACTIVE_JOBS            ', clc$nominal_entry, clc$normal_usage_entry, 11],
    ['NEXT_SERVICE_CLASS             ', clc$nominal_entry, clc$normal_usage_entry, 12],
    ['NSC                            ', clc$abbreviation_entry, clc$normal_usage_entry, 12],
    ['QJ                             ', clc$abbreviation_entry, clc$normal_usage_entry, 13],
    ['QUEUED_JOBS                    ', clc$nominal_entry, clc$normal_usage_entry, 13],
    ['SCHEDULING_PRIORITY            ', clc$nominal_entry, clc$normal_usage_entry, 14],
    ['SCI                            ', clc$abbreviation_entry, clc$hidden_entry, 19],
    ['SERVICE_CLASS_INDEX            ', clc$nominal_entry, clc$hidden_entry, 19],
    ['SERVICE_FACTORS                ', clc$nominal_entry, clc$normal_usage_entry, 15],
    ['SF                             ', clc$abbreviation_entry, clc$normal_usage_entry, 15],
    ['SJ                             ', clc$abbreviation_entry, clc$normal_usage_entry, 17],
    ['SJIL                           ', clc$abbreviation_entry, clc$normal_usage_entry, 16],
    ['SP                             ', clc$abbreviation_entry, clc$normal_usage_entry, 14],
    ['SWAPPED_JOBS                   ', clc$nominal_entry, clc$normal_usage_entry, 17],
    ['SWAP_JOBS_IN_LONGWAIT          ', clc$nominal_entry, clc$normal_usage_entry, 16]]
    ,
    'all']];

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

    CONST
      p$class_name = 1,
      p$attribute = 2;

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

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

    build_attributes (jmc$profile_service_class, pvt, work_area, result, status);

  PROCEND jmp$$service_class;

MODEND jmm$administer_functions;
