Close-pipe connection termination


When a participant closes a pipe, a request is passed to the Pipe Control Task (PCT) to perform connection termination.

The PCT writes a participant statistics record to the OUTLOG file and performs connection termination for this participant. When the last participant closes the pipe, the PCT writes a pipe statistics record to the OUTLOG file, performs pipe termination (frees the pipe buffers and all of the associated control blocks), and terminates.

The Close requests of the pipe participants can be synchronized. Participants wait during Close until all of the participants Close the pipe. Only then do all pipe connections terminate, and pipe termination is performed.

According to the SMF record parameter specification in the PIPPEM xx member, SMF records can optionally be generated when a participant closes the pipe and when the pipe is terminated. When a participant closes the pipe, the SMF record is generated by the participant. It contains general pipe details and participant I/O statistics. When the last participant closes the pipe and the pipe is terminated, the SMF record is generated by the PCT. It contains general pipe details, pipe statistics, and I/O statistics for each participant.

Job Optimizer Pipes performs partial connection termination for a participant in the following situations:

  • A writer closes the pipe without sending an end-of-file indication (according to Pipe Rule specifications).
  • A reader closes the pipe without performing any I/O operation.

Partial connection termination is called Deferred Close. After Deferred Close, the participant remains connected to the pipe and can reopen the pipe and continue writing or reading. For a writer or for a reader that did not reopen the pipe, the actual close is performed at deallocation. For a reader that did reopen the pipe, the actual close is performed when the pipe is closed after reopen and I/O.

According to rule specifications, a reader might be allowed to close the pipe before receiving an end-of-file (it read only part of the data). If there are no more active readers for the pipe and no additional readers are allowed to join, this situation is called Early Readers Close. When Early Readers Close occurs, the writer does not continue writing to the pipe (there is no reader to read the data). If an Automated File Creation was requested, the writer continues working while writing the data to the file only; otherwise, the writer abends.



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Batch Optimizer (Advanced and Standard) 2.9