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

Medicare Pricer Printing

Status
Not open for further replies.

medpcjockey

Technical User
Jan 24, 2007
11
0
0
US
I need a solution for a printing problem and have not been able to get Medicare assistance. Medicare has written their cobal application to print directly to lpt1, but it only works when hardware is attached to the parallel port. I've tried "net use lpt1: \\servername\printername" but the this has not been successful. If you try to print to a mapped printer the application does not output the print job until you close it or send a second print job. It is as if the print job is being held until another job pushes it through. Of course, If I attach a physical printer directly to the parallel port it prints the job right away without the need to send a second print job through. I am not a programmer and cannot modify the cobal appliction we use. Is there a program that will intercept the application calls and fool it into thinking that hardware is attached locally? Local printers are not part of our support model. I have tried all windows variations of setting up printers with no success. It is as if the cobal app was hardcoded to print only to locally attached hardware.

 
I think this is purely printing issues and not cobol. Please
tell us what system are you using, OS version etc. This might just be a simple network print setup on the profile. Have you check what is the printer setting in your PC(if using PC).

It's hard for us to second guess. My other guess is that it is really printing but it's somewhere. Please elaborate.
 
Actually, this might be something that can be solved from the COBOL end.

Can you tell us more about this particular application? Assuming it is running on Windows, what are the properties of the shortcut? What types of files (the 3-character extensions) in the directory that is indicated by the shortcut?

Tom Morrison
 
Go to the properties for the printer, and check out the spoolling options.
 
Thank you all for your ideas. I am working remotely today and will be sure to check each of your ideas when I get back into the office. Here are some answers to follow-up questions.

The application runs in Windows XP SP2. I have tried all each type of printer setup.
local port, tcp/ip port, lpt mapping, and a plain old mapped network printer. I have tried every possible combination of spooler settings, timeouts, etc. I have testing spoolers installed locally vs spoolers on the print server and even tried printing directly to the printer. I have spent 80 hours determining that the cobal application only likes locally attached hardware to the parallel port. There are no printer options in the application. If you want a report of what is on the screen you select r and it automatically prints to the local hardware regardless of your default windows printer setting. Despite running in windows, this is a text base application and with no advanced graphics. Keyboard input only.

I thought this could be resolved on the Cobal end as well and so I worked with my billing department to contact technical support at Medicare. Not only was it a challenge to find technical support, but several phone calls within 1 year to the Cobal programmer has yet to yeild a return call. Apparently they are not interested in making customer contact or modifications to their application. Every year a new version of the software comes out, but with the same limitations. Healthcare is very touchy about modifying any software, even in a non-patient care setting. I would not be given authorization to make any changes effecting the application integrity. But I could supplement the software to enhance functionality.

As for the application itself: It is a download from
The application is complete within the program directory and contains the following files. CVLDWINM.DLL, CBLDWINS.DLL, CBLINTS.DLL, CBLRTSS.DLL, PPCAL060.DLL, INCBS060.DAT, INDRG060.IDX, INDRG060.INX, INMDC060.IDX, INMDC060.INX, INPSF075.IDX, INPSF075.INX, PRICER06.EXE. The program folder also contains a zz.zip file with INDRG060.DAT, INDRV060.CBL, INMDC060.DAT, INPSF075.DAT, PPCAL060.CBL.
 
Okay, we know it is implemented in Micro Focus COBOL Net Express 3.1.

Can one set an environment variable named LPT1 to a filename and not use the printer? (Obviously I am not a Micro Focus expert. :-D )

Tom Morrison
 
set an environment variable named LPT1
I'd try dd_LPT1 too.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
You mention XP then lpt ports are only good if the printer is attached locally. For network printers you need to be able to map your profile to where the print server is. Ask your printer admin to add your profile to whatever network printer devices. Make the printer name(alias) as your default printer and retest your cobol program.
 
PHV - Is this a Windows XP environment variable? I am assuming that the value equals \\servername\printername.

jmanj - Never heard of mapping profiles to network printer devices. Printer admin doesn't understand the request either. Can't google the request. Do you mean, map the network printer to the profile? That's been done but it doesn't resolve the printing issues.
 
PHV - creating a windows env variable, lpt1=\\servername\printername had no effect.

MRREGAN - Thanks for the app suggestion. It didn't have any effect.

Any more ideas?
 
It sounds as though the file is hard-coded as "lpt1" or PRINTER, which is the exact equivalent in Micro Focus COBOL. The only way you might get around this is to us an old DOS TSR utility, PRN2FILE.COM, which captures output to the specified LPTn (1 is the default) and writes it to a file. Then you can use the PRINT command to copy the file to any Windows accessible printer. If you would like a copy of this utility, I can send it to you. I have recently converted to Windows XP and havn't tried it under that os yet, but I will do so immediately.
 
I have been told that there are "file printers" available that install as though on a parallel port but write the output to a file. That file can be then printed on any Windows printer.
 
I believe that this is a Windows XP limitation. A USER can NOT redirect LPT1 - period. An Admin Acct CAN redirect LPT1.
So one solution would be to have an Admin run the reports after redirecting the printer port, or you could try this: " which might provide a work around. I have not tried it and I don't know if your users have anything connected to LPT1.

(I've been reading Tek-Tips for years. You guys are great. This is only the second time I've been able to contribute anything. I hopes this helps).
 
mkozelka--You say an admin acct can redirect lpt1. I presume a home user has access to an admin account. How do I do it?
 
If you have a network, you can run a bat file with something like "net use lpt1: \\servername\printername", as mentioned in the first post. We used to do this when using an old DOS program that had a hard-coded LPT1. But when we switched to XP, the re-direct wouldn't work.
 
As an adiminstrator, I can redirect lpt1, but the program still acts as if I am printing to a network printer and does not output the print job unless I close the application or send a second print job through. That means that I am always behind 1 print job when printing to any printer not physically attached to the parallel port. Can any of the programmers out there download the program and tell me if this is something that can be changed in one of the dependent files?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top