COBOL on the Web....HELP! 
Author Message
 COBOL on the Web....HELP!

I want to write a script in COBOL that updates files.  I want to
create a web page on the internet, have the user fill out a form, and
then when the submit button is clicked, execute a script written in
COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
but I do know how to code the heck out of COBOL.  What are the tools I
need to do this with?  Most likely my page and script will reside on a
Linux server.  I've been looking at Net Express but it doesn't say it
supports the Linux platform. Would ACUCOBOL be a better choice?

I'm a newbie to writing any kind of script for the web...I have a
basic knowledge of HTML.  What do I need to keep in mind as far as
selecting a server for my page and COBOL script.  Does the server have
to have any special software to run the COBOL script or can I compile
it on my pc and then simply move the executable out to a cgi-bin to be
able to execute?  


Thanks a lot,

KN.



Sat, 17 Apr 2004 09:43:53 GMT  
 COBOL on the Web....HELP!
I would like to do the same thing, but the biggest inpediment is that the
Cobol runtime must be installed on the server.  If you can find a server
that has or will install the runtime for the cobol of your choice, then
their are lots of choices from there on in ...
Quote:

> I want to write a script in COBOL that updates files.  I want to
> create a web page on the internet, have the user fill out a form, and
> then when the submit button is clicked, execute a script written in
> COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
> but I do know how to code the heck out of COBOL.  What are the tools I
> need to do this with?  Most likely my page and script will reside on a
> Linux server.  I've been looking at Net Express but it doesn't say it
> supports the Linux platform. Would ACUCOBOL be a better choice?

> I'm a newbie to writing any kind of script for the web...I have a
> basic knowledge of HTML.  What do I need to keep in mind as far as
> selecting a server for my page and COBOL script.  Does the server have
> to have any special software to run the COBOL script or can I compile
> it on my pc and then simply move the executable out to a cgi-bin to be
> able to execute?


> Thanks a lot,

> KN.



Sat, 17 Apr 2004 10:55:40 GMT  
 COBOL on the Web....HELP!
On Mon, 29 Oct 2001 21:55:40 -0500, "Donald Tees"

Quote:

>I would like to do the same thing, but the biggest inpediment is that the
>Cobol runtime must be installed on the server.  If you can find a server
>that has or will install the runtime for the cobol of your choice, then
>their are lots of choices from there on in ...

Thanks for your reply.  

So what is so tough about getting a server to install the cobol
runtime of your choice?   Is it simply not cost effective for the
server to install it?



Sat, 17 Apr 2004 13:04:44 GMT  
 COBOL on the Web....HELP!

Quote:

> I want to write a script in COBOL that updates files.  I want to
> create a web page on the internet, have the user fill out a form, and
> then when the submit button is clicked, execute a script written in
> COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
> but I do know how to code the heck out of COBOL.  What are the tools I
> need to do this with?  Most likely my page and script will reside on a
> Linux server.  I've been looking at Net Express but it doesn't say it
> supports the Linux platform. Would ACUCOBOL be a better choice?

Did you try PERCobol from LegacyJ (www.legacyj.com)?


Sat, 17 Apr 2004 14:51:06 GMT  
 COBOL on the Web....HELP!

Quote:

>> I want to write a script in COBOL that updates files.  I want to
>> create a web page on the internet, have the user fill out a form, and
>> then when the submit button is clicked, execute a script written in
>> COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
>> but I do know how to code the heck out of COBOL.  What are the tools I
>> need to do this with?  Most likely my page and script will reside on a
>> Linux server.  I've been looking at Net Express but it doesn't say it
>> supports the Linux platform. Would ACUCOBOL be a better choice?

>Did you try PERCobol from LegacyJ (www.legacyj.com)?

 No, actually I just found out about that today....maybe that's the
answer I'm looking for. thanx


Sat, 17 Apr 2004 15:09:00 GMT  
 COBOL on the Web....HELP!

Quote:

> On Mon, 29 Oct 2001 21:55:40 -0500, "Donald Tees"

> >I would like to do the same thing, but the biggest inpediment is that the
> >Cobol runtime must be installed on the server.  If you can find a server
> >that has or will install the runtime for the cobol of your choice, then
> >their are lots of choices from there on in ...

> Thanks for your reply.

> So what is so tough about getting a server to install the cobol
> runtime of your choice?   Is it simply not cost effective for the
> server to install it?

