Printer Redirection

When printing using printer redirection in .NET COBOL programs, written records are buffered by default for performance reasons. This could result in misaligned text if a record starting with many leading spaces ends up split between different buffers.

To workaround this issue, it is recommended to disable buffering of records on the printer file. This can be done by setting the WRITETHRU bit in the CONFIG-FLAGS field in the printer file's File Control Description (FCD) to allow each write to flush to file when printing the document. To access the FCD, use the FCDREG directive to define special registers giving access to FCD.