BladeSystem Forums Have Moved here
To make BladeSystem information easier to find, we have moved the BladeSystem forums here, to Servers and Operating Systems.
Showing results for 
Search instead for 
Do you mean 

HP3000 & pcl

Occasional Contributor

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 .
Honored Contributor

Re: HP3000 & pcl


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:


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.

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

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

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) =========
CO "----- upper left company name, line 1 ----";
CO " ----- select white pen 0, transparency off ----";
SP 0;
TR 0;
CO " ----- select black pen 1, transparency on ----";
SP 1;
TR 1;
CO "----- shaded box & eoe message at bottom -----";
LBAn Equal Opportunity Employer~;
CO "----- form name @ bottom left -----";
PU 0,0;
LBFORMB2 (ver 7.21.00a)~;
============ (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,