Hacker News new | ask | show | jobs
by tolle 2473 days ago
I've done COBOL based web stuff on the IBM i/AS400. Nothing particularly tricky about it, wouldn't really recommend it for anything super complex. But it's less of a hassle then the various "tools" that's ment to make it easier, which always have horrible browser based configuration interfaces and stupid limitations. Just point Apache to a binary, read environmental variables and print to stdout. Using it doesn't really make sense as such, but developers who only know COBOL can just write regular programs and be done with it.
2 comments

> But it's less of a hassle than the various "tools" [...] which always have horrible browser based configuration interfaces and stupid limitations.

Can you share what exact "tools" you are talking about?

Well, tools is probably not the right wording. But solutions for making systems accessible over web APIs. There's usually in-house solutions. But IBMs own, "IWS"(https://www.ibm.com/support/pages/integrated-web-services-ib...), is probably the main one I've heard of. I can't really remember all the solutions to serve up html pages.

It works. You pass stuff in and out through what would best be described as ARGV. Some Java middleware and so on analyzes the program to determine the amount, name and length of in and out variabels.

The process is that you choose to deploy a service, choose between SOAP and "REST" and point to your program. You then get to specify the resource name, description and a regexp for your path. The resource name becomes a part of the URL. You then specify which variables are input and which are output. And after that assign some generic settings and choose which variabels are sent in as a part of the path and not and so on.

Works sorta nice. Some drawbacks are that you'll still need to add rewrite rules to get actual restful URLs, since the URL of your service will be along the lines of http://example.com/web/services/<resource name/<your regexp>. If your program is written in COBOL instead of RPG, all variable names will be in all cap. There's a max size to how much data you can send in or return that's not super small, but around a few MB unless my memory fails me.

I mean it's almost there, just not really good if you ask me. It could use some love. Also anything you're unsure of results in you having to dig into the hell hole that is IBMs website. Not exactly made easier by some buffoon naming the platform as such into a three letter name of one of the worlds biggest companies followed by a space and a single letter. So google is worse than useless.

I've found most in-house solutions to be more reliable.

Interesting. I've used PHP on the IBM i Series, for the sake of not using COBOL or RPG (...or C, or C++ - since I'm most familiar with PHP).

I think it really does just come down to what language you're most familiar with.