Closing an output data set

The close routine handles end-of-data-set processing on output tapes. When a write operation is the last operation that occurs before closing a data set (for OUTPUT, OUTIN, OUTINX, EXTEND, or INOUT), or when no output is written before closing (for OUTPUT, OUTIN, OUTINX or EXTEND), the close routine creates data set trailer labels.