Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Fox 9 and Dos Printing Commands

Posted on 2010-08-30
11
Medium Priority
?
556 Views
Last Modified: 2012-05-10
I am trying to send a report over the network to an HP LaserJet 4 printer attached to another computer (\\akl1\hplj4).  I tried 3-different ways to print the report. Here is the original FPDOS command: !copy /b contrac1.txt+crtinvce.pcl+outfile.txt lpt1 > nul

contrac1.txt is Hex code to set up the printer.
crtinvce.pcl is bitmapped code to produce a logo.
outfile.txt is straight ASCII characters (the report).

Can you suggest a way I can print this report?


Thank You

D
0
Comment
Question by:Malibucompany
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
11 Comments
 
LVL 20

Accepted Solution

by:
n2fc earned 672 total points
ID: 33563230
You neglect to state what the issue is...
Are you getting incorrect output or is it a network issue, such that the data never arrives at the printer?
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 444 total points
ID: 33563435
With XP and newer, you will probably not be able to do that.  The 'DOS' LPT1 isn't DOS, it is redirected thru the Windows printer driver which outputs PCL but doesn't understand it as input from LPT1.  If you can print to 'file', then you can use a regular Windows program to print it.  Or drag the printer over to that computer and plug it in to the parallel port.  In two other questions recently, we never got this method to work.  The formatting codes wouldn't get thru the driver to the printer.
0
 

Author Comment

by:Malibucompany
ID: 33563806
Hello n2fc... Sorry about that. Yes the data never arrives at the printer.
0
TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

 
LVL 20

Assisted Solution

by:n2fc
n2fc earned 672 total points
ID: 33563847
OK, then...
Try opening a DOS (command) prompt and entering the below command:
net use LPT1 "\\akl1\hplj4"  /persisitent:no
Then try your printing again...
If it works, you can make that command into a batch file and run it once each time at startup...
0
 
LVL 20

Assisted Solution

by:n2fc
n2fc earned 672 total points
ID: 33563853
PS: You might also try concatenating a "page eject" control at the end (if necessary) to force the printer to flush out a partial page at end!
0
 

Author Comment

by:Malibucompany
ID: 33564221
Hello Dave Baldwin... The printer being used is USB. There is no parallel port on the computer. Also, reports created using standard @ … Say does print over the network. When I setup to use Printer Pooling I get the same result… The output does not make it to the printer. Any suggestions? Thanks for all your help.
0
 
LVL 30

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 444 total points
ID: 33564847
Yes printing has changed a lot from DOS to Windows, you typically have a driver handling the printing, you don't simply copy a txt to the lpt port anymore.

What you could try is use the generic/textonly printer driver, first go to the control panel, printers and install that printer if it isn't there already, if it's there go to it's properties and set it up to print to your network printer.

With it you can use ??? to print to the printer. Eg you could do ??? FILETOSTR("...outfile.txt")

Bye, Olaf.

0
 
LVL 30

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 444 total points
ID: 33564866
After the printer is prepared and before using ??? you SET PRINTER TO NAME "Generic / Text Only"

Bye, Olaf.
0
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 444 total points
ID: 33564900
I have a Laserjet 4 Plus and there is no USB available for the printer so you must be using an adapter.  You would have a better chance (still small) of getting to the printer if you have the Jet-Direct network card for it.  Unfortunately that could slug down your network if connected to the main network because it is a 10-BaseT interface.  I do have my printer on both the network interface and parallel interface on an XP computer and I am able to print over the network to it from my Windows 3.11 computer which is essentially DOS with networking.

Try printing straight text to your printer.  PCL codes probably won't go thru except it might print them instead of execute them.
0
 
LVL 2

Assisted Solution

by:FEOX
FEOX earned 440 total points
ID: 33566116
Try adding using this code:
** SELECT PRINTER:
  =SYS(1037)

  ** PRINT:
  ??? contrac1.txt
  ??? crtinvce.pcl
  ??? outfile.txt
  EJECT

Open in new window

0
 
LVL 2

Assisted Solution

by:FEOX
FEOX earned 440 total points
ID: 33566152
Sometimes, if special characters exists in the files to print, you may need to convert them from Windows to DOS codepage:

  ** SELECT PRINTER:
  =SYS(1037)

  ** PRINT CONVERTED CODE PAGE:
  PRIVATE n_WIN,n_DOS
  n_WIN = CPCURRENT()
  n_DOS = 437
  ??? CPCONVERT(n_WIN,n_DOS,contrac1.txt)
  ??? CPCONVERT(n_WIN,n_DOS,crtinvce.pcl)
  ??? CPCONVERT(n_WIN,n_DOS,outfile.txt)
  EJECT

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question