Control Codes

The control codes section of a PDF is used by the PDT function to determine what specific PC printer control code is to be sent to the PC printer when an SCS control code is received. Some of the statements used by Communications Manager are shown in the following example.
START_JOB=SEL CDW CDL CUL CDS CP8 CS2
END_JOB=CAT CDW CDL CUL CDS CP4 FFF
SET_PAGE_LENGTH=SFL value
SET_VARIABLE_LINE_DENSITY=ESC A value ESC 2
SET_10_CHARACTERS_PER_INCH=P10
Note: The above example lines come from the IBM® 4019 LaserPrinter PDF.

START_JOB and END_JOB

The control codes associated with START_JOB are sent at the start of each host print job. It is best to set all printer options to a known or desired state at the beginning of each host print job. The PC printer changes its state or changes the options selected only when instructed to do so by control codes. Therefore, the previous PC application could have left the printer in portrait mode with a Courier font selected, and unless your job changed them, these would be the printer options used.

Even though the START_JOB and END_JOB control codes are the ones shipped with the IBM4019.PDF, many users change them to be more like the ones below:

   START_JOB=RES P12 LL8
   END_JOB=RES

In this example, the RES, P12 and LL8 macros are used on the START_JOB statement (these macros are defined in IBM4019.PDF File Contents). This translates into the following control codes being sent to the printer at the beginning of your print job:

X'1B 5B 4B 07 00 05 31 01 A4 00 00 90 1B 3A 1B 41 09 1B 32'

This sequence of control codes:

The END-JOB statement sends the following control code to the printer at the end of your job:

X'1B 5B 4B 07 00 05 31 01 A4 00 00 90'

This control code resets the printer to IBM PPDS factory default settings (RES).

SET_VARIABLE_LINE_DENSITY

The SET_VARIABLE_LINE_DENSITY statement is used in combination with the panel where you can select the number of lines per inch (LPI), which can be either 6 or 8.

The PDT process uses whatever is selected in the lines per inch field, and substitutes this number for the value keyword in the SET_VARIABLE_LINE_DENSITY parameter. In other words, if lines per inch is set to 8, the SET_VARIABLE_LINE_DENSITY parameter is

SET_VARIABLE_LINE_DENSITY=ESC A 09 ESC 2

where the 09 comes from 72/8. The number of typographic points in 1 inch is 42; thus a value of 12 points would indicate six lines to an inch.

The control code that is sent to the printer to set the line density is:
X'1B 41 09 1B 32'
SET_10_CHARACTERS_PER_INCH

On most printers, the default pitch is 10 characters per inch. In most PDTs, Z and I Emulator for Windows uses this same convention and sends the control code found on the SET_10_CHARACTERS_PER_INCH statement. This is usually coded in the PDF as:

SET_10_CHARACTERS_PER_INCH=P10

where P10 is coded in the macro definition section as:

P10 EQU 12