Not a question, more of a hint.
It's not immediately obvious (it wasn't to me, anyway) that PSM includes a tool that helps you to add OMR marks to the edges of your pages. These identification marks can be used to control enveloping machines, book binders, or inserters.
To access this functionality, place a Barcode object and set its type to "Flattermarken".
Flattermarken will generate a machine-readable symbol that consists of several segments. Each segment contains a black bar in one of nine possible positions. Input can be based on an expression, but the result must be a string of digits that represent the bar positions.