The biggies, like bell, will just look at you with a stupid look ... the
people that sell the service do not even know what country the actual server
is in. Trying to make them understand you cannot install it from your PC can
take a few days.  Once they get over that hurdle, they will start talking
about the funding for the consultants they will need for security, etc.,
etc., etc.   Think in terms of money that will fund a T1 line ...


Sat, 17 Apr 2004 19:40:33 GMT  
 COBOL on the Web....HELP!

Quote:

> So what is so tough about getting a server to install the cobol
> runtime of your choice?   Is it simply not cost effective for the
> server to install it?

PS to that last.

While it is obviously not an impossible task to find a server with a variety
of Cobol installed on it, or to find a company in the web service business
that will install a Cobol run time,  it tends to be a huge expense compared
to the amount charged for a server that has Java on it.

If Cobol is going to become "easy" on the net, we need servers that Cobol
programmers can use for small test sites and personal sites.  That will
allow the ordinary programmer to play a bit, do some testing, and even
(heaven forbid) put some free cobol code out that the rest of us can learn
from. I would be quite delighted to write some free library routines that
could be plugged into a web site, and make the Cobol code public domain.

That said, there are likely people in this NG that have the resources to do
just that, and could probably make a buck off it.  So people, does anybody
have a "cobol ready" server that they are willing to rent web space on, at a
rate suitable for a personal web page?



Sat, 17 Apr 2004 20:00:47 GMT  
 COBOL on the Web....HELP!

Quote:

>Did you try PERCobol from LegacyJ (www.legacyj.com)?

Looking at that right now.  There seems to be a educational tool and
an enterprise tool. The price difference is astronomical.
I'm guessing the enterprise tool allows you to code in a production
environment and that is why it's so expensive?  Can someone explain to
me in simple terms why the cost difference is so vast?  The cost of
these packages that I've looked at would seem to be killing cobol. No
wonder C programmers hate cobol so much.


Sat, 17 Apr 2004 22:16:18 GMT  
 COBOL on the Web....HELP!
KN,

Have you looked at RM/COBOL:

http://www.liant.com/products/cobolcgi/

Linux is a supported platform.

-Rob

Quote:

>I want to write a script in COBOL that updates files.  I want to
>create a web page on the internet, have the user fill out a form, and
>then when the submit button is clicked, execute a script written in
>COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
>but I do know how to code the heck out of COBOL.  What are the tools I
>need to do this with?  Most likely my page and script will reside on a
>Linux server.  I've been looking at Net Express but it doesn't say it
>supports the Linux platform. Would ACUCOBOL be a better choice?

>I'm a newbie to writing any kind of script for the web...I have a
>basic knowledge of HTML.  What do I need to keep in mind as far as
>selecting a server for my page and COBOL script.  Does the server have
>to have any special software to run the COBOL script or can I compile
>it on my pc and then simply move the executable out to a cgi-bin to be
>able to execute?


>Thanks a lot,

>KN.



Sat, 17 Apr 2004 22:45:37 GMT  
 COBOL on the Web....HELP!
If what you need to do isn't that difficult, just 'buck up' and learn Java.
You can probably learn what you need within two weeks and its guaranteed
that
the server will support Java.

Check these links:
http://www.michael-thomas.com/java/javahotsites.htm
http://www.apl.jhu.edu/~hall/java/
http://ariel.minilab.bdeb.qc.ca/docs/java/secrets_examples/


Quote:
> KN,

> Have you looked at RM/COBOL:

> http://www.liant.com/products/cobolcgi/

> Linux is a supported platform.

> -Rob


> >I want to write a script in COBOL that updates files.  I want to
> >create a web page on the internet, have the user fill out a form, and
> >then when the submit button is clicked, execute a script written in
> >COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
> >but I do know how to code the heck out of COBOL.  What are the tools I
> >need to do this with?  Most likely my page and script will reside on a
> >Linux server.  I've been looking at Net Express but it doesn't say it
> >supports the Linux platform. Would ACUCOBOL be a better choice?

> >I'm a newbie to writing any kind of script for the web...I have a
> >basic knowledge of HTML.  What do I need to keep in mind as far as
> >selecting a server for my page and COBOL script.  Does the server have
> >to have any special software to run the COBOL script or can I compile
> >it on my pc and then simply move the executable out to a cgi-bin to be
> >able to execute?


> >Thanks a lot,

