GWBasic: Closing LPrint Output? 
Author Message
 GWBasic: Closing LPrint Output?

Anyone:

I have a customer that's using some gw-basic programs.  He's moved to an NT
Server for file/print services.  When he prints reports using LPrint to a
re-directed LPT1, the report is held for a minute or so before it prints.  I
have tweaked the server to no end until I realized that it's gw-basic that's
the problem.  If he exits the gw-basic program, the print occurs
immediately, or if the program "ends", it also prints immediately.  However,
he has a menu handler which keeps the program running.  Is there an LPrint
switch or command to "end" the print output so that the server sends the
report to the printer immediately?

Thank you for your courtesy,

Richard Micko
Clipper Computer, Inc.



Mon, 22 Oct 2001 03:00:00 GMT  
 GWBasic: Closing LPrint Output?

Quote:
>When he prints reports using LPrint to a
>re-directed LPT1, the report is held for a minute or so before it prints.  I
>have tweaked the server to no end until I realized that it's gw-basic that's
>the problem.  If he exits the gw-basic program, the print occurs
>immediately, or if the program "ends", it also prints immediately.  However,
>he has a menu handler which keeps the program running.  Is there an LPrint
>switch or command to "end" the print output so that the server sends the
>report to the printer immediately?

I've never worked in a Windows NT environment, but multitasking operating
systems get between user software and the hardware, to prevent contention.
GWBasic is an _old_ DOS program that assumes that it owns the whole system.

NT sees your menu handler as the running program, so it doesn't print anything
until the virtual printer device times out.

Have you tried opening the printer as a file (OPEN "O", #n, "LPT1") and writing
to it?  When you close this 'file', NT should recognize this as the end of the
print job.

Of course, I don't know NT, so it could be something as easy as LPRINTing two
consecutive null characters.

**********************************************************************
If it's spam, it's a scam.  Don't do business with Net abusers.



Mon, 22 Oct 2001 03:00:00 GMT  
 GWBasic: Closing LPrint Output?

Quote:

>Anyone:

>I have a customer that's using some gw-basic programs.  He's moved to an NT
>Server for file/print services.  When he prints reports using LPrint to a
>re-directed LPT1, the report is held for a minute or so before it prints.
I
>have tweaked the server to no end until I realized that it's gw-basic
that's
>the problem.  If he exits the gw-basic program, the print occurs
>immediately, or if the program "ends", it also prints immediately.
However,
>he has a menu handler which keeps the program running.  Is there an LPrint
>switch or command to "end" the print output so that the server sends the
>report to the printer immediately?

This may not be a problem with the server.  If the customer is using
Win'95(/98?), his machine may be spooling the output before sending it to
the server.  Check the spooling setting for the captured port.  The spooling
can be disabled and the output sent directly to the printer.  Also, if the
printer is like many laser printers, the last page may not print until the
program ends unless a form feed control character is sent [Lprint chr$(12)]
which will force the last page to print.

-CB



Mon, 22 Oct 2001 03:00:00 GMT  
 GWBasic: Closing LPrint Output?
On Thu, 6 May 1999 15:53:06 -0400, "Richard Micko"

Quote:

>Anyone:

>I have a customer that's using some gw-basic programs.  He's moved to an NT
>Server for file/print services.  When he prints reports using LPrint to a
>re-directed LPT1, the report is held for a minute or so before it prints.  I
>have tweaked the server to no end until I realized that it's gw-basic that's
>the problem.  If he exits the gw-basic program, the print occurs
>immediately, or if the program "ends", it also prints immediately.  However,
>he has a menu handler which keeps the program running.  Is there an LPrint
>switch or command to "end" the print output so that the server sends the
>report to the printer immediately?

Richard

We had a similar problem with both DOS-BASIC variants and also with
PrtScr outputs where I worked a few years ago.  The spooling system
looks for an end-of-job character which this class of client does not
provide.

IIRC we had to add a LPRINT command to shove a form feed at the end of
print to cause it to see EOJob.  Particularly when the BASIC client
wants to send multiple jobs in rapid succession, having them
nose-to-tail was a proper pain in the butt.  With the screen print we
never solved it.

Try a form feed, or maybe the nulls suggested elsewhere may work
better.

LOL

Peter
PERTH - WESTERN AUSTRALIA
Remove the NOWHERE from reply address



Tue, 23 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. HELP WITH PRINTING GWBASIC PROGRAM OUTPUT

2. GWBASIC (1/1) - gwbasic.zip [2/2]

3. GWBASIC (1/1) - gwbasic.zip [1/2]

4. Close but...trying to sum DBList output

5. how can i force output to sequential file without closing it

6. DEF SEG and Lprinting multible printers QBASIC.

7. LPRINT, QB 4.5

8. QB-LPrint with HP DeskJet Escape Codes

9. Qbasic "lprint" va Win95b

10. using lprint with a lpt2, lpt3.....

11. QBASIC Question: Form Feeds in LPRINT

12. PB LPRINT error 57 (I/O error) ?

 

 
Powered by phpBB® Forum Software