Re: HP3000 & pcl (288 Views)
Reply
Occasional Contributor
Hipolito Rodal
Posts: 3
Registered: ‎10-16-2000
Message 1 of 5 (288 Views)

HP3000 & pcl

Anyone knows what is the best way to load PCL macros in my laser4050n to be used by a Cobol program in order to print forms?
This printer is shared by novell and hp3000, and now, I load the macros with fcopy from hp3000, but I think the macros aren't been saved as permanent, althougth I send this escape sequence .
thanks.
Honored Contributor
Eric Sorensen_1
Posts: 573
Registered: ‎10-08-2000
Message 2 of 5 (288 Views)

Re: HP3000 & pcl

Hello,

Questions about LaserJets' internal functions are best handled by the Printer Expert Center at (208) 323-2551. According to my PCL 5 Technical Reference manual, pp. 12-1 to 12-13, macros are temporary by default. A temporary macro will be lost when the printer is reset, but even a "permanent" macro will be lost when the printer is powered-off. Specify a macro as "permanent" (to be retained after a reset) by using the "macro control" command:

esc&f10X

This will apply to the most recently specified macro ID. In order to make a macro truly permanent, it must be written to read-only memory (ROM). I am not familiar with ROM chips or cartridges-- please discuss the availability and usage of macros in ROM with the Printer Expert Center.
A problem well defined is half solved.
Advisor
Tom Emerson
Posts: 17
Registered: ‎09-12-2000
Message 3 of 5 (288 Views)

Re: HP3000 & pcl

Why not have the program force-feed the macro at the start of the run? I'm sure you have some "initial header" logic in the program -- that's the perfect place to insert printer setup codes when you are 100% sure which printer you are going to [since our shop has basically one printer we work with, it's pretty easy for me to make that determination... ;) ]

If there *might* be some variance in printers, consider a file of escape sequences (much like you're FCOPYing now), but have the COBOL program simply open the "setup" file and copy whatever it sees in this file to the printer as part of the first-header initialization.

Finally, you can also consider ";ENV" files, or "environment files" -- this is kind of a holdover from when printers had VFC tapes and such, but nowadays they contain information that is pre-pended to the spooler output at the time the system sends the printout. [I haven't worked with them enough lately to remember the details, but that should get you going in the right direction]
Occasional Contributor
Hipolito Rodal
Posts: 3
Registered: ‎10-16-2000
Message 4 of 5 (288 Views)

Re: HP3000 & pcl

Thanks a lot to everybody. My problem is that I write in a lot of printers connected to the hp3000, depending on the user who print. This program is running since years but the problem appears with laserjet 4000 series. I sent ' esc&f10X ' after I define the macro, and I don't turn off the printer but the macros sometimes disappear. I would like not to modify the Cobol program that calls the macros. I think that some users from network who share the printer, write with PS drivers and this could produce the problem +any suggestions?
Thanks a lot again.

Occasional Advisor
Sam Cochran
Posts: 9
Registered: ‎11-05-1998
Message 5 of 5 (288 Views)

Re: HP3000 & pcl

my 4000's drove me crazy for awhile when i tried to print an hpgl overlay form on my cobol programs...
the solution i discovered was that the 4000's wanted the macro EXECUTED. look at the very last line of the snippet below, that's where the key to your problem may be (see the "|&f1y2X").

this only works for networked printers (we have 4&5si's, 4000n's)...
i have several files with different forms & printer formats that are used simply by adding the file statement:
FILE ____;DEV=____;ENV=(name of the text file snippet shown below)

i have a bunch of extra "junk" in my escape sequences that may confuse the issue, sorry.

refer to the "PCL 5 PRINTER LANGUAGE TECHNICAL LANGUAGE REFERENCE MANUAL" on page 12-9 for more info on the macro commands.

snippet of form (the pipe char "|" should be changed to an escape):

========== ( beginning of snippet) =========
|%-12345X|E|&l6d0o2A|&l-200Z|&l63F|&f1y0X|&f0S|*c5760x7560Y|*p0x0Y|*c0T|%0B
IN;
IP00000,00000,08128,10668;
SC00000,04000,00000,05160;
PA;
SP0001;
WU;
PW000.15;
DT~,1;
CO "----- upper left company name, line 1 ----";
PU100,5160;
FT10,50;
RA990,5040;
PU100,5160;
EA990,5040;
PU150,5060;
CO " ----- select white pen 0, transparency off ----";
SP 0;
TR 0;
SI;SD1,277,2,1,4,16.00,5,0,6,3,7,16602;SS;
LBBAE SYSTEMS~;
CO " ----- select black pen 1, transparency on ----";
SP 1;
TR 1;
...
CO "----- shaded box & eoe message at bottom -----";
PU0,120;
FT10,20;
RA4000,250;
PU0,120;
EA4000,250;
CO;
PU1600,35;
SI;SD1,277,2,1,4,10.00,5,1,6,0,7,16602;SS;
LBAn Equal Opportunity Employer~;
CO "----- form name @ bottom left -----";
PU 0,0;
SI;SD1,277,2,1,4,6.00,5,0,6,0,7,4101;SS;
LBFORMB2 (ver 7.21.00a)~;
CO;
SP0001;
IN;
|%0A|&f1S|&f1y1X|&f1y2X|&f1y4X
============ (end of snippet) =============

side note: don't put any extra spaces between your escape sequences -- this can gen extra pages or cause line shifting.

-- good luck,
foss
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.