Created On: 09 March 2011
Problem:
In order to control the printer formatting directly using PCL codes, escape sequences, etc..., you need to bypass the Windows Printer driver. How do you do this?
Resolution:
You can bypass the Windows printer drivers and write directly to the printer from an RM/COBOL program by setting RAW MODE. There are three ways to do this:
1. Registry configuration - Using rmconfig.exe, set the "Printer Enable Raw Mode" on the Control tab to True.
2. In a configuration file, change the Define-Device record for the printer by adding RAW=yes
3. Use the P$SetRawMode subprogram as outlined in the User's Guide. This sets raw mode only on the next printer opened, while it is open for output. If you close the print file and release the print job, the printer reverts back.
**Keep in mind that using RAW MODE limits the P$ routines that you can use in the program. See the User's Guide for a list of these routines.
1. Registry configuration - Using rmconfig.exe, set the "Printer Enable Raw Mode" on the Control tab to True.
2. In a configuration file, change the Define-Device record for the printer by adding RAW=yes
3. Use the P$SetRawMode subprogram as outlined in the User's Guide. This sets raw mode only on the next printer opened, while it is open for output. If you close the print file and release the print job, the printer reverts back.
**Keep in mind that using RAW MODE limits the P$ routines that you can use in the program. See the User's Guide for a list of these routines.
Old KB# 33642
#PCL
#escapesequences