Extended CommandsChapter —7
306 TE 2000
5250 Terminal Emulation Programmer’s Guide
Transmit Only On RS -232 Port (#P)
The Transmit Only On RS-232 Port extended command lets the terminal
send information to a slaved RS-232 device, such as a receipt printer or
bar code printer. The command uses the RS-232 communications port to
send data to the device. The terminal checks data from the host computer
for a transmit sequence, then sends the requested data. The host computer
signals the terminal for a transmit command by inserting the characters
“#P” into the display at Line 1, Columns 2 and 3. Characteristics of the
transmission immediately follow the #P command.
When constructing a Transmit Only command, the data to be sent should
be placed at Line 2, Column 1. The data must be less than 1840 bytes in
length (after “=yy” compression). The last character must be a “#” (pound
sign). The terminal sends the data to the RS-232 port until it detects a “#”
character.
Line 2, Column 1, begins the start of transmit data. The host application
must set up the screen with a transmit field to locate the RS-232 port I/O
data. The field can be anywhere on the screen, beginning at position 80.
The output stream takes the form of ASCII characters. For nondisplayable
ASCII characters, you may insert the “=yy” characters, where “yy” is the
hexadecimal r epresentation of the output byte. For example, insert “=0D”
if your printer requires a carriage return, or insert “=0A” for a line f eed.
Appendix D, “Terminal Font Set Table,” contains other values.