Acucobol
Yes, I've read the flame wars that have appeared in just about every comp.* newsgroup about COBOL. They are irrelevant to this article. In evaluating Acucobol as a product, I'm interested in whether the statements:
move 2 to x. add 3 to x.
produce a value of five, not whether it's better or worse to code:
x = 2; x += 3:
I used Acucobol in an SCO Xenix environment in a previous job. I was happy with the product, so all I had to do to evaluate the Linux version was make sure that it works as well as the Xenix one.
Like most commercial products currently available for Linux, Acucobol has been ported to a large number of platforms. Acucobol goes a step further. The Acucobol compiler actually translates the COBOL source into a “b-code” file. When you execute an Acucobol program, you actually run a b-code interpreter. It's no problem for a program compiled on one sort of machine to be executed on any other machine that runs Acucobol. You can compile programs on Linux and run them on Sun workstations, Vaxen, or even MS-DOS or Windows NT. (Yes, Acucobol is smart enough to convert / characters in paths to \. I'm not sure what happens when a component of the path is longer than eight characters, however.)
If your last exposure to COBOL was in a mainframe, batch processing environment, you will see some major differences. Acucobol is not very fussy about which column statements begin in. There are some significant new language features. One that I particularly like is the EVALUATE statement, which is similar to the switch statement in C. There are also a lot more places where an ELSE statement can be used. It's possible to reference substrings using what is known in COBOL as “reference modification”; the form is data-name (leftmost-position: length). The SCREEN SECTION, the windowing capability, and the ability for an ACCEPT statement to bring in an entire screen of data are Acucobol extensions. It's even possible to reference “embedded procedures” within the screen section.
Another new feature is a subprogram named W$MENU. Older versions of Acucobol came with a subprogram named MENUBAR. It was written entirely in COBOL and worked very nicely. W$MENU has all of MENUBAR's capabilities, except one. W$MENU is designed so that your menus are always activated by a hot key. Suppose you want the menu to appear whenever your program requires a menu choice The only way I could figure out to do it was to call another built-in subprogram, W$KEYBUF, which stuffs the input buffer. I used W$KEYBUF to stuff the hot key into the input buffer, and the menu appeared. (Acucobol Inc. has promised to provide a cleaner way of doing this in the future.) W$MENU is complemented by a rudimentary menu generator; it's batch, not interactive.
It's possible to develop C functions that can be called by Acucobol, and the manual does a good job of explaining how to do this. The only problem is, the functions must be linked into the b-code interpreter.
Acucobol uses neither termcap nor terminfo. Instead, it uses a file named a_termcap, which you would normally install in the /etc directory. The supplied a_termcap file contains an xterm entry, but this entry had no color or graphics support. I was able to create a color xterm entry by cannibalizing other a_termcap entries. It ended up looking like this:
xterm-c|color xterm:\
:GO=\E(0:GF=\E(B:GM=qxlkmjvtwun:VB:\
:C1=\E[30m:C2=\E[34m:C3=\E[32m:\
:C4=\E[36m:C5=\E[31m:C6=\E[35m:\
:C7=\E[33m:C8=\E[37m:\
:B1=\E[40m:B2=\E[44m:B3=\E[42m:\
:B4=\E[46m:B5=\E[41m:B6=\E[45m:\
:B7=\E[43m:B8=\E[47m:UL@:RU@:tc=xterm:
Acucobol comes with a reference manual and a user's guide. They are both loose-leaf and about 1,000 pages apiece. The manuals are used for all Acucobol implementations, including Unix, MS-DOS, and VMS.
Like any other COBOL implementation, Acucobol supports sequential, indexed, and “relative” (direct-access) files. Acucobol's indexed file system is called Vision, which is proprietary to Acucobol. Vision files have keys and data combined into a single file, and the index structure is b-tree. Vision is efficient and reliable. The only problem is that if you want non-Acucobol programs to access Vision files, you will have to buy a license from Acucobol Inc. A more interesting solution is an Acucobol add-on called “Plug and Play”. It works like this: All COBOL ISAM statements (READ NEXT, START, etc.) are mapped into a dispatch table. In the standard Acucobol run-time, the table entries point to Vision functions. You can replace this table with a different one, so that the table entries point to D-ISAM or Codebase functions. I have an evaluation copy of Codebase (the subject of my next review) on my desk, so I plan to actually try this.
Acucobol should be capable of compiling and running any standard-compliant COBOL program. However, unless the program has no user interface whatsoever, you're probably going to want to do some conversion work. In particular, Acucobol has an RM/COBOL compatibility mode. It works perfectly well, but my experience has been that it's still better to rearrange the way in which data is displayed on and accepted from terminal screens, because Acucobol allows you to do this in a less tedious fashion.
There's a substantial pile of application software and add-ons available for Acucobol. Two worth mentioning are the MCBA and Real World accounting packages.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




3 hours 53 min ago
4 hours 11 min ago
6 hours 4 min ago
7 hours 57 min ago
14 hours 51 min ago
15 hours 7 min ago
16 hours 59 min ago
22 hours 50 min ago
1 day 3 hours ago
1 day 3 hours ago