?? RIGHT := 110 ??
?? NEWTITLE := 'CREATE_SUBPRODUCT_CORRECTION subutility: QUIT command.' ??
MODULE ram$quit_cresc;

{ PURPOSE:
{   This module contains the procedure that ends the CREATE_SUBPRODUCT_CORRECTION
{   utility.
{
{ DESIGN:
{   This module returns all system resources and ends the
{   CREATE_SUBPRODUCT_CORRECTION utility.
{
{   The compiled module resides in RAF$LIBRARY.
{
{ NOTES:
{


?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc rae$package_software_cc
?? POP ??
*copyc clp$end_include
*copyc clp$evaluate_parameters
*copyc osp$generate_error_message
*copyc osp$set_status_abnormal
*copyc rap$reset_correction_environ
*copyc rav$correction_process_record
*copyc rav$cresc_utility_name

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

?? OLDTITLE ??
?? NEWTITLE := '[XDCL] rap$quit_cresc', EJECT ??

{ PURPOSE:
{   This procedure opens the utility.
{
{ DESIGN:
{   The utility is opened.
{
{ NOTES:
{

  PROCEDURE [XDCL] rap$quit_cresc
    (    parameter_list: clt$parameter_list;
     VAR status: ost$status);


{ PROCEDURE quit_cresc_pdt (
{   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, 7, 12, 15, 34, 51, 26], clc$command, 1, 1, 0, 0, 0, 0, 1, 'QUIT_CRESC_PDT'],
            [['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;

    VAR
      ignore_status: ost$status,
      local_status: ost$status;

    status.normal := TRUE;

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

    IF rav$correction_process_record.correction_in_progress THEN
      osp$set_status_abnormal ('RA', rae$genc_not_called, '', local_status);
      osp$generate_error_message (local_status, ignore_status);
    IFEND;

    rap$reset_correction_environ (rav$correction_process_record, local_status);
    IF NOT status.normal THEN
      osp$generate_error_message (local_status, ignore_status);
    IFEND;

    clp$end_include (rav$cresc_utility_name, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;

  PROCEND rap$quit_cresc;

MODEND ram$quit_cresc;
