Search This Blog

Tuesday, September 29, 2009

99 Bottles Of Beer In COBOL for .net

Robert was kind enough to let me post to this great blog - here is my first effort!

By: Alex Turner

You may or may not know that there is a fabulous website dedicated to the song 99 bottles of beer. The idea being to show how to print out the lyrics to this song in as many languages as possible. Traditional COBOL is OK at this, but I have to admit - a bit clunky. So, our team at Micro Focus spent a few minutes showing just how clean an implementation in COBOL for .net (and for that matter other managed environments - but that is another store) can be.

Well, today my submission (though a team effort) got accepted, here is the link to the 99 bottles website:

http://www.99-bottles-of-beer.net/language-micro-focus-cobol-for-.net-2173.html

Also, here is a link to a post discussing the concepts and giving some tweaks:

http://nerds-central.blogspot.com/2009/09/cobol-for-net-better-than-c-at.html

Wednesday, September 23, 2009

COBOL and Twitter?



A buddy of mine, Mike Bleistein, has created a COBOL routine to post tweets out in Twitterville.  Check out the video he created of it out on YouTube.  Once he posts the code for it somewhere out on the web, I'll point you to it.

Cool stuff huh?

Sunday, September 13, 2009

Where is COBOL being used today?

Through my job I get to see many different shops using various technologies in many different ways. It continues to amaze me how folks are using COBOL to run their business.

For instance, I've seen multiple shops using COBOL to process high volumes of payment transactions, medical claims, EDI transactions, loan approvals, shipping transactions, etc. But quite literally one of the "coolest" things I've seen was in a refrigerated warehouse.

The people in this sub zero degree environment have to wear cold weather gear, including gloves, and walk around pulling items from shelves for shipping. Their old process was to print out their pick list and begin going around the warehouse to fill up their bins. As they pulled the items, they would make notes on their paperwork as to quantities pulled, inventory counts, etc. Off and on came the gloves. It worked but it wasn't ideal.

Their IT department came up with a solution which allowed them to arm the warehouse workers with headsets and a handheld device. The handheld replaced their printouts and instead of writing, they spoke into the headset. Voice recognition software translated their responses and automatically updated the bill of lading, inventory quantities, etc by calling existing COBOL routines running on a backend server. The operators loved it and their efficiency went up exponentially. Slick stuff huh?

While the headsets and handheld devices were the new item in the mix, the fact they could tie into their existing COBOL applications saved them a ton of time and money to put this in place.

Another shop I visited did work with nuclear "things". I found in talking with them that the COBOL inventory management system was rather critical in determining what item sat on a shelf next to what item. If certain things were place incorrectly, it would result in a big flash of light and most of the eastern seaboard would go away. Talk about a high stress system to maintain! Imaging being the guy responsible for making a change to that COBOL application and then putting the changes into production. I'm thinking the old "I'll just test it in production approach" wasn't used much. *grin*

So, now your turn. What's the coolest thing you are doing or have you've seen someone do with COBOL?

Thursday, September 3, 2009

COBOL: It's Everywhere

The plethora of anti-COBOL articles on the web has prompted me to write this article. I have heard for years that ‘COBOL is dying’ or ‘COBOL will be dead soon’ and yet here it is 20 years later and guess what, COBOL is still going strong! I’ve been coding COBOL since roughly 1991 and have met quite a few COBOL developers over the years. I am now working for Micro Focus, the leading Enterprise Application Management and Modernization Company with over 1500 employees worldwide. While our mission has expanded significantly since our birth in 1976, our roots are firmly in the COBOL environment.

I know that’s not what some of you may want to hear but it’s true. COBOL is still doing the heavy lifting of the business world and will continue to do so for many, many more years to come. (I’m betting well into my non-existent grandchildren’s careers!)I’d like to discuss in this article why COBOL has continually received a less than equal opportunity in the market-place: Lack of knowledge as to what COBOL is, has become and can do. I’d like to address these issues one at a time.

What COBOL is
COBOL was originally developed in 1959 by Admiral Grace Hopper for the Department of Defense. It was the first language developed that enabled a person to utilize a ‘normal’ language style to create applications to run on a computer. Prior to that assembly language was the prevalent language utilized. COBOL, as you may know is an acronym for COmmon Business Oriented Language, the emphasis being on business. It is utilized in every industry around the globe from telecommunications, banking, finance, manufacturing, government, aerospace, security, and many more too numerous to mention. Micro Focus asked one reporter to live for one day without using COBOL and it couldn’t be done. It is everywhere. So why then does it receive such a bad reputation if it’s so widely used? One would think the prevalence of COBOL would make it quite popular. One of the main reasons is the environment in which a COBOL developer has to operate in. The majority of COBOL is found on mainframe based systems (IBM, Fujitsu, Hitachi, and DEC) that have a simple character based user interface (UI). Costs to maintain these systems are usually quite high and priority is given to the applications running the company, not the developers creating or maintaining them. So to add to a less than robust UI we have low priority which translates into long times to edit, compile, and test programming changes. All this means developers get frustrated and start looking for something other than mainframe (COBOL) based development, but they take their frustrations with them when they leave thus spreading the word that COBOL is a dead-end or brain-dead world. Nothing however can be further from the truth.

What COBOL has become
COBOL has grown significantly. Do you know it is the only computer language that has evolved through multiple standards? Over the year the ANSI Committee has continued to expand and refine the language through several different standards and continues to improve the language to keep up with the growing technology.

Does C, C++ or Java have a standard that compiler vendors have to adhere to? I seem to recall a recent analyst's review of languages which listed COBOL as "stable and mature" while Java and a few others were actually considered to be in a declining state. That is a trend that continues to occur with many of the "popular" languages out there, but not COBOL. COBOL has grown to match the needs of the business and is one of the most portable languages around. A program compiled on a mainframe can be, if no machine specific instructions are included in the code, moved to a Windows, Unix or Linux platform, recompiled and utilized for what it was intended to.