> >KN.



Sun, 18 Apr 2004 00:23:22 GMT  
 COBOL on the Web....HELP!
No it is not guarenteed.  One site I maintain is hosted on FreeBSD with Java
prohibited - you must use Perl or Pyton or C for scripting.


Quote:

>If what you need to do isn't that difficult, just 'buck up' and learn Java.
>You can probably learn what you need within two weeks and its guaranteed
>that
>the server will support Java.

>Check these links:
>http://www.michael-thomas.com/java/javahotsites.htm
>http://www.apl.jhu.edu/~hall/java/
>http://ariel.minilab.bdeb.qc.ca/docs/java/secrets_examples/



>> KN,

>> Have you looked at RM/COBOL:

>> http://www.liant.com/products/cobolcgi/

>> Linux is a supported platform.

>> -Rob


>> >I want to write a script in COBOL that updates files.  I want to
>> >create a web page on the internet, have the user fill out a form, and
>> >then when the submit button is clicked, execute a script written in
>> >COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
>> >but I do know how to code the heck out of COBOL.  What are the tools I
>> >need to do this with?  Most likely my page and script will reside on a
>> >Linux server.  I've been looking at Net Express but it doesn't say it
>> >supports the Linux platform. Would ACUCOBOL be a better choice?

>> >I'm a newbie to writing any kind of script for the web...I have a
>> >basic knowledge of HTML.  What do I need to keep in mind as far as
>> >selecting a server for my page and COBOL script.  Does the server have
>> >to have any special software to run the COBOL script or can I compile
>> >it on my pc and then simply move the executable out to a cgi-bin to be
>> >able to execute?


>> >Thanks a lot,

>> >KN.



Sun, 18 Apr 2004 01:36:40 GMT  
 COBOL on the Web....HELP!

Quote:

> > I want to write a script in COBOL that updates files.  I want to
> > create a web page on the internet, have the user fill out a form, and
> > then when the submit button is clicked, execute a script written in
> > COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
> > but I do know how to code the heck out of COBOL.  What are the tools I
> > need to do this with?  Most likely my page and script will reside on a
> > Linux server.  I've been looking at Net Express but it doesn't say it
> > supports the Linux platform. Would ACUCOBOL be a better choice?

Using standard CGI is relatively simple to get Cobol to do this.  Input
to the program is via environment variables (for a GET) and standard
input (for a POST). So the program needs to do some DISPLAY name UPON
ENVIRONMENT-NAME / ACCEPT value FROM ENVIRONMENT-VALUE and then a ACCEPT
FROM CONSOLE that will read the correct number of characters from
standard input.

To output the HTML it needs to DISPLAY UPON CONSOLE to standard output.
I don't directly output HTML from the application module but build a
table of data and names and merge this into an an HTML template file
with a called module.  This gives flexability to the output without
having to rewrite.  

There are commercial modules that you can buy to do this, but it just
isn't very hard and the commercial stuff can be restricting on what it
works with.

Quote:
> > I'm a newbie to writing any kind of script for the web...I have a
> > basic knowledge of HTML.  What do I need to keep in mind as far as
> > selecting a server for my page and COBOL script.  Does the server have
> > to have any special software to run the COBOL script or can I compile
> > it on my pc and then simply move the executable out to a cgi-bin to be
> > able to execute?

You will need a run-time for each machine that the program runs on.  For
MF this is OCSD (?) Cobol 4.1 application server.  It is compatible with
NetExpress so it should be possible to write on one system and deploy to
the other.  With my CGI stuff I have it running with Windows/Xitami,
Linux/Apache, OS/2/Xitami and a Multiuser-DOS based system from 99% one
set of source (about 100 lines different for Windows).  Some differences
are also sorted out at run-time but these are very minor.

