HP3000-L Archives

March 2000, Week 1

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:
Doug Werth <[log in to unmask]>
Reply To:
Doug Werth <[log in to unmask]>
Date:
Thu, 2 Mar 2000 14:12:19 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
From: LaMont <[log in to unmask]> writes:

> I am just learning to using APACHE and want to use my COBOL skills and
> existing applications.
>
> I have use Lars Appel sample and madified it to get my processes to run
> okay.
>
> I noticed that there is also a sample cgi programs at
> http://jazz.external.hp.com/papers/cgi-paper/  that uses only the DISPLAY
> and ACCEPT verbs.  So I tried to do that.
>
> I couldn't get that to work.  Lars said it would work.
>
> So my question is.  Has anyone got a cgi using cobol to work?
> If so what did they do?

Absolutely! I have made Cobol based CGI applications work.

Keep in mind that the difficult part in using Cobol as a cgi language is not
in receiving the data from the web server. That part is actually very easy.
The hard part is decoding the data that comes from the server. Cobol is
somewhat limiting (to put it kindly) when it comes to parsing and string
manipulation.

The method I employed was to write a callable subroutine that would decode
the CGI data and bring it back as an array of field names and their values.
If you have done any perl cgi programming you will understand what I am
talking about. Even this method, however has many limitations. For one, the
array is of a fixed size so it can't be used for every browser based form
that you can design. But it works well for forms that have a small number
(less than 30) text boxes, radio buttons, etc.

This method is also transferable to other languages as well. Just yesterday
I helped a customer get a Business Basic cgi program to run, calling a Cobol
subroutine to decode the data from the URL.

Doug.

Doug Werth                             Beechglen Development Inc.
[log in to unmask]                               Cincinnati, Ohio

ATOM RSS1 RSS2