COBOL has evolved into a multifaceted tool that could be utilized for a number of solutions from web to web-services to client-server applications. However COBOL was intended to process large amounts of data in an efficient manner (efficient in CPU, memory and storage usage). COBOL was not designed to manage a UI. While it has evolved into a graphically capable interface there are other languages such as C# or VB.NET that were designed specifically to create the users interface. Why not leave COBOL to do the heavy lifting of the transaction and provide the answers to the questions the application is meant to answer? After all, it is the original COBOL that was developed by a business analyst to answer a specific business problem. Let COBOL continue to perform the job it’s been doing along, helping companies be profitable.

What COBOL can do
Web Services, web sites, code-behind, XML data read and write, client-server applications, data transformation, .NET integration, Java integration, Visual Studio.NET, Eclipse, recursive calls, pointers, arrays, bit level data manipulation, write once run anywhere, WPF, WCF, ASP.NET, 32-bit and 64-bit, ActiveX, ADO.NET, Assemblies, Call the Windows API, CGI, COM, CORBA, DBCS, dynamic linking, file conversion, floating point, HTML, ISAPI, memory management, mouse manipulation, multi-threading, National Locale Support, Object Oriented, ODBC, OLE, parsing, spawn processes, SQL – DB2, Informix, ODBC, Oracle, SQL Server, Sybase, UDB, stored procedures, Unicode support, XML formatting and parsing to name a few.

Is there something not mentioned above? Let us know and we’ll probably be able to provide an example.

Dead?
A recent blog post I’ve seen claims COBOL is “…so very, very dead.” I think that is still 30 years away at least from being true. As long as smart decision makers look at the options and take the lowest risk, highest return approach by letting COBOL do the job for which is was intended (high volume processing of data to pay the bills and keep the world running), COBOL will be around a long time. Don’t bash it, don’t underestimate it. Embrace it and use it for what it was intended to do, getting high volume business processing done!

Happy Coding!

Wednesday, August 26, 2009

Guess I better introduce myself...

Now that I've posted a couple of items here I realized I haven't introduced myself. My apologies for the oversight. My name is Rick Malek and I'm a Solutions Engineer with Micro Focus and a COBOL bigot! I firmly believe COBOL has a very well deserved place in our world. It's been doing a lot of heavy lifting for years, long before Java, C# or VB were even dreamed of. Now don't get me wrong, COBOL isn't the answer for everything but it is the answer for a lot of things. I love to discuss or debate people who say a customer should throw out all their COBOL code and rewrite the application in a new "modern" language. My first question is always "Why?" What is the big technical advantage to rewriting an application to another language just to end up...wait for it... at the same spot you're in right now! Providing the same results but having now spent a lot of time and money you didn't really have to get to the same results only in a new language. It defies belief.

A little bit about me; I've spent the majority of my career migrating Mainframe Development Environments to the Windows Server platform. I specialized in the assessment of the mainframe development environments and designing and implementing unique client solutions to resolve specific issues related to client requirements. Starting from a core infrastructure and then adapting it to meet the specific client requirements has proven to provide a great deal of flexibility to the client while providing an industry standard development environment.

Along with designing and implementing the new environment I also spend a great deal of time designing, creating and delivering training sessions targeted at easing the transition for developers from the mainframe to the Windows Server system. The core essentials of development, source code management, database development and usage are demonstrated in the new environment. One of the key values developers obtain is the realization of the ability to not only maintain the core set of business values but the ability to quickly and easily expand these capabilities in a new, more efficient development environment.

I reside in Minot, North Dakota with my wife of 30+ years, Pennie and 3 children (Jason, Mathew and Ashley). All of my kids are in college and not one of them programs! I can't believe it. We have a nice ranch with 53 acres and horses that can be a bit of work, but also relaxing.

I encourage you to write about your experiences with COBOL. It's a great language with a solid future. I also encourage open and respectful debate. If you have an opinion or comment that disagrees with anything posted please feel free to post it. As long as it's respectful we'll be happy to discuss it!

Take care and Happy Coding!

Now that's what I'm talking about...

I post articles on another website dealing with COBOL and .NET interaction. One of the articles posted recently was how to call COBOL from C#, both procedural and object oriented. Someone asked me how would you call C# from COBOL? Well before I could respond to the question the person replied they figured it out! And they said it was quite simple and sent me the code to look at. The person did a great job, kept it simple and (here's one my pet-peeves) DOCUMENTED what was done!

So you see, there are others out there doing COBOL and making it work with Microsoft's languages. It's not difficult, just takes some figuring out the data translations. Bottom line, don't throw away your years of investment in COBOL just because it's COBOL! It can and does work fine (and most times better) in a distributed environment. Not convinced? Try it. I promise you won't be disappointed and will be pleasantly surprised.

Happy Coding!

Monday, August 24, 2009

The Future of COBOL



You know I've seen lots of posts over the years talking about the death of COBOL and the future of this language or that language.

I've been thinking, maybe it would make sense to have an open discussion about the future of COBOL and how it has and will evolve in the near future. With that, I've invited a couple of folks who are directly involved in determing this future state to be authors on this blog. One is on the COBOL Standards committee, while the other is one of the key developers within Micro Focus helping to create these future versions.

If you have any specific questions around this area, feel free to post a comment or two. I think a lively discussion would have benefit on both sides of the fence.

Thanks!

P.S.: Can anyone identify where the bit of sculpture I've posted is located? Yes, I know it has nothing to do with COBOL, but I thought it added a nice touch, don't you think? :)