1. A system for identifying and sequentially arranging a plurality of coded documents traveling in a stream in an apparatus for processing and serially dispensing discrete groups of documents, comprising a. a source of coded documents, b. means for conveying documents individually from said source to a document release position, c. first scanner means along said conveying means positioned to determine the presence of a document, d. second scanner means associated with said first scanner means to read code from said document, e. processor means to store code read from each document, f. a retention gate at said document release position, said retention gate being positionable at one of two orientations comprising a document hold orientation and a document release orientation, g. third scanner means at said retention gate to determine the presence of a document at said gate, and h. a document accumulator spaced downstream from said document release position, said accumulator including i. an accumulation gate, and ii. fourth scanner means to determine the presence of a document at said accumulation gate.