From: John C. <jo...@we...> - 2007-10-03 19:59:37
|
On Saturday 29 September 2007 01:27:37 am David Essex wrote: > John Culleton wrote: > > Has anyone used Tiny to generate a cgi-bin program? > > If so, what did you use on the html side, get, post, > > php, javascript, other? > > Yes, TC can be used to create a CGI program using basic ACCEPT and > DISPLAY statements. > One of the ways to do so, would be as follows. > > * Parse the query string > ACCEPT identifier-1 FROM ENVIRONMENT-VARIABLE "QUERY_STRING". > ... > UNSTRING identifier-1 DELIMITED BY '?' INTO ... > ... > UNSTRING identifier-2 DELIMITED BY '=' INTO ... > ... > * If a valid query, find and display data in HTML > * format to standard output > DISPLAY 'Content-type: text/html' WS-CR WS-LF WS-CR > DISPLAY '<!DOCTYPE html PUBLIC ... ' > ... > DISPLAY '<html><HEAD><title> ...' > ... > DISPLAY '</body> </HTML>' > > I have enclosed a sample application for a NA area code lookup, using > both a Perl and COBOL programs. > > Note that the NA area code database file (1) is NOT included, so no area > code data is displayed. > > Hope this helps. > > 1) Area codes > http://www.bennetyee.org/ucsd-pages/area.html This helps for local use on my Slack linux system. Thanks much. But my (rented) remote site is on Fedora Linux and the cobol part of your sample app errors off. I tried putting htcobrun in the remote cgi-bin but it still errors off. I made both htcobrun and the app program 777 (executable) for test purposes. I don't have access to /usr/local/bin remotely. Three possilbilities, all of which may be true: 1. htcobrun needs to be recompiled for the remote site on a Fedora system. 2. The program proper needs to be recompiled on a Fedora system. 3. The program is looking for htcobrun elsewhere and not finding it in the cgi-bin directory. Any idea which of these are true? I hate to go through the labor of setting up Fedora and recompiling everything if in fact it still isn't going to work. Assuming for the moment that the app program can't find the runtime system, how tough would it be to modify the compiler so that the compiled program looks in the current directory for the runtime? There is of course always Perl, php or javascript :<). But my native lannguage is COBOL. And the app will ultimately be large, G/L plus inventory plus .... -- John Culleton |