HP3000-L Archives

June 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Wed, 20 Jun 2001 11:58:49 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
Peter Osborne <[log in to unmask]> wrote:
> I have a few questions about mod_fastcgi for anyone who has used it
before.
> First, We use CGI programs written in Cobol (based on Lars' examples from
way
> back). I'm wondering if these need to be modified to work under
mod_fastcgi?

Yes, you have to change your programs.  They need to be like this:

Initialiaze (open databases, etc)
loop
   call FCGI_accept
    if it returns <0, exit loop
    else
       normal CGI processing
 endloop

You have to link with the fastcgi development kit available (for free) at
fastcgi.com
It compiles with a few changes, which I can tell you about.

When I tried it out, I used FCGI_fwrite instead of DISPLAY to return HTML
output, but I think you could get DISPLAY to work if you know to which file
descriptor DISPLAY does its output.  I have some COBOL macros and C wrapper
routines to help out.  They are not production quality since I decided not
to go with fastcgi for now.  (Not because there's anything wrong with
fastcgi, but only because I had to send output to a Cold Fusion server at
our corporate office.)

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2