Skip to main content

Problem:

You can use embedded printer escape sequences when printing using the syntax such as:-

SELECT PRINTFIL ASSIGN  TO  PRINTER  WS-PRINT-NAME

                           ORGANIZATION  LINE SEQUENTIAL

                           FILE  STATUS  IS  FILE-STATUS.

WS-PRINT-NAME contains "\\\\PRINTSERVER\\printername".

and standard COBOL File IO.

Some printer ignore the control characters.

Resolution:

This is caused by the COBOL file handler inserting a NULL character before each control character.

Some printers just ignore these extra null characters so they continue to work but some printers don't interpret the escape sequences correctly and fail to print as required.

Old KB# 3879