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

execute vb program call from a unix program on a remote pc 1

Status
Not open for further replies.

rjstsas

MIS
Apr 28, 2003
22
US
I have a vb program called from a cobol program running on unix. I need the vb program to run on a remote server instead of the local users machine. Any suggestions?
 

I guess my last suggestion in thread222-738027 is not going to work for you???

So let me get this straight ...

Cobol program is running in the address space of the UNIX box or the local machine?

You want the vb program to use the address space of a centralized server to do its work. (Printing PDF's to its local printers?)

COM/DCOM

Good Luck

 
You got it ...because we are printing a whole directory of PDFs (could be as many as 100), we need a way to print a batch of PDF files quickly. If we just print using using reader, won't a new reader open for each PDF?

Hope was to use the APIs in the Standard version of Acrobat. The cobol program is the order entry process running on unix... the PDFs are the MSDS files requested by the customer. We have to print the order and MSDS files togeter. Cobol program creates a temp directory, fills it with the required PDF files and does a shell command to execute the vb program (if the vb program runs on the server where acrobat lives... all works great) and waits for VB program to delete one file in the temp directory. When the one file is gone, the cobol program deletes the temp directory and returns control to the user. Trying to minimize user impact and interaction. Each piece is working perfect.... just not together.
 
we created a bat file to run the VB program on the remote server. When tested on the remote server, it works fine. Using RCMD to execute the bat file from the locale computer gives us errors (482 print error for txt file printing and runtime error for adobe acrobat). What are we missing???
 

hmmm... not sure what you are missing. It may be the context that it is running in. Meaning does it have the rights to do these actions.

Look up COM/DCOM on the web or in almost any programming book that you have or even the help files for VB. This is what you may want to do.

You may also want to create a service on the server in question and have it configurable to look at the directory(ies) in question every so often (or use FindFirstChangeNotification or similar API, search this site for code by strongm I belive it was who posted it not too long ago) and if it finds files of the correct format (PDF) it knows what to do.

Good Luck

 
the BAT file runs the VB program that uses the Acrobat APIs.

We may have solved our problem with a $50 program on the web that will monitor the directory or run on a command line to print the PDFs and use Adobe reader instead of the Standard version of Adobe Acrobat. As a side note, I have had customer issues with Adobe for years. The reader version 4.0 had APIs for printing, but Adobe took them out to force their customer to buy a full version. Had a similar problem with them when I upgrade PCs and the had discontinued (did not know they discontinued it until I called) Type-On-Call and wanted us to pay for fonts we had already purchase again. Fortunately for us, there are ways around Adobe's marketing tactics.

Thanks for your help and advice.
 
Hi:

I'm attempting to do a similar task...monitor a folder and print incoming pdf. Was wondering what this final solution was?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top