Outputing directly to printer Failure

eddiej

New Member
I'm trying to output information directly to a networked printer using the following code:
OUTPUT STREAM rpt-job TO VALUE(jobprt.print-destination) PAGED PAGE-SIZE 55. Where jobprt.destination is a fully qualified UNC pathway to a printer. For example, \\syt\HP4000.

Occasionally we get the message:
"** Unable to open file: \\syt\HP4000. Errno=22. (98)".

The next time the program runs, we don't get the message. I'm thinking this is an intermittent hardware problem of some sort. Is there any way to programmitically test the status/availability of a printer before you start printing to it?

-Ed
 
eddiej,
what about sending a blank page & then checking for the error?
something akin to:
send print job.
if error-status:error
then pause and try again later
if not error-status:error
then continue with print job
not tested but i don't see why you couldn't trap for your specific error number.

regards,
longhair
 
Dear Eddiej,

Did you fix your problem?

We are having the same problem when we try print to a Network Printer through Appserver. In the log Broker appears a simply message:

[07/07/06@14:39:02.281+0100] P-026106 T-S-0003 3 UB Basic Message from server : lp: unable to print file: client-error-document-format-not-supported


We are using OpenEdge 10.1B - Linux RedHat

Thanks in advance.


Kind Regards
Ricardo Olguin



I'm trying to output information directly to a networked printer using the following code:
OUTPUT STREAM rpt-job TO VALUE(jobprt.print-destination) PAGED PAGE-SIZE 55. Where jobprt.destination is a fully qualified UNC pathway to a printer. For example, \\syt\HP4000.

Occasionally we get the message:
"** Unable to open file: \\syt\HP4000. Errno=22. (98)".

The next time the program runs, we don't get the message. I'm thinking this is an intermittent hardware problem of some sort. Is there any way to programmitically test the status/availability of a printer before you start printing to it?

-Ed
 
Back
Top