Saturday, September 5, 2009

How much RPG application code is still relevant & unique

This is the most important question that many CIO's who have as/400 applications are asking themselves. Why are they asking this?

Cost and risk. It costs a lot more money to write your own applications in house than it does generally to buy one off the shelf. The reason being that you have to hire people to write and maintain the code. That's where the risk comes in. If i lose the person who wrote the code then i also potentially impact my ability to enhance and support that same code at the same costs and quality.

Since the introduction of the as/400 in 1988 a lot of custom code has been written on the platform in RPG. The fact that the majority of this code is still around and in use, is testament toRPG itself which makes it possible for analysts with business knowledge, to write a large portion of the code.

In helping customers worldwide to analyse and re-engineer their RPG applications over the last 25 years Databorough has accrued a fairly unique knowledge of the size and characteristics of the this code base in general. we estimate that there is at least one billion lines of custom code in existence on as/400's worldwide.

Before any CIO can make an informed decision on what application strategy to adopt: rewrite, modernize, replace, exactly how much of this code is still relevant and unique to the business must be known. This is in terms of business rules, data model design and flow/process logic. Extracting this information quantitatively, narrating it and documenting it on a million lines ofRPG code that has been written over 20 years, would take 5 people who would need excellentRPG and analysis skills, at least one year working full time.

That's at least half a million dollars direct cost. That is of course if there were enough such people available to do this work over and above ongoing support and maintenance demands on these same applications.

Over the last decade Databorough has been enhancing X-Analysis to the point where it can now automatically extract, narrate and document business rules, data models and process/flow logic for entire systems. Some of the systems X-Analysis runs over currently have in excess of 50 million lines of code, some as little as half a million. The difference in extraction time is usually a couple of hours.

The added benefit is that these extracted specifications can then be used to map to off-the shelf apps, as input specs for rewriting the unique and relevant parts, and even to automatically re-engineer the existing code where necessary.

This might make it clearer as to why IBM promote and use X-Analysis themselves in conjunction with their own tools, a few links to this are detailed below. There are also a few of our partners and independent agents who are offering modernization assessment services which help start this process. Some of these include, Sirius, ADC-AustinTech, IBM Global Services, and Oxford International.

So CIO's don't need to guess or accept others guesswork. They can make these critical decisions on provable, current, accurate and quantifiable information.

Here are a couple of useful links:





Stuart

Friday, September 4, 2009

How much RPG code is Relevant?

Stuart started an excellent post on the value of a company's inventory of RPG. In my life before I went to work for IBM, I was CTO for a major insurance company who developed most of their systems in-house. We had a legacy of RPG code dating back over 40 years beginning with an IBM System III and RPG-II.

While we had some excellent RPG programmers over the years we also had many that were not so excellent and wrote code that worked but was quite frankly not very maintainable. This code would read like an English language conversation, had incredible amounts of redundant IO -- yes the same record read each time an edit, validation, or field was changed on a single screen.

The screen handling IO was embedded with business logic to the point that it was virtually impossible to segregate business logic form 5250 IO from Database access. In other words, spaghetti code.

As a company moves toward modern UI's and services like Web 2.0 and Web Services, it would be incredibly desirable to leverage existing business logic in existing RPG code. Extracting viable bits of code into reusable components can be a daunting task making a total rewrite of the application a better choice for many CIO's.

Databorough's X-Analysis offers some hope and tools to facilitate harvesting of business rules into reusable components (ILE modules, procedures, or at least subroutines). It also provides via its English Language psuedo code a way to facilitate a straight rewrite of code if that's the route you choose in the same or different language.

BTW, don't blame the programmers totally for the code you are stuck with. Much of the code you see in your shop are based on IBM examples from REDBOOKS or other "experts" BOOKS leveraging changing positions on performance over the years.

At one time you wanted your code totally sequential and in-line with no subroutines to optimize how the CPU would process your code.

Some of you may be stuck with code generated by 4GL's that is virtually unreadable. Quite often the code was generated using a 4GL vendors tools and your programmers then had to manually modify the code to add functionality that the 4GL did not provide. Once this was done you had code that could no longer be maintained by the 4GL tools. These programs have hundreds of lines of redundant unnecessary code.

The best solution are tools that can analyze and help you identify what is relevant and what is not.

What about RPG II code? I know that in my previous life a huge number of my RPG Programs were written in RPG II. Depending on your business requirements it may be worthwhile to first move your old RPG II or OPM RPG III code to ILE before doing anything else.

If you still have programmers writting in the old RPG II style you have some major skills problems to deal with as well as the code.

Databorough's tools are not a silver bullet, but they can definitely help you understand what you have and form a modernization strategy based on facts and provide CIO's with a means of managing a modernization project in an objective manner that minimizes risk.