



?? RIGHT := 110 ??
?? NEWTITLE := 'MANAGE_FIELD_CHANGES: MANFC Utility Command.' ??
MODULE qcm$manage_field_changes;

{ PURPOSE:
{   This module contains the command interface to set up and control the
{   qcu field installation process.
{
{ DESIGN:
{   The compiled module resides in RAF$LIBRARY.
{
{ NOTES:
{

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
*copyc qct$installation_defaults
?? POP ??
*copyc clp$begin_utility
*copyc clp$end_utility
*copyc clp$evaluate_parameters
*copyc clp$include_file
*copyc fst$file_reference

?? TITLE := 'Global Declarations Declared by This Module', EJECT ??

  VAR
    qcv$manfc_utility_name: [XDCL] clt$utility_name := 'MANAGE_FIELD_CHANGES';


?? FMT (FORMAT := ON) ??

?? TITLE := '[XDCL] qcp$manage_field_changes', EJECT ??

{ PURPOSE:
{   This command interface sets up the MANAGE_FIELD_CHANGES utility
{   session.
{
{ DESIGN:
{   This follows standard utility design.
{
{ NOTES:
{

  PROCEDURE [XDCL] qcp$manage_field_changes
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);



{
{  PROCEDURE manfc_pdt (
{    status)

?? 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,
      recend,
    recend := [
    [1,
    [89, 2, 17, 9, 46, 41, 854],
    clc$command, 1, 1, 0, 0, 0, 0, 1, ''], [
    ['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]]];

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

    CONST
      p$status = 1;

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


{ table n=manfc_command_table t=command s=xdcl
{ command n=(qcp$establish_backup_catalog) p=qcp$establish_backup_catalog  ..
{        cm=proc a=hidden
{ command n=(display_correction, disc) p=qcp$display_correction cm=proc
{ command n=(display_scoreboard, dissb) p=qcp$display_scoreboard cm=proc
{ command n=(establish_bases) p=qcp$establish_bases a=hidden cm=proc
{ command n=(establish_qcu_environment) p=qcp$establish_qcu_environment    ..
{     cm=proc a=hidden
{ command n=(install_field_correction, insfc) p=qcp$install_correction     ..
{    cm=proc
{ command n=(withdraw_field_correction, witfc) p=qcp$withdraw_correction   ..
{      cm=proc
{ command n=(apply_correction) p=qcp$apply_correction a=hidden cm=xref
{ command n=(quit, qui) p=qcp$quit_manfc cm=xref
{ command n=(generate_correction_system, gencs)      ..
{   p=qcp$generate_qcu_deadstart_cat cm=proc
{ command n=(establish_correction_system, estcs) p=qcp$establish_qcu cm=proc
{ command n=(establish_deadstart_catalog)      ..
{   p=qcp$establish_deadstart_catalog a=hidden cm=proc
{ command n=(withdraw_deadstart_catalog) p=qcp$withdraw_deadstart_catalog  ..
{       a=hidden cm=proc
{ command n=(commit_correction_system, comcs) p=qcp$commit_system cm=proc
{ command n=(commit_base_system, combs) p=qcp$commit_base_system cm=proc   ..
{       a=hidden
{ command n=(generate_deadstart_tape, gendt) p=qcp$make_correction_ds_tape ..
{        cm=proc
{ command n=(withdraw_correction_system, witcs) p=qcp$withdraw_system cm=proc
{ command n=(build_score_header) p=qcp$build_score_header a=hidden cm=proc
{ command n=(modify_version) p=qcp$modify_version a=hidden cm=proc
{ command n=(get_correction_level) p=qcp$get_correction_level a=hidden     ..
{    cm=proc
{ command n=(copy_configuration) p=qcp$copy_configuration a=hidden cm=proc
{ command n=(link_generated_qcu) p=qcp$link_generated_qcu a=hidden cm=proc
{ command n=(combine_drivers) p=qcp$combine_drivers a=hidden cm=proc
{ command n=(list_catalog) p=qcp$list_catalog a=hidden cm=proc
{ command n=(move_ds_catalog) p=qcp$move_ds_catalog a=hidden cm=proc
{ command n=(get_block_and_record_type) p=get_block_and_record_type      ..
{   a=hidden cm=proc
{ command n=(qcp$back_ds_catalog) p=qcp$back_ds_catalog a=hidden cm=proc
{ command n=(reset_environment, rese) p=qcp$reset_environment cm=proc
{ command n=(search_link_map) p=search_link_map a=hidden cm=program
{ tablend

?? PUSH (LISTEXT := ON) ??

VAR
  manfc_command_table: [XDCL, READ] ^clt$command_table :=
      ^manfc_command_table_entries,

  manfc_command_table_entries: [STATIC, READ] array [1 .. 41] of
      clt$command_table_entry := [
  {} ['APPLY_CORRECTION               ', clc$nominal_entry,
        clc$hidden_entry, 8, clc$automatically_log, clc$linked_call,
        ^qcp$apply_correction],
  {} ['BUILD_SCORE_HEADER             ', clc$nominal_entry,
        clc$hidden_entry, 18, clc$automatically_log, clc$program_call,
        'QCP$BUILD_SCORE_HEADER'],
  {} ['COMBINE_DRIVERS                ', clc$nominal_entry,
        clc$hidden_entry, 23, clc$automatically_log, clc$program_call,
        'QCP$COMBINE_DRIVERS'],
  {} ['COMBS                          ', clc$abbreviation_entry,
        clc$hidden_entry, 15, clc$automatically_log, clc$program_call,
        'QCP$COMMIT_BASE_SYSTEM'],
  {} ['COMCS                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 14, clc$automatically_log, clc$program_call,
        'QCP$COMMIT_SYSTEM'],
  {} ['COMMIT_BASE_SYSTEM             ', clc$nominal_entry,
        clc$hidden_entry, 15, clc$automatically_log, clc$program_call,
        'QCP$COMMIT_BASE_SYSTEM'],
  {} ['COMMIT_CORRECTION_SYSTEM       ', clc$nominal_entry,
        clc$normal_usage_entry, 14, clc$automatically_log, clc$program_call,
        'QCP$COMMIT_SYSTEM'],
  {} ['COPY_CONFIGURATION             ', clc$nominal_entry,
        clc$hidden_entry, 21, clc$automatically_log, clc$program_call,
        'QCP$COPY_CONFIGURATION'],
  {} ['DISC                           ', clc$abbreviation_entry,
        clc$normal_usage_entry, 2, clc$automatically_log, clc$program_call,
        'QCP$DISPLAY_CORRECTION'],
  {} ['DISPLAY_CORRECTION             ', clc$nominal_entry,
        clc$normal_usage_entry, 2, clc$automatically_log, clc$program_call,
        'QCP$DISPLAY_CORRECTION'],
  {} ['DISPLAY_SCOREBOARD             ', clc$nominal_entry,
        clc$normal_usage_entry, 3, clc$automatically_log, clc$program_call,
        'QCP$DISPLAY_SCOREBOARD'],
  {} ['DISSB                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 3, clc$automatically_log, clc$program_call,
        'QCP$DISPLAY_SCOREBOARD'],
  {} ['ESTABLISH_BASES                ', clc$nominal_entry,
        clc$hidden_entry, 4, clc$automatically_log, clc$program_call,
        'QCP$ESTABLISH_BASES'],
  {} ['ESTABLISH_CORRECTION_SYSTEM    ', clc$nominal_entry,
        clc$normal_usage_entry, 11, clc$automatically_log, clc$program_call,
        'QCP$ESTABLISH_QCU'],
  {} ['ESTABLISH_DEADSTART_CATALOG    ', clc$nominal_entry,
        clc$hidden_entry, 12, clc$automatically_log, clc$program_call,
        'QCP$ESTABLISH_DEADSTART_CATALOG'],
  {} ['ESTABLISH_QCU_ENVIRONMENT      ', clc$nominal_entry,
        clc$hidden_entry, 5, clc$automatically_log, clc$program_call,
        'QCP$ESTABLISH_QCU_ENVIRONMENT'],
  {} ['ESTCS                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 11, clc$automatically_log, clc$program_call,
        'QCP$ESTABLISH_QCU'],
  {} ['GENCS                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 10, clc$automatically_log, clc$program_call,
        'QCP$GENERATE_QCU_DEADSTART_CAT'],
  {} ['GENDT                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 16, clc$automatically_log, clc$program_call,
        'QCP$MAKE_CORRECTION_DS_TAPE'],
  {} ['GENERATE_CORRECTION_SYSTEM     ', clc$nominal_entry,
        clc$normal_usage_entry, 10, clc$automatically_log, clc$program_call,
        'QCP$GENERATE_QCU_DEADSTART_CAT'],
  {} ['GENERATE_DEADSTART_TAPE        ', clc$nominal_entry,
        clc$normal_usage_entry, 16, clc$automatically_log, clc$program_call,
        'QCP$MAKE_CORRECTION_DS_TAPE'],
  {} ['GET_BLOCK_AND_RECORD_TYPE      ', clc$nominal_entry,
        clc$hidden_entry, 26, clc$automatically_log, clc$program_call,
        'GET_BLOCK_AND_RECORD_TYPE'],
  {} ['GET_CORRECTION_LEVEL           ', clc$nominal_entry,
        clc$hidden_entry, 20, clc$automatically_log, clc$program_call,
        'QCP$GET_CORRECTION_LEVEL'],
  {} ['INSFC                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 6, clc$automatically_log, clc$program_call,
        'QCP$INSTALL_CORRECTION'],
  {} ['INSTALL_FIELD_CORRECTION       ', clc$nominal_entry,
        clc$normal_usage_entry, 6, clc$automatically_log, clc$program_call,
        'QCP$INSTALL_CORRECTION'],
  {} ['LINK_GENERATED_QCU             ', clc$nominal_entry,
        clc$hidden_entry, 22, clc$automatically_log, clc$program_call,
        'QCP$LINK_GENERATED_QCU'],
  {} ['LIST_CATALOG                   ', clc$nominal_entry,
        clc$hidden_entry, 24, clc$automatically_log, clc$program_call,
        'QCP$LIST_CATALOG'],
  {} ['MODIFY_VERSION                 ', clc$nominal_entry,
        clc$hidden_entry, 19, clc$automatically_log, clc$program_call,
        'QCP$MODIFY_VERSION'],
  {} ['MOVE_DS_CATALOG                ', clc$nominal_entry,
        clc$hidden_entry, 25, clc$automatically_log, clc$program_call,
        'QCP$MOVE_DS_CATALOG'],
  {} ['QCP$BACK_DS_CATALOG            ', clc$nominal_entry,
        clc$hidden_entry, 27, clc$automatically_log, clc$program_call,
        'QCP$BACK_DS_CATALOG'],
  {} ['QCP$ESTABLISH_BACKUP_CATALOG   ', clc$nominal_entry,
        clc$hidden_entry, 1, clc$automatically_log, clc$program_call,
        'QCP$ESTABLISH_BACKUP_CATALOG'],
  {} ['QUI                            ', clc$abbreviation_entry,
        clc$normal_usage_entry, 9, clc$automatically_log, clc$linked_call,
        ^qcp$quit_manfc],
  {} ['QUIT                           ', clc$nominal_entry,
        clc$normal_usage_entry, 9, clc$automatically_log, clc$linked_call,
        ^qcp$quit_manfc],
  {} ['RESE                           ', clc$abbreviation_entry,
        clc$normal_usage_entry, 28, clc$automatically_log, clc$program_call,
        'QCP$RESET_ENVIRONMENT'],
  {} ['RESET_ENVIRONMENT              ', clc$nominal_entry,
        clc$normal_usage_entry, 28, clc$automatically_log, clc$program_call,
        'QCP$RESET_ENVIRONMENT'],
  {} ['SEARCH_LINK_MAP                ', clc$nominal_entry,
        clc$hidden_entry, 29, clc$automatically_log, clc$program_call,
        'SEARCH_LINK_MAP'],
  {} ['WITCS                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 17, clc$automatically_log, clc$program_call,
        'QCP$WITHDRAW_SYSTEM'],
  {} ['WITFC                          ', clc$abbreviation_entry,
        clc$normal_usage_entry, 7, clc$automatically_log, clc$program_call,
        'QCP$WITHDRAW_CORRECTION'],
  {} ['WITHDRAW_CORRECTION_SYSTEM     ', clc$nominal_entry,
        clc$normal_usage_entry, 17, clc$automatically_log, clc$program_call,
        'QCP$WITHDRAW_SYSTEM'],
  {} ['WITHDRAW_DEADSTART_CATALOG     ', clc$nominal_entry,
        clc$hidden_entry, 13, clc$automatically_log, clc$program_call,
        'QCP$WITHDRAW_DEADSTART_CATALOG'],
  {} ['WITHDRAW_FIELD_CORRECTION      ', clc$nominal_entry,
        clc$normal_usage_entry, 7, clc$automatically_log, clc$program_call,
        'QCP$WITHDRAW_CORRECTION']];

  PROCEDURE [XREF] qcp$apply_correction
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

  PROCEDURE [XREF] qcp$quit_manfc
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);

?? POP ??


?? PUSH (LISTEXT := ON) ??

VAR
  manfc_function_table: [XDCL, READ] ^clt$function_processor_table := ^manfc_function_table_entries,

  manfc_function_table_entries: [STATIC, READ] array [1 .. 1] of clt$function_proc_table_entry := [
  {} ['$INSTALL_DRIVER                ', clc$nominal_entry, clc$hidden_entry, 1, clc$linked_call,
        ^qcp$functions]];

  PROCEDURE [XREF] qcp$functions
    (    parameter_list: clt$parameter_list;
     VAR work_area {input, output} : ^clt$work_area;
     VAR result: ^clt$data_value;
     VAR status: ost$status);

?? POP ??

    CONST
      prompt_size = 5,
      prompt_value = 'MANFC';

    VAR
      utility_attributes_p: ^clt$utility_attributes;


    status.normal := TRUE;

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

    PUSH utility_attributes_p: [1 .. 4];
    utility_attributes_p^ [1].key := clc$utility_command_search_mode;
    utility_attributes_p^ [1].command_search_mode := clc$global_command_search;
    utility_attributes_p^ [2].key := clc$utility_command_table;
    utility_attributes_p^ [2].command_table := manfc_command_table;
    utility_attributes_p^ [3].key := clc$utility_function_proc_table;
    utility_attributes_p^ [3].function_processor_table := manfc_function_table;
    utility_attributes_p^ [4].key := clc$utility_prompt;
    utility_attributes_p^ [4].prompt.size := prompt_size;
    utility_attributes_p^ [4].prompt.value := prompt_value;

    clp$begin_utility (qcv$manfc_utility_name, utility_attributes_p^, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$include_file (clc$current_command_input, prompt_value, qcv$manfc_utility_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

    clp$end_utility (qcv$manfc_utility_name, status);

  PROCEND qcp$manage_field_changes;
MODEND qcm$manage_field_changes;



