We have some Forms 6i applications that we still use. They contain various HOST (or webutil CLIENT_HOST) calls to implement various functions locally on the PC.

How would we migrate this to Formspider?

asked 28 Jul '15, 11:55

eraskin's gravatar image

accept rate: 0%

Hi Ersakin,

This depends on which calls you used in your application. For example, some of these procedures simply open the browser and show a web page. Converting this, is easy. Formspider has an API to open URL's, as well. So this is usually a one line replacement of the legacy code.

If you are using procedures to write to a file though, the approach should be different because a web application cannot write a file to any location on disk easily (unless you go out of your way and use some java applet or something). In such a scenario, it is better to create the file in the database and have the user download the file via a download button (or open in a separate tab in the browser). This is not very hard. What you need to do depend on what kind of document you want to create. If it is a simple text file, PL/SQL has API's to do that. If you want to create a Word, Excel or a PDF document, PL/SQL has libraries for those types of documents too. So you algorithm to create these documents do not need to change much but should be moved to the database and adjusted accordingly.

Which HOST (or webutil CLIENT_HOST) commands do you use in your application?

Kind Regards,


answered 28 Jul '15, 15:45

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
accept rate: 15%

Unfortunately, we run scripts locally on the client to handle processing for our jobs. For example, we receive files from companies all over the world. We have programs designed to convert them into a standard format. I execute the tool from a button on my interface. It is not a web document or a file to be uploaded/downloaded. It is actually a program to run.

I guess that the Oracle JVM in the database is the only real solution. I have to write Java code to execute my programs and call that from PL/SQL.

Is there a better solution?

(28 Jul '15, 15:49) eraskin

Hi Eraskin,

What programming language did you use to write these programs?

Kind Regards,

(28 Jul '15, 15:52) Yalim Gerger ♦♦

They are perl scripts and shell scripts that execute tools I either wrote or bought. One of the tools is in perl. The other is in COBOL (believe it or not).

(28 Jul '15, 15:54) eraskin

:-) One option is to move these programs to their own server (or the database server) and call them from PL/SQL. This might require some work but it's probably much less work than to re-write them in Java or PL/SQL. Would this help?

(28 Jul '15, 15:58) Yalim Gerger ♦♦

Sorry, that's what I meant. But you can't call programs on the server directly from PL/SQL as far as I know. You have to write Java code as an interface, then set the appropriate Java privileges for the executable files. Am I missing an easier method?

(28 Jul '15, 16:00) eraskin

Oh OK. Yes absolutely, I think this is a very good solution. This is not a lot of work at all.

I cannot think of an easier method but as an alternative method you can write a servlet (or a web service. it doesn't have to be in Java really, it could be anything with a URL.) and call this servlet from PL/SQL. This servlet would execute your code.

This is just another way of accomplishing the same thing. For this to work you need to set up an application server though which is not a big deal really. The server can be on the same machine as the database or on another machine. And the code must not be in Java. You could write it in any language you are comfortable with.

(28 Jul '15, 16:10) Yalim Gerger ♦♦

That is an option. Another one is to create a queue table of execution parameters and poll it from a background job to fire off commands. Easier for me to code than as web service. ;-)

Thanks for your advice.

(28 Jul '15, 17:08) eraskin
showing 5 of 7 show 2 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 28 Jul '15, 11:55

Seen: 4,147 times

Last updated: 28 Jul '15, 17:08

© Copyright Gerger 2017