Inside COBOL #10
Shawn M. Gordon
President S.M.Gordon & Associates
How about a “State of the Union” for COBOL this month? Well, here is what I know, and it is pretty hot at the moment, but it might be old news by the time you read this. As you know, HP has two different COBOL’s, one for MPE/V and one for MPE/iX. What you may not know is that HP’s COBOL for HP-UX is MicroFocus Cobol. Apparently HP and MicroFocus are going to bring MicroFocus COBOL to the MPE/iX and eventually unify it with HP’s COBOL.
Although HP did add the ’89 ANSI addendum to COBOL and implemented MACROS (which no other COBOL has), they have a very weak implementation of COBOL. You wouldn’t believe the options on the DISPLAY statement in ANSI COBOL. Not to mention that there is a SCREENS, REPORTS, and COMMUNICATION sections to help facilitate all those day to day operations you do in COBOL. It’s funny how COBOL is the most widely used programming language, but has almost no productivity tools available. One of the things I am going to talk about this month is some various tools that are available.
From what I understand there is a 90 or 92 COBOL standard that the ANSI committee has approved. I don’t understand why we haven’t seen anything yet for this standard. Also the Object Oriented version probably won’t be approved until ’97 if I heard correctly. This is kind of ridiculous since there is no ANSI standard for C++ but the vendors seem to be doing fine keeping a standard in this Object Oriented language. I hope some company has the vision to just doit and get something out there so all of us productive COBOL coders can start writing for MS Windows and all these other platforms.
Can you imagine a product like Microsofts Visual Basic but for COBOL, that only cost about $200? They would sell millions of them, but as it stands today it costs $1,000 just to get a Cobol compiler on a PC, and it usually isn’t a very robust environment.
I can buy Borlands Turbo C++ for Windows for about $70, and have a pretty darn decent environment. I think the COBOL companies are really missing out on this one, if anyone is interested in developing a portable COBOL compiler for Windows, let me know, I would be happy to help.
For those of you looking for COBOL compilers on other platforms, here is what I know and what to look out for. Microfocus runs on a lot of different platforms including UNIX, and DOS. The last version that I got my hands on in the middle of ’93 looked like absolute garbage, I thought I was back on an IBM series 36 writing RPG code from the way it looked. However these are the guys that are spearheading COOL (Cobol Object Oriented Language), and actually have an alpha version floating around if I understand correctly. My experience with them has never been good and the run time price for selling code that you have written in there compiler is the most expensive around (at least when I looked into it).
Liant makes RM Cobol, which I know very little about, but they seem to be working towards, or have, an MS Windows version available. Theirs is the second most expensive run time I have seen, their sales people weren’t to nice either.
Acucobol seems to be sort of the new kid on the block, but they are extremely aggressive. They run on something like 400 different platforms including NeXT. I had a copy of this for UNIX and was never able to get the demo to run right and the support was so slow that I finally gave up after 6 months. Everyone there was very nice, and they apologized the crappy support. They also seem to have an MS Windows product available, maybe I will look at that next. Their run time was the cheapest of the three so far.
Visual Cobol from, I believe, MBP was by far the most expensive to buy, but they had no run time prices involved. I am not sure why it is called Visual Cobol, because it isn’t anything like a Visual Basic or Visual C++. This is a tough one to demo because they want you to buy it (about 8k) and then you get like a 30 day money back.
Those are the ones that I know about, now what about generic tools that you can use? I will tell you about a few that are on the HP specifically for the HP and then some others on the PC, some are commercial products and some can be found as Shareware.
For code generation or high level tools, the only thing I know of on the HP is PROTOS, which is essentially a 4GL, but it generates COBOL code that will then get compiled. I have never used this product, but I have heard good things about it.
Software Research Northwest has a product called WingSpan that allows you to develop a very sophisticated psuedo-windowing interface on a regular HP terminal. What is interesting is that this interface is based on the UNIX interface standard ‘curses’. This interface is portable across MPE, DOS and UNIX (maybe even more). It can be used specifically for COBOL, and can also be used with C. It’s a fascinating product that will let you make a dynamite looking program, but there is definitely a learning curve involved.
There is the CSL program COBGEN that I have been using for years. This will generate all the default information for you in a COBOL program, and prompt for the optional pieces of data. What is really nice is that you can then point it at a data base and it will generate all of your record layouts for you. I use this a lot for generating COPYLIB members for a new data base. The version that DISC has been floating around has options for SUPRTOOL and Omnidex routines as well. This is really worth getting.
The CSL has some other nifty little tools as well, one that I used to use would allow you to sort a table in memory without having to write the table to a file and then sorting it. I didn’t see any performance difference with this, but it did save the coding time. It’s worth taking a close look at the Interex CSL tape index to see what might be available. It’s also worth taking a little time and trying them out.
I just got a little demo disc from a company called SINC that makes a product called FLEXGEN. It is sort of a high level productivity, 4GL tool for COBOL. It is kind of like PROTOS from what I can tell, except it isn’t an HP product. It has support for generating code for MicroFocus, Acucobol, RM Cobol, and Visual Cobol. The demo I had looked pretty interesting, but it didn’t have an option to generate code so I wasn’t able to look at the output.
For source level debugging I have used TRAX from CCS, and this is one dynamite must have product for anyone developing COBOL code. I really can’t say enough good about how powerful this product is for debugging. There was a review of it written in early ’93 for Interact by Joe Cygan, you should try to check it out. There is also Toolset from HP, but I have gotten it to work, I know other people that use it however.
Along the maintenance train of thought there is also VistaRef and VistaMap from Vista Data Systems, I reviewed these products in the July or August 94 issue of Interact. These products will generate a source listing with a cross reference of what lines modify or reference variables. It is bi-directional and quite useful, not to mention inexpensive (under $1,000). They say they may even be adding an option to generate a hierarchy list of called paragraphs. This product is real handy for getting into someone else’s code, or code that you haven’t looked at in a while. There is a nice little callable routine called NEATER that will align things like PIC and VALUE statements. It’s a nice little addition.
The Cobol Ferret is a really neat little product that will examine and report all sorts of information on Cobol code. Terry Blakenship wrote a review around the middle of 93 on it for Interact magazine. The product resides on the PC and supports both HP Cobol and ANSI Cobol, there are all sorts of options for tracing down information. As I recall, this product was very inexpensive as well, worth checking out.
A little PC DOS Shareware program I got my hands on called COSTAR is pretty nice too. What it does is scan through your source code and align all your PIC and VALUE statements, as well as resequencing your level numbers in record layouts.It will also abbreviate all statements that are abbreviatable. In the PROCEDURE DIVISION you can have it align all your IF, ELSE, PERFORM type statements, as well as add properly incremented sequence numbers to your paragraph names. For $20 bucks it’s not a bad deal.
COBOL*EXPRESS is an MS Windows based Shareware product that is sort of a whole development, maintenance environment. It does statement finishing, analyzes reserved words, gives you little windows that show statements in each of the divisions, as well as by category. You can then click on a word, which could be a paragraph name or verb, and the source window will jump to that point. It’s a pretty neat little program, and by ordering it they will through in a Hypertext manual on the ANSI-85 COBOL language. The only real problem is that it is geared towards Microfocus, VAX/VMS, IBM COBOL II, and UNISYS. Maybe if enough HP people ask for it we could get specific support for our environment. Of course if MicroFocus is going to be on the HP 3000 it may not matter at all.
Model Maker is a PC based product that I reviewed sometime in ’93 that allows you to create ‘Model’s of code. Then under Microsoft Windows you can basically draw a screen or report and the code will be generated for you. There are basic models that you can get with the product for writing reports, on-line screens using V/PLUS, Menu’s, and JCL. The interesting thing about this product is that it isn’t limited to HP Cobol, and it isn’t limited to the available models, you can write your own for any language and any platform. The product is from Programmers Tool Shed.
Those are all the tools that I knew about or could think of, that seemed to apply to us HP COBOL people without going overboard on every single little program that is available. The only other thing to really say on this whole subject of the COBOL environment is to join SIG-COBOL. They are working hard at getting HP and MicroFocus to listen to their ideas and are working towards having some influence over the labs as SIG-IMAGE has managed to do. The morevoices that are involved the stronger the influence. You can get the information on the SIG and how to join from Interex, I know they will be happy to help. This is the time for the next COBOL revolution/evolution, so get out there and let your voice be heard. How many of you want to be sitting there learning a new operating system AND a new language in a couple of years?
Just to make sure that I include some COBOL code every month, here is a little bonus for you. If you are like me I store all my dates in YYMMDD format, but users like to see them on their reports in MM/DD/YY format. It is sort of tedious to do this, so here is a little macro to do it for you;
01 IN-DATE PIC X(06) VALUE SPACES. 01 OUT-DATE PIC X(08) VALUE SPACES. $DEFINE %FMTDATE= MOVE "/" TO !2(3:1) !2(6:1) MOVE !1(1:2) TO !2(7:2) MOVE !1(3:2) TO !2(1:2) MOVE !1(5:2) TO !2(4:2)# %FMTDATE(IN-DATE#,OUT-DATE#).
At least with my State of the Union, I don’t have to let an opposing party say anything. Until next time, PERFORM UNTIL END-OF-WORK-DAY.