?? RIGHT := 110 ??
?? NEWTITLE := 'NOS/VE Interactive Facility: Purge outstanding interactive i/o', EJECT ??
MODULE ifm$purge_connection_io;

{ PURPOSE:
{   This module contains the procedure which causes the purging of all
{   i/o outstanding on the network for a dual state interactive job.
{
{ DESIGN:
{   The single procedure in this module interfaces with NAM via PASSON
{   and directs NAM to 'throw away' any input/output queued between the
{   terminal and PASSON.

?? NEWTITLE := 'Global Declarations Referenced by This Module', EJECT ??
?? PUSH (LISTEXT := ON) ??
*copyc ifk$keypoints
*copyc iiv$interactive_terminated
*copyc iiv$int_task_open_file_count
?? POP ??
*copyc iip$build_super_msg_skeleton
*copyc iip$report_status_error
*copyc iip$send_to_pass_on

?? TITLE := 'ifp$purge_connection_io', EJECT ??
*copy ifh$purge_connection_io

  PROCEDURE [XDCL] ifp$purge_connection_io (VAR status: ost$status);

    VAR
      output_supervisory_message: iit$output_supervisory_message,
      local_status: ost$status;


{ Build and send a FC/BRK/R supervisory message to NAM via PASSON.

    iip$build_super_msg_skeleton (^output_supervisory_message,
          iic$sm_break, iic$l_break);

    output_supervisory_message.break.connection_number := iiv$job_connection;

    iip$send_to_pass_on (iiv$int_application_name,
          #LOC (output_supervisory_message), (iic$l_break + 1) * 8,
          iic$output_supervisory_message, status);
    IF NOT status.normal THEN
      iip$report_status_error (status, ' IFP$PURGE_CONNECTION');
    IFEND;
  PROCEND ifp$purge_connection_io;
MODEND ifm$purge_connection_io;
