Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

send PCL in cobol from hp3000 to hp laserjet4 & change fonts

Status
Not open for further replies.

Starcraft

Programmer
Jul 23, 1999
1
US
Can anyone had any experience changing the font on an HP laserjet 4 from a cobol program?
01 REG-HEADER.
05 LABEL-REG PIC X(132) VALUE '<27>(s0p10h12s0b4099T'.

Have tried to code as a value but so far when it passes, it print the code on the line.
 
Try the following...
01 REG-HEADER.
05 ESC CHAR PIC X VALUE X'27'.
05 LABEL-REG PIC X(16) VALUE 's0p10h12s0b4099T'.
05 FILLER PIC X(115) VALUE SPACES.
This should send the ESC control character as a X'27'... I am not where I can get to my HP Book so I am assuming the rest of your data string is correct. Anyway, if there are other control characters they will need to be coded with the same syntax as shown above. I usually have to reset the printer a few times before I get it right...

Good Luck,

Saginaw
helpdesk@simotime.com
 

01 REG-HEADER.
05 LABEL-REG PIC X(09) VALUE
@27s0p10h12s0b4099T@.

Try using HEX literals, note each 2 &quot;places&quot; in the hex
literal represents 1 byte. Therefore the pic is half as long
as the literal.
We are on a Unisys Mainframe and produce forms on HP printers using PCL5 often.

grahamal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top