If the CGI system is to do updates to live files then you will need to
use the same brand of Cobol to ensure compatability of file structures.
You will also need to worry about file sharing and locking if these run
on different platforms.  If you will work with extracts and later batch
updating then any Cobol (or even, say, Python, will do the job.

If you will have a high loading then CGI may not be enough.  With CGI
the program is loaded for each transaction and it must open files,
recover status information, process and close.  This does have a
significant overhead.  For high volume work you may need to have the
Cobol program resident with files open and have a mechanism for directly
interacting with the web server (there are several ways of doing this).
Design the program so that it can be made to work either way.

For example have a flag in W-S '01  Program-Active     PIC X VALUE
"N".'.  When you sucessfully initialise the module and open the files
set this to "Y" and check whether you need to initialise (open the
files) on each entry.  If the program has been reloaded for CGI then the
W-S value will be "N" and the files need reopening, if the program is
resident then this will be "Y" for the 2nd message.

Use Cookies and/or hidden fields for holding a key to a status file for
each user, you will be getting messages at random from several users and
not necessarily in exactly the sequence you want, they can press a back
button and re-send a previous message.  If the message is, say, an order
line, then this can cause duplicated entries.  If he had originally sent
quantity 1 and later resent quantity 2 from the same form (recovered
from the cache) is this to be two lines or a correction of the first ?
Using a hidden field in the form with a generated unique number will
allow you to determine whether it is a resend.  I ignore resends and
reply he has tried to do this, there is a proper procedure for amending
an order line or creating a new one.

When doing an order entry form I process each line one at a time (ie I
don't give them a form to fill in 20 products and quantities before
sending), in fact they can send after each field of the line so that
they can send just the product code and get details, product + order
qty, product + order qty + back order, etc until they set a 'complete'
check box for the line (or for the whole order).  This allows
interaction at the level the user determines.  There is nothing worse
then a completely 'blind' system that requires the whole form to be
filled out only to have it cleared for some trivial reason, nor is it
sensible to have every step an interaction because it can be slow.

Alternately look at SP/2 client-server.  This will run SP/2 screens over
the web, the same screens that can run locally under Linux (text mode
GUI) or Windows.



Sun, 18 Apr 2004 15:26:13 GMT  
 COBOL on the Web....HELP!
I have COBOL CGI code running for form input, as you describe, but I don't
update COBOL files; I use ODBC and SQL to update a server based RDB from my
COBOL CGI code. (In my case it is ACCESS as the server is a Windows
platform). I use Fujitsu COBOL 97 with a third party interface for Windows,
to implement the CGI code.

Don Tees raised some excellent points on the "objection" to using COBOL; a
COBOL RTS must be installed and most public ISPs are just not interested. I
hit the same wall Don has described when I first started doing this around 2
years ago.

The way I got round this was as follows:

1. Installed Personal Web Server on my development machine (It is free with
Win 98 and you'll find it in the "ADDons" directory of your Win 98 CD.)

2. Developed my application and tested it. PWS is an excellent tool to
facilitate this.

3. As my application needs ACCESS, the target server would be Windows based
anyway. (I don't know if it is now possible to run ACCESS on non-Windows
platforms, but I believe it wasn't when I first started doing this.) The
reason I mention this is because Fujitsu provide an ASAPI interface with
Version 5 COBOL and this allows multithreading on the Windows server, and
thereby overcomes most of the CGI overheads that were described elsewhere in
this thread. I am currently considering revising my application to use
ASAPI. The downside is that I am then tied to only windows platforms. (Mind
you, it doesn't stop the VB guys...<G>).

I have never tried running the same CGI code on a UNIX type server. In
theory, I would need to use the third party interface differently and simply
recompile.

Now, after reading Richard Plinston's post to this same thread, I would say
that Richard's solution is infinitely better. I know he is not enamoured of
Windows (or anything MicroSoft <G>) from his previous posts here, and I
believe that his solution is a very good one. It certainly covers more
platforms.

However, to get you started, and assuming you don't have "control" over the
server (which is what prompted Don's point) the CGI with PWS route is very
viable. I liked Richard's idea of avoiding the third party interface by
doing his own ACCEPT/DISPLAY directly to the appropriate ports, but this
would require detailed knowledge of the differences between Win CGI and
"other" CGI and, personally, I have neither the time nor inclination to get
into it. The interface is great; I just call it when I want to write HTML.
It came free with Fujitsu 4.2 but they have dropped it now.

I would echo Don's call for anyone with a COBOL oriented server to make
themselves known...<G> It's a bit ironic that I considered setting up just
such a server a few weeks ago, but I am still too mobile to make it viable
and I would've needed someone here who could re-boot it when necessary...<G>

Someone else in this thread suggested  "Learn Java" I would endorse that
(for your own personal development, if for nothing else <G>), and I do use
Java servlets as well as COBOL CGI.  There are not the same downsides of
requiring a COBOL RTS, but you still have to have a "Java friendly" ISP as
there are Java policy requirements for running the servlet.

Finally, we should be aware that the forthcoming .NET will remove the
requirement for a COBOL RTS. Intermediate code should be acceptable to the
server irrespective of what source language it was generated by... Hopefully
this will simplify the whole business. Fujitsu NetCOBOL will not require
specific connection to the CGI as far as I understand it, maybe it is
implicit... I don't know, as I haven't really examined NetCOBOL yet. (I plan
to do so after it is released). NetCOBOL will require OO knowledge as it is
based on OO COBOL.

Again, using NetCOBOL will require a Windows based server.

Many people will not be keen on this, and Richard's solution is therefore an
attractive one.

Pete.

Quote:

> I want to write a script in COBOL that updates files.  I want to
> create a web page on the internet, have the user fill out a form, and
> then when the submit button is clicked, execute a script written in
> COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
> but I do know how to code the heck out of COBOL.  What are the tools I
> need to do this with?  Most likely my page and script will reside on a
> Linux server.  I've been looking at Net Express but it doesn't say it
> supports the Linux platform. Would ACUCOBOL be a better choice?

> I'm a newbie to writing any kind of script for the web...I have a
> basic knowledge of HTML.  What do I need to keep in mind as far as
> selecting a server for my page and COBOL script.  Does the server have
> to have any special software to run the COBOL script or can I compile
> it on my pc and then simply move the executable out to a cgi-bin to be
> able to execute?


> Thanks a lot,

> KN.

-----=  Posted via Newsfeeds.Com, Uncensored Usenet News  =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
 Check out our new Unlimited Server. No Download or Time Limits!
-----==  Over 80,000 Newsgroups - 19 Different Servers!  ==-----


Sun, 18 Apr 2004 08:03:21 GMT  
 COBOL on the Web....HELP!
Acucobol supports Linux and has some built-in extensions for doing CGI.  I
normally compile Acucobol to their p-code (you would need a runtime on the
web server for that), but later versions of the compiler have options for
generating native binaries on some platforms.

You could also look at http://tinycobol.org/ for a free Cobol that you could
play around with.  It's not a full Cobol85 compiler, but might have enough
features for you to do the web side of things.

Quote:

> I want to write a script in COBOL that updates files.  I want to
> create a web page on the internet, have the user fill out a form, and
> then when the submit button is clicked, execute a script written in
> COBOL.  Why COBOL you ask.  Simply because I don't know Java or Perl
> but I do know how to code the heck out of COBOL.  What are the tools I
> need to do this with?  Most likely my page and script will reside on a
> Linux server.  I've been looking at Net Express but it doesn't say it
> supports the Linux platform. Would ACUCOBOL be a better choice?

> I'm a newbie to writing any kind of script for the web...I have a
> basic knowledge of HTML.  What do I need to keep in mind as far as
> selecting a server for my page and COBOL script.  Does the server have
> to have any special software to run the COBOL script or can I compile
> it on my pc and then simply move the executable out to a cgi-bin to be
> able to execute?


> Thanks a lot,

> KN.



Sun, 18 Apr 2004 09:55:50 GMT  
 COBOL on the Web....HELP!


Quote:
>If what you need to do isn't that difficult, just 'buck up' and learn Java.
>You can probably learn what you need within two weeks and its guaranteed
>that
>the server will support Java.

>Check these links:
>http://www.michael-thomas.com/java/javahotsites.htm
>http://www.apl.jhu.edu/~hall/java/
>http://ariel.minilab.bdeb.qc.ca/docs/java/secrets_examples/

I'm taking a Java course at the college (starting in January).


Sun, 18 Apr 2004 21:25:42 GMT  
 
 [ 23 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Help COBOL SP2 AND WEB CLIENT

2. HELP!!! any cobol resourses on the Web

3. WEB WEB WEB

4. help tiny-cobol compatablities with Microfocus personal Cobol

5. AS/400 Cobol trying to call an ILE Cobol function in a service progam - Please help

6. Help with Microfocus personal cobol and Microfocus Level II cobol

7. Help for a starting Cobol Student - PC Cobol Info

8. VS COBOL to COBOL II - Need Help

9. COBOL MAINFRAME + WEB DEVELOPERS/ CONTRACT/ NC

10. MF Cobol + Web (Netexpress 3.1)

11. Giving legacy cobol code a web interface

12. Cobol web language?

 

 
Powered by phpBB® Forum Software