I have inherited a very old web based application that is written in C (not C++) with embedded SQL statements. This application runs on Unix (Solarix) and uses Oracle Gateway (CGI) to access DB2 tables on the Host (mainframe). It's considered Pro*C.

Problem:
There are 4 major programs that are compiled and linked together to create 1 executable, which resides in the /cgi-bin/appname/ file. These programs are called by a html page, that passes what I assume is a variable parameter to the executable. This parameter is to be read in by the executable, and based on the parameter, will dynamically create a new HTML page that includes additional variables passed from the previous HTML page.

The problem is that the code is looking for an existing html page, instead of passing the parameter to the executable for processing. The processing includes data validation from previous html page and database table updates to the Host DB2 tables.

This is one of the statements from the C executable that I believe works with another statement to send the parameter to the executable. It is coming from what is supposed to be a dynamically created HTML page, asking for confirmation of screen data. On confirming, the program is supposed to add the data to the tables and return to the home page:

(From C exe code)
if (mode == ASK_CONF) {
printf("<form name=\"addConfirm\" method=post action=\"%s/add\">\n", CGINAME);

(From dynamically created HTML code)
<form name="addConfirm" method=post action="/cgi-bin/exeName/add">

I hope this makes sense. I would appreciate any help with this that I can get. I am on an extremely short deadline/end-date to get this application up and running for testing.

Thank you!
Christie