×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Ignoring Printer Control Codes

Ignoring Printer Control Codes

Ignoring Printer Control Codes

(OP)
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

RE: Ignoring Printer Control Codes

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.

RE: Ignoring Printer Control Codes

(OP)
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

RE: Ignoring Printer Control Codes

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.

RE: Ignoring Printer Control Codes

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.

RE: Ignoring Printer Control Codes

(OP)
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

RE: Ignoring Printer Control Codes

Yes, I used to code in XES and teach it to Xerox analysts!

RE: Ignoring Printer Control Codes

(OP)
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

RE: Ignoring Printer Control Codes

I don't have any specific knowledge on that, sorry.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close