?? NEWTITLE := 'NOS/VE Job Scheduling : Application Administration' ??
MODULE jmm$administer_application;

{ PURPOSE:
{   This module defines the commands that make up the sub utility of
{   ADMINISTER_SCHEDULING called ADMINISTER_APPLICATION.  The procedures
{   in this module create, change, delete, and display application objects
{   from the scheduling profile.
{
{ DESIGN:
{   This module mainly provides the framework for the utility.  It
{   contains the PDTs and code for the subutility and it's subcommands.
{
{ NOTES:
{   Most of the work of creating, deleting, changing, and displaying is
{   done in routines which are generalized to handle all types of objects.
{   These routines can be found in the modules JMM$ADMINISTER_DISPLAY and
{   JMM$ADMINISTER_OBJECTS.
{

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc jmc$maximum_job_count
*copyc jmt$application_attributes
?? POP ??
*copyc clp$begin_utility
*copyc clp$get_value
*copyc clp$end_include
*copyc clp$end_utility
*copyc clp$include_file
*copyc clp$evaluate_parameters
*copyc jmp$add_object
*copyc jmp$change_object
*copyc jmp$delete_object
*copyc jmp$get_attributes
*copyc jmp$get_object_list
*copyc jmp$set_default_attributes

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

  VAR
    command_file: amt$local_file_name := clc$current_command_input,
    utility_name: string (31) := 'ADMINISTER_APPLICATION         ',
    utility_attributes: array [1 .. 2] of clt$utility_attribute :=
          [[clc$utility_command_table, * ], [clc$utility_prompt, [2, 'AA']]];

{ table command_table
{ command (create_application, crea), jmp$_create_application
{ command (change_attribute, change_attributes, chaa), jmp$_change_attribute
{ command (display_attribute, display_attributes, disa), ..
{   jmp$_display_application cm=xref
{ command (delete_application, dela), jmp$_delete_application
{ 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 .. 12] of
          clt$command_table_entry := [
          {} ['CHAA                           ', clc$abbreviation_entry,
          clc$advertised_entry, 2, clc$automatically_log, clc$linked_call,
          ^jmp$_change_attribute],
          {} ['CHANGE_ATTRIBUTE               ', clc$nominal_entry,
          clc$advertised_entry, 2, clc$automatically_log, clc$linked_call,
          ^jmp$_change_attribute],
          {} ['CHANGE_ATTRIBUTES              ', clc$alias_entry,
          clc$advertised_entry, 2, clc$automatically_log, clc$linked_call,
          ^jmp$_change_attribute],
          {} ['CREA                           ', clc$abbreviation_entry,
          clc$advertised_entry, 1, clc$automatically_log, clc$linked_call,
          ^jmp$_create_application],
          {} ['CREATE_APPLICATION             ', clc$nominal_entry,
          clc$advertised_entry, 1, clc$automatically_log, clc$linked_call,
          ^jmp$_create_application],
          {} ['DELA                           ', clc$abbreviation_entry,
          clc$advertised_entry, 4, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_application],
          {} ['DELETE_APPLICATION             ', clc$nominal_entry,
          clc$advertised_entry, 4, clc$automatically_log, clc$linked_call,
          ^jmp$_delete_application],
          {} ['DISA                           ', clc$abbreviation_entry,
          clc$advertised_entry, 3, clc$automatically_log, clc$linked_call,
          ^jmp$_display_application],
          {} ['DISPLAY_ATTRIBUTE              ', clc$nominal_entry,
          clc$advertised_entry, 3, clc$automatically_log, clc$linked_call,
          ^jmp$_display_application],
          {} ['DISPLAY_ATTRIBUTES             ', clc$alias_entry,
          clc$advertised_entry, 3, clc$automatically_log, clc$linked_call,
          ^jmp$_display_application],
          {} ['QUI                            ', clc$abbreviation_entry,
          clc$advertised_entry, 5, clc$automatically_log, clc$linked_call,
          ^jmp$_quit],
          {} ['QUIT                           ', clc$nominal_entry,
          clc$advertised_entry, 5, clc$automatically_log, clc$linked_call,
          ^jmp$_quit]];

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

?? POP ??
?? TITLE := 'jmp$_change_attribute ', EJECT ??

{ PURPOSE:
{   Processes the CHANGE_ATTRIBUTE command.
{
{ DESIGN:
{   Determines the applications to update, fetches the attributes that are
{   changing and updates them.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS.

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

{ PROCEDURE (osm$adma_chaa) change_attribute (
{   application_name, application_names, an: any of
{       key all keyend
{       list of name
{     anyend = $current_application
{   cyclic_aging_interval, cai: (by_name) any of
{       key default, unspecified keyend
{       integer jmc$lowest_aging_interval..jmc$highest_aging_interval
{     anyend = $optional
{   enable_application_scheduling, eas: (by_name) any of
{       key default keyend
{       boolean
{     anyend = $optional
{   maximum_working_set, maxws: (by_name) any of
{       key default, unlimited, unspecified keyend
{       integer jmc$lowest_working_set_size..jmc$highest_working_set_size
{     anyend = $optional
{   minimum_working_set, minws: (by_name) any of
{       key default, unspecified keyend
{       integer jmc$lowest_working_set_size..jmc$highest_working_set_size
{     anyend = $optional
{   page_aging_interval, pai: (by_name) any of
{       key default, unspecified keyend
{       integer jmc$lowest_aging_interval..jmc$highest_aging_interval
{     anyend = $optional
{   service_class, sc: (by_name) any of
{       key default, unspecified keyend
{       name
{     anyend = $optional
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 16] of clt$pdt_parameter_name,
        parameters: array [1 .. 8] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 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,
          default_value: string (20),
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$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,
        type3: 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,
          recend,
        recend,
        type4: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 3] 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,
        type5: record
          header: clt$type_specification_header,
          qualifier: clt$union_type_qualifier,
          type_size_1: clt$type_specification_size,
          element_type_spec_1: record
            header: clt$type_specification_header,
            qualifier: clt$keyword_type_qualifier,
            keyword_specs: array [1 .. 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,
        type6: 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,
        type7: 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$name_type_qualifier,
          recend,
        recend,
        type8: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 31, 26, 721], clc$command, 16, 8, 0, 0, 0,
            0, 8, 'OSM$ADMA_CHAA'], [['AN                             ',
            clc$abbreviation_entry, 1], ['APPLICATION_NAME               ',
            clc$nominal_entry, 1], ['APPLICATION_NAMES              ',
            clc$alias_entry, 1], ['CAI                            ',
            clc$abbreviation_entry, 2], ['CYCLIC_AGING_INTERVAL          ',
            clc$nominal_entry, 2], ['EAS                            ',
            clc$abbreviation_entry, 3], ['ENABLE_APPLICATION_SCHEDULING  ',
            clc$nominal_entry, 3], ['MAXIMUM_WORKING_SET            ',
            clc$nominal_entry, 4], ['MAXWS                          ',
            clc$abbreviation_entry, 4], ['MINIMUM_WORKING_SET            ',
            clc$nominal_entry, 5], ['MINWS                          ',
            clc$abbreviation_entry, 5], ['PAGE_AGING_INTERVAL            ',
            clc$nominal_entry, 6], ['PAI                            ',
            clc$abbreviation_entry, 6], ['SC                             ',
            clc$abbreviation_entry, 7], ['SERVICE_CLASS                  ',
            clc$nominal_entry, 7], ['STATUS                         ',
            clc$nominal_entry, 8]], [

{ 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, 85,
            clc$optional_default_parameter, 0, 20],

{ PARAMETER 2

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

{ PARAMETER 3

      [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, 67, clc$optional_parameter, 0, 0],

{ PARAMETER 4

      [8, 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, 158, clc$optional_parameter, 0,
            0],

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

{ PARAMETER 6

      [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, 121, clc$optional_parameter, 0,
            0],

{ PARAMETER 7

      [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, 106, clc$optional_parameter, 0,
            0],

{ PARAMETER 8

      [16, 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]]],
            '$current_application'],

{ PARAMETER 2

      [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type], FALSE,
            2], 81, [[1, 0, clc$keyword_type],
            [2], [['DEFAULT                        ', 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_aging_interval,
            jmc$highest_aging_interval, 10]]],

{ PARAMETER 3

      [[1, 0, clc$union_type], [[clc$boolean_type, clc$keyword_type], FALSE,
            2], 44, [[1, 0, clc$keyword_type],
            [1], [['DEFAULT                        ', clc$nominal_entry,
            clc$normal_usage_entry, 1]]], 3, [[1, 0, clc$boolean_type]]],

{ PARAMETER 4

      [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type], FALSE,
            2], 118, [[1, 0, clc$keyword_type],
            [3], [['DEFAULT                        ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['UNLIMITED                      ',
            clc$nominal_entry, clc$normal_usage_entry, 2],
            ['UNSPECIFIED                    ', clc$nominal_entry,
            clc$normal_usage_entry, 3]]], 20,
            [[1, 0, clc$integer_type], [jmc$lowest_working_set_size,
            jmc$highest_working_set_size, 10]]],

{ PARAMETER 5

      [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type], FALSE,
            2], 81, [[1, 0, clc$keyword_type],
            [2], [['DEFAULT                        ', 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_working_set_size,
            jmc$highest_working_set_size, 10]]],

{ PARAMETER 6

      [[1, 0, clc$union_type], [[clc$integer_type, clc$keyword_type], FALSE,
            2], 81, [[1, 0, clc$keyword_type],
            [2], [['DEFAULT                        ', 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_aging_interval,
            jmc$highest_aging_interval, 10]]],

{ PARAMETER 7

      [[1, 0, clc$union_type], [[clc$keyword_type, clc$name_type], FALSE, 2],
            81, [[1, 0, clc$keyword_type], [2],
            [['DEFAULT                        ', clc$nominal_entry,
            clc$normal_usage_entry, 1], ['UNSPECIFIED                    ',
            clc$nominal_entry, clc$normal_usage_entry, 2]]], 5,
            [[1, 0, clc$name_type], [1, osc$max_name_size]]],

{ PARAMETER 8

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

?? POP ??

    CONST
      p$application_name = 1,
      p$cyclic_aging_interval = 2,
      p$enable_application_scheduling = 3,
      p$maximum_working_set = 4,
      p$minimum_working_set = 5,
      p$page_aging_interval = 6,
      p$service_class = 7,
      p$status = 8;

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

    VAR
      the_attributes: jmt$object_attribute;

    status.normal := TRUE;

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

    jmp$get_attributes (jmc$profile_application, #SEQ (pdt), ^pvt,
          the_attributes, status);
    IF status.normal THEN
      jmp$change_object (jmc$profile_application,
            pvt [p$application_name].value^, the_attributes, jmc$update,
            status);
    IFEND;

  PROCEND jmp$_change_attribute;
?? TITLE := 'jmp$_create_application ', EJECT ??

{ PURPOSE:
{   Processes the CREATE_APPLICATION command.
{
{ DESIGN:
{   Fetches the default values and adds the specified application to the
{   profile.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS.

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

{ PROCEDURE (osm$adma_crea) create_application (
{   application_name, an: name = $required
{   default_values, dv: (by_name) name = $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,
          qualifier: clt$name_type_qualifier,
        recend,
        type2: record
          header: clt$type_specification_header,
          qualifier: clt$name_type_qualifier,
        recend,
        type3: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 31, 53, 242], clc$command, 5, 3, 1, 0, 0,
            0, 3, 'OSM$ADMA_CREA'], [['AN                             ',
            clc$abbreviation_entry, 1], ['APPLICATION_NAME               ',
            clc$nominal_entry, 1], ['DEFAULT_VALUES                 ',
            clc$nominal_entry, 2], ['DV                             ',
            clc$abbreviation_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, 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, 5, 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$name_type], [1, osc$max_name_size]],

{ PARAMETER 2

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

{ PARAMETER 3

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

?? POP ??

    CONST
      p$application_name = 1,
      p$default_values = 2,
      p$status = 3;

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

    VAR
      the_application: jmt$profile_object_reference,
      the_attributes: jmt$object_attribute;

    status.normal := TRUE;

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

    jmp$set_default_attributes (jmc$profile_application,
          pvt [p$default_values], the_attributes, status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

    jmp$add_object (jmc$profile_application,
          pvt [p$application_name].value^.name_value, the_attributes,
          the_application, status);

  PROCEND jmp$_create_application;
?? TITLE := 'jmp$_delete_application ', EJECT ??

{ PURPOSE:
{   Processes the DELETE_APPLICATION command.
{
{ DESIGN:
{   Determine the applications to delete and delete them.
{
{ NOTES:
{   See JMM$ADMINISTER_OBJECTS

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

{ PROCEDURE (osm$adma_dela) delete_application (
{   application_name, application_names, an: list of name = $required
{   status)

?? PUSH (LISTEXT := ON) ??

    VAR
      pdt: [STATIC, READ, cls$declaration_section] record
        header: clt$pdt_header,
        names: array [1 .. 4] of clt$pdt_parameter_name,
        parameters: array [1 .. 2] of clt$pdt_parameter,
        type1: record
          header: clt$type_specification_header,
          qualifier: clt$list_type_qualifier,
          element_type_spec: record
            header: clt$type_specification_header,
            qualifier: clt$name_type_qualifier,
          recend,
        recend,
        type2: record
          header: clt$type_specification_header,
        recend,
      recend := [[1, [88, 9, 26, 10, 32, 29, 487], clc$command, 4, 2, 1, 0, 0,
            0, 2, 'OSM$ADMA_DELA'], [['AN                             ',
            clc$abbreviation_entry, 1], ['APPLICATION_NAME               ',
            clc$nominal_entry, 1], ['APPLICATION_NAMES              ',
            clc$alias_entry, 1], ['STATUS                         ',
            clc$nominal_entry, 2]], [

{ PARAMETER 1

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

{ PARAMETER 2

      [4, clc$normal_usage_entry, clc$non_secure_parameter,
            $clt$parameter_spec_methods [clc$specify_by_name],
            clc$pass_by_reference, clc$immediate_evaluation,
            clc$standard_parameter_checking, 3, clc$optional_parameter, 0, 0]],

{ PARAMETER 1

      [[1, 0, clc$list_type], [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$application_name = 1,
      p$status = 2;

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

    status.normal := TRUE;

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

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

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

{ PURPOSE:
{   Exits the subutility.
{
{ DESIGN:
{   Terminates the subutility.

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

{ PROCEDURE (osm$adma_qui) quit, qui (
{   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, 26, 10, 32, 57, 896], clc$command, 1, 1, 0, 0, 0,
            0, 1, 'OSM$ADMA_QUI'], [['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;

    status.normal := TRUE;

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

    clp$end_include (utility_name, status);

  PROCEND jmp$_quit;
?? TITLE := '[XDCL, #GATE] jmp$_administer_application', EJECT ??

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

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

{ PROCEDURE (osm$adms_adma) administer_application (
{   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, 26, 10, 33, 43, 988], clc$command, 1, 1, 0, 0, 0,
            0, 1, 'OSM$ADMS_ADMA'], [['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;

    status.normal := TRUE;

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

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

    jmv$current_profile_level := jmc$profile_application;

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

    clp$end_utility (utility_name, status);
    IF NOT status.normal THEN
      RETURN
    IFEND;

  PROCEND jmp$_administer_application;
MODEND jmm$administer_application;
