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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ignoring Printer Control Codes

Status
Not open for further replies.

dsaro00

Programmer
Apr 18, 2005
14
US
Hi All,

We are trying to print a report in Duplex mode. It was not printing in duplex despite giving the duplex command. We print the reports from a mainframe program called QMF (Query Management Facility) that is used to create a report with data extracted from DB2 database.

On further research, we found that QMF inserts a printer control code 1 that makes the report to print on a new paper, thus negating the Duplex command that we gave.

Do you know if there is any way we can tell the HP printer (HP9050, HP4250) to ignore these printer control codes?

Thank You in advance.

dsaro00
 
I have no knowledge of QMF, or of (IBM?) mainframe spooling, so need to ask some questions first:

Does the output from QMF go directly to the printer, or via some sort of spooler/driver system?

If the former, does QMF generate a plain text stream, or does it generate a PCL (or perhaps PostScript) stream?

What is a "printer control code 1"? (I suspect that this may refer to a FormFeed character; printers will NOT ignore these).

How do you "give it the duplex command"? Is this something you set within QMF? On the printer? By inserting a PCL escape sequence in the print stream? Or something else?

Are you able to 'print to file' the print stream which would otherwise go the printer? If so, you could post it somewhere for us to analyse it.
 
Hi DansDadUK,

Yes, the output from QMF directly goes to the printer. We provide PCL stream at the beginning of the report that QMF creates, so they get sent along with the report.

Printer control code 1 makes it skip to a new page.

1 E %-12345X
%-12345X E
&a1G
&l1S
(0N (s0p13.7h8.5v0s0b0T &l1O
&l8.0C
&a6L &l1E


1

TOP 40 ITEMS SHIPPED THIS WEEK

DEST S CORP/CD DESCRIPTION PACK SIZE
---- - --------- ---------------------------------------- ---- ------
SVAN V 72014199 VIDEO/DVD BLOWOUT CARTON C 1 138 PC
SWPG V 72014199 VIDEO/DVD BLOWOUT CARTON C 1 138 PC
SVAN V 72014204 VIDEO/DVD BLOWOUT CARTON H 1 94 PC
 
In m/f terminology, the first byte in a record is often a Print Carriage Control byte, known as PCC. But it isn't always, and when it is, the printer needs to know that it is, and how to interpret it.

The value of "1" for a PCC at the top of a page is usually indicative of the ANSI PCC convention being used (there are others, such as IBM1403). But as I said, the printer needs to know that: some printers would expect it always, others would have it set programmably, such as in the Xerox languages PDL or Vipp.
I'm confused about the scenario above- how does the HP printer know that byte 1 is the PCC byte- are you sure your printer is exepecting an ANSI PCC byte? Are you 100% sure that the "1" and also the spaces at the start of most other lines are in fact not being printed? (which is what would happen if it was not expecting a PCC byte- it would think that byte was a normal data byte to be printed.

Also, even if the first byte is known to be an ANSI PCC byte, it's not strictly speaking a skip to a new page. It's actually a skip to channel 1, which is almost always, but not necessarily set to mean line 1, and thus would be a new page.

And in any case, even when the printer expects an ANSI PCC byte, and a "1" is set to mean line 1 and thus a new page, in duplex mode that would still mean go to the top of the back side of the page if currently on the front. A skip to cahannel 1 does not mean a new sheet of paper, it means the next available side, which would be a back if currently a front, or a front if currently on the back.

Rather than your question as to how to get the printer to ignore the PCC, I'm actually surprised it's honouring them in the first place!

Are you sure the Escape character is being transmitted to the printer? M/f spoolers do not always let the Escape through- if not, that would explain why the PCL commands were not being honoured, but, of course, if that was the caae, the rest of the command would print. Have you looked carefully to check that the PCL commands are in fact not being printed, which would indicate the absence of the Escape.

 
Forgive me but It has been awhile since I've worked with mainframes and AS400. I know for sure what you been talking about printer control. Take a look at the printer definition in the host system. There is a value that you can turn on or off for printer control character specially if the printer setup is not a line printer but for other types. This might help you with your problems. I know this because I used to output reports into different types of printer including PCL streams.
 
Hi All,

Thank You for your time... We are now checking if there is any way we can switch off/om printer control codes.

Hi JimBrown,
Have you had any experience with Xerox's language called XES (Xerox Escape Sequence)? I thought you may be as you have mentioned other Xerox languages like PDL or Vipp in your message...Actually I am involved in a project to replace XES with PCL.

Thanks
dsaro00
 
Hi JimBrown,
What we have problems with the most is the conversion of fonts when we convert from XES to PCL. The XES programs seem to use fonts like Kosmos, XCP, Titan, LG, UN etc. When we search for these fonts in the net, we couldn't come across any. The printers they print to are Xerox N24s fitted with Agile adapters.

Do you know how these fonts can be created using PCL?

Thank You
dsaro00
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top