Operating System - OpenVMS
1819504 Members
3208 Online
109603 Solutions
New Discussion юеВ

Modernizing a Legacy COBOL App

 
SOLVED
Go to solution
John T. Farmer
Regular Advisor

Modernizing a Legacy COBOL App

Hi all,

Looking for a few pointers to research concerning modernizing a 20 yr old COBOL app. Building a case for modernizing our application .vs. converting away from the VMS platform.

Two areas of attention.
1. Screen handling - What is the recommended screen handling tool for Compaq COBOL (currently v2.6-1060). I have used TDMS, but wasn't sure if that was still one of the preferred tools.

2. Database - Currently using RMS file system. Have seen some of the benefits of SQL dbs for transaction logging, rollback, on-line (snapshot) backups, and of course, easy column additions/mods, etc. From former years I remember RDB and I think Oracle was a player. Of course, we are a small shop and wonder if there are additional products that would enhance RMS, so that the system is not a complete rewrite.

Thanks,

John
VMS 7.2 (plan for 8.3 by mid-year)
Alpha DS20e

john dot farmer at genworth dot com
22 REPLIES 22
Arch_Muthiah
Honored Contributor

Re: Modernizing a Legacy COBOL App

John,

You can think of replacing TDMS with compaq's DECForms.

For database, as you said Oracle Rdb may be your choice.

We have used CONNX sometime back to access the data from RMS, DBMS, or Oracle RDB for our EDI application supported with VB and for many reporting purposes.

From CONNX website: CONNX enables users to access data directly from transaction database sources. Because it is based on industry-standard ODBC, OLE DB, JDBC, XML, ADO, and .NET technology, CONNX enables organizations to access multiple, disparate databases, while preserving data integrity and presenting end users with a single, consistent interface.


Archunan

Regards
Archie
Arch_Muthiah
Honored Contributor

Re: Modernizing a Legacy COBOL App

John,

fyi... http://h71000.www7.hp.com/wizard/wiz_5436.html


Archunan
Regards
Archie
John T. Farmer
Regular Advisor

Re: Modernizing a Legacy COBOL App

Archunan,

I will clarify a coulpe of things.

1. I don't currently use TDMS in this application, was from another job a few years ago.

2. I only mentioned RDB and Oracle because I remember having read about them in the VMS news years back. I have never used anything other than RMS with COBOL in the VMS O/S.

Just looking for suggestions and areas to research for possible modernizing of the application, while still keeping the source in COBOL running under VMS.

Thanks,

John
John T. Farmer
Regular Advisor

Re: Modernizing a Legacy COBOL App

Forgot to mention we do have Connx being used by our C#/.NET team. But I'm looking for options to counter a rewrite in another environment, like .NET. I have lots of COBOL code, some ugly, some solid, all-in-all, it needs updating, not necessarily rewriting. That is being explored as well by the Windows team.

Thanks,

John
Arch_Muthiah
Honored Contributor

Re: Modernizing a Legacy COBOL App

John,

There are companies will help us to modernize a legacy COBOL App, this link details one of such company. Indian companies will do it less expensive. (I am no way related to this company, I found it from www.Oracle.com.
http://www.oracle.com/technology/tech/modernization/partners/system-integrator/datamatics.html

As you have a plan of moving to VMS 8.3 shortly, you can even think of Oracle 10g to keep your data.


Archunan
Regards
Archie
Arch_Muthiah
Honored Contributor

Re: Modernizing a Legacy COBOL App

John,

This also may be usefull...http://www.attunity.co.uk/data/uploads/Data%20Sheets/RMS%20Data%20Access%20DS.pdf


Archunan
Regards
Archie
Hoff
Honored Contributor

Re: Modernizing a Legacy COBOL App

An interesting and relevant discussion here is where you want to go with your application and your environment, and why. Are these new tools cool and/or your existing COBOL is non-cool? Are the existing costs perceived as too high? Are replacement costs perceived as less? What related replacement commercial packages are available as potential migration options, if any? Are there lower-cost or out-sourced sources of engineering labor, if you are (still) rolling your own code (and do you have the skills to manage and deal with same)?

Migrating because of a perceived coolness factor is reasonable, so long as you consciously understand this. Migrating to get to a lower-cost platform is good, too, so long as you account for your costs.

In any discussion, TCO can be the dead moose on the table. Everybody understands it, but more than a few folks have avoided its consideration in migrations. This can be maintenance and/or upkeep and/or issues of availability and/or engineering.

COBOL itself is portable, and COBOL itself can present a web front-end, or can be jacketed to present a front-end.

I'd be looking at Ruby or PHP or such, in addition to Microsoft .NET. While .NET is a good choice, the choice could also be perceived as trading your current lock-in on OpenVMS and locking yourself into (another) platform. With Ruby or PHP or other platforms, you have the option to move your applications where ever you want, and to the platform that best fits your needs and your requirements. If that's Microsoft, cool. .NET is Microsoft. (Yes, I know from Mono.) Ruby or PHP or other such can and do operate on Microsoft Windows, or on Linux / Unix / HP-UX / Solaris / Mac OS X Server or client, or -- yes -- on OpenVMS Alpha and on OpenVMS I64.

With OpenVMS (OpenVMS Alpha or OpenVMS I64), you can mix Ruby and PHP and other related tools, and can mix these with your existing and updated COBOL code, and other existing applications. OpenVMS runs ports of these, as well as Apache / SWS (VAMP or otherwise). Haven't looked around for LightTPD, but it would probably port over.

As for RMS, transactional control and rollbacks are available with the RMS journaling package. Or you can move to Oracle Rdb or Oracle classic, or ProgreSQL or such -- swapping out the data store will be non-trivial. If you move off of OpenVMS and you are calling RMS value-add features (eg: indexed files) or system services, you'll have to swap those for ProgresSQL, MySQL, Oracle or such, or other local calls.

Stephen Hoffman
HoffmanLabs
B Claremont
Frequent Advisor

Re: Modernizing a Legacy COBOL App

John,

If the "legacy" code does the job, stick with it. Why re-invent the wheel? An application that has survived 20 years is probably reasonably well put together and contains a lot of vested business knowledge.

Porting the applications to the current version of VMS should be trivial. Certainly cheaper than migrating them to another O/S.

As others have pointed out, DECforms is the obvious choice for forms handling. However, there were some interesting development tools demonstrated at the last VMS Boot Camp that provided a means to integrate a web-based front end onto COBOL and other "legacy" programming languages. Attending this years Boot Camp would be an excellent way to get a look at all of the modern tools available on VMS and to interact with the people that develop and use them.

Unless you have a good reason to move to a database, I would stick with RMS. Performance is better (properly tuned) and it costs less. Integrating a database properly into an existing application usually calls for some serious redesign.

To quote Colin Butcher: Legacy = Stuff that works! If your applications are meeting your needs, stick with them. Anything else will cost more and may do less.

A final, but important note: The most critical issue you face with your "legacy" applications is ongoing maintenance and development. Are you training a new generation to continue to support them?
www.MigrationSpecialties.com
Hein van den Heuvel
Honored Contributor

Re: Modernizing a Legacy COBOL App

Interesting question. It's tempting to say 'leave well enough alone'.
But in many companies that seems to be frowned upon, and the fashion police will sweep in and propose a 'better' windows/Unix solution whether it is needed or not.

Legacy Cobol applications tend to be large monolithic, with screen IO, application logic, and data access freely intermingled. You may be the happy exception, but all too often....
I think you are right looking at TDMS and Decforms, perhaps not for the product specifically, but for their usage style. These products push you towards a clean separation of form and functions. Clear boundaries and interfaces. I think it would be goodness to go towards that route whether you use the products or not.
It does not have to be an revolution but it could be an evolution.
Perhaps a hard coded, in line, menu interface being replaced by a presentation module and action modules. Perhaps a specific, problematic, file access being taking changed from an in line 'READ NEXT' with meandering EXCEPTION HANDLER to a CALL READ_NEXT_XYZ with simple good/bad status.
That routine is then ready to be replace with more functionality (perhaps the file deserves to become partitioned over multiple files?) or a different implementation call to remote system, database, whatever). But at the same time that routine becomes available as service routine for new tasks maybe tasks through middle ware from a web server.

Personally I have always liked FMS, but that is like setting the wayback machine to the end of the scale and it seems to stay too closely tied to the cobol. But at least it lets you decouple screen design from Cobol.
What was very promising for modernizing was DECforms with the Webconnect options. But that product was retired :-(.
http://h18000.www1.hp.com/products/quickspecs/10720_div/10720_div.HTML
http://h71000.www7.hp.com/commercial/decforms/webconnect.html

I'd say think modules and think middle ware, but you need an excuse to open op working code. Change for change sake does not seem prudent.

>> 2). Database - Currently using RMS file system. Have seen some of the benefits of SQL dbs for transaction logging, rollback,

RMS Journaling deserves more attention than it gets. It can play along in this game.

>> on-line (snapshot) backups,

You can get there from here with RMS + Host or Controller based mirroring, but admittedly not as integrated.

>> and of course, easy column additions/mods,

Right. Those access modules I described earlier can decouple this somewhat and making alread program tolerant to newer fields, and keys but not like an RDBMS

>> etc. From former years I remember RDB and I think Oracle was a player.

Still are. Both available on OpenVMS

>> Of course, we are a small shop and wonder if there are additional products that would enhance RMS, so that the system is not a complete rewrite.

There may be features in RMS that have gone unexploited, like RFA access to make alternative lookup files. Or global buffers for more performance or simple tune-up's


As I said, and Interesting question.
I hope this and other replies will give you some ideas to check out.
The problem as a whole is of course well beyond the scope of a friendly peer advice. If you are serious about this, then you should probably find someone to help you make an inventory of what you have and where you might want to go.
Several folks contributing to the ITRC forum are qualified and happy to take on such assignment.

Regards,
Hein van den Heuvel
HvdH Peformance Consulting





Antoniov.
Honored Contributor

Re: Modernizing a Legacy COBOL App

John,
there are some ways to modernize your cobol application.
You can use AcuCobol that's 100% compatible with DecCobol and gives you some new features like web management e DB interface.

Antonio Vigliotti
http://it.openvms.org
Antonio Maria Vigliotti
Wim Van den Wyngaert
Honored Contributor

Re: Modernizing a Legacy COBOL App

Without modifying much : if your application prints stuff, mail it to the user instead. This way he has a backup, can view the listing on the PC and print it (or not, if not really needed). You can even pack the listings in a PDF. Alternative is to publish the files via a HTTP server (but then the backup feature is lost). You can also mail in new formats (CSV, XML, ...) so that the user can format the data himself.

Going from RMS to a DB will be hard to do if no layer was used between the programs and RMS. We once created a layer that could handle HP3000 IMAGE, RMS and Oracle. Without much change in the programs.

Also note that going from RMS to Oracle will introduce new problems such as read consistancy and locking problems.

If you change the screen handler, go for a web based one. This will save you money on emulators.

Fwiw

Wim
Wim
Robert Gezelter
Honored Contributor

Re: Modernizing a Legacy COBOL App

John,

Admittedly, I do not have the time for a long post right now, but some thoughts

On several occasions, I have split the application into three components: IO, processing, and data access. While sometimes, particularly in less structured applications, this is problematical, it is often possible.

Once this has been done, the business logic is separate from the screen handling, and the data access. If desired, output generation can also be split off.

I then build each component as a shareable image. In the beginning, the functionality is precisely the same as the original code.

New versions of each of the components (e.g., screen handling, shift to an RDBMS, PDF output) can then be implemented as replacements for the original functionality. If desireable, the new versions can within limits interroperate with the old versions (e.g., old terminal interface using RDBMS, new terminal interface using RMS files).

This approach also means that if a choice is reevaluated, the impact of the re-evaluation is limited.

I did a presentation at several symposia on a version of this approach, most recently as "OpenVMS Shareable Libraries: An Implementor's Guide". The slides from that presentation can be found at http://www.rlgsc.com/cets/2000/460.html

- Bob Gezelter, http://www.rlgsc.com
comarow
Trusted Contributor

Re: Modernizing a Legacy COBOL App

My question are simple.
Why are you modernizing?
What do you need to accomplish?
What functionality do you need you don't have.

Your application may well blow away a more modern version in terms of performance.

What changes should be made should be based on
specific needs.

Have fun,

Bob
labadie_1
Honored Contributor

Re: Modernizing a Legacy COBOL App

Hoff said

Ruby is available on OpenVMS Alpha and on OpenVMS I64.

I guess the Ruby for OpenVms page is
http://www.geocities.jp/vmsruby/en/index.html

I see a port of Ruby T1.8-2X014 dating from 22 February 2005.
They say it is available for Alpha Vms 7.3-1 and Alpha Vms 7.3-2.

I do not see Itanium or Alpha Vms 8.any

While Ruby is a good language, and has a lot of hype because of Ruby on Rails, I am not convinced by Ruby for Vms at the moment.

With Ruby on Vms, how do I
- read an indexed file
- access a Rdb or Mysql or Oracle database
- access a web server, Wasd, Apache, Osu...
- do a lib$ or sys$ call
- display graphs
?

Python has all that, by the way.
John T. Farmer
Regular Advisor

Re: Modernizing a Legacy COBOL App

Many of you have touched on items I should have included in the original post. We intend to stay with the core COBOL application. Screen I-O is a big issue with our apps. No forms package. Screen I-O handled with COBOL DISPLAY and ACCEPT for each individual field. Hard to manage, not consistent from program to program. I compare that to something like a TDMS (or a DECForms which I will check out) where you have the separation from Presentation and logic.

As for RMS, I'd rather not tackle rewriting to some other data store. If we could explore transaction handling, that would be a great help. In a previous job, the I-O was handled by a callable I-O program for each major file. Call into it with some parameters and get back a record buffer and and a status value. Very concise. I have considered developing a similar approach here, although I have to start from scratch.

I appreciate the recommendations for other technologies, but we do not want to move away from the core COBOL code-base. It has done a lot of good over the last 20 years, but needs a little help. From other threads ou've probably read that we're planning for VMS upgrade to current 8.3 this year, trying to enhance our development environment (tools and skills) and just generally, trying to get to the next level at our shop.

We have a small VMS/COBOL staff, with average to above average COBOL skills. But some of our techniques are aging and need to be reviewed.

I would appreciate either forum or direct email discussions related to RMS journaling and DECForms. Are both products still sold and supported? Can anyone provide an on-line demo of either? Could a demo be done based on HP's Alpha Test Drive accounts?

Thanks,

John

john dot farmer at genworth dot com
Hein van den Heuvel
Honored Contributor
Solution

Re: Modernizing a Legacy COBOL App

RMS Journaling works just fine. The code is on your system all the time. Just need a license to enable it. Supported directly by OpenVMS RMS Engineering.

After Image Journaling requires no code changes, just clear and concise operational procedures.

For Recovery Unit Journalling you must mark the selected files and from then onward any modification must be in the context of a transaction to be committed or rolled back.
So you need to add $START and $COMMIT to critical places in the code. Relatively easy. What might be trickier is that records will stay locked until the transaction is committed.

For both jornaling usages it would be prudent to carefully review system tuning and usage in general and RMS tuning in particular.

Regards,
Hein van den Heuvel
HvdH Performance Consulting.


labadie_1
Honored Contributor

Re: Modernizing a Legacy COBOL App

The document from Bob Gezelter "OpenVMS Shareable Libraries: An Implementor's Guide" is very clear and should be read carefully.
Antoniov.
Honored Contributor

Re: Modernizing a Legacy COBOL App

Wish you get a software which parses your source and can help you to modify source files?
I wrote a my cobol parser to manage my source file.
You can contact me at antonio(at)openvmsg.org

antonio
http://it.openvms.org
Antonio Maria Vigliotti
Richard J Maher
Trusted Contributor

Re: Modernizing a Legacy COBOL App

Hi (again) John,

For me, two things really stand out from this thread: -

1) You'd like to stick with your core Cobol code-base
2) You have a small team with average to above average Cobol skills

Rest assured that there are many sites just like yours around the globe.

Anyway as promised in your other "Screen Section" thread, here is *all* of the COBOL server code for my HTML/JavaScript Queue Manager example I attached there.

A good starting point is the EVALUATE statement in the USER_RECV subroutine to see how Client requests are handled. (Don't forget to look at the USER_INT AST routine to see how the "Cancel Request" button OOB is actioned).

NB: The client example I supplied for this code happened to be JavaScript/HTML, but there's nothing stopping a VB or Java or even another VMS system via TCP/IP or DECnet from becoming a client for the same server code! That's up to you.

Six User Action Routines in a single shareable image; that's *all* you have to do for *any* application.

Cheers Richard Maher

Below is the build procedure for these routines. Run this and you're good to go!
!************************************************************************************
!* *
!* COPYRIGHT (c) BY TIER3 SOFTWARE LTD. ALL RIGHTS RESERVED. *
!* *
!* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED ONLY *
!* IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF SUCH LICENSE AND WITH THE *
!* THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER *
!* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY *
!* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY *
!* TRANSFERRED. *
!* *
!* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND *
!* SHOULD NOT BE CONSTRUED AS A COMMITMENT BY TIER3 SOFTWARE LTD. *
!* *
!************************************************************************************
$!
$! Procedure: BUILD_DEMO
$!
$! This command procedure builds and installs the DEMO_UARS shareable image
$! for the Tier3 DEMO example. After this procedure has been run successfully
$! the DEMO application can be registered in the Tier3 configuration file.
$!
$ SAY := WRITE SYS$OUTPUT
$ REQD_PRIVS = "CMKRNL,SYSNAM"
$ PREV_PRIVS = F$SETPRV(REQD_PRIVS)
$ ON ERROR THEN GOTO FINI
$ ON CONTROL_Y THEN GOTO FINI
$ IF F$PRIVILEGE(REQD_PRIVS) THEN GOTO BUILD_IT
$ SAY "You need (CMKRNL,SYSNAM) privilege to run this command file"
$ GOTO FINI
$!
$BUILD_IT:
$!
$! Compile the source files. P1 is checked to see wheter debug is required.
$ IF P1 .EQS. "Y" .OR. P1 .EQS. "y"
$ THEN
$ COBOL/NOALIGN/LIST/DEBUG/CONDITIONALS=D/NOOPTIMIZE DEMO_UARS.COB
$ LINK_QUAL = "/DEBUG"
$ ELSE
$ COBOL/NOALIGN/LIST DEMO_UARS.COB
$ LINK_QUAL = ""
$ ENDIF
$!
$ CREATE QUIDEF.MAR
;+
; Some of the external references in DEMO_UARS.COB will be unresolved
; at link-time because the linker won't find them in the default system
; libraries. This macro file is needed to resolve those references.
;
; Note: This is not a Tier3 requirement. This file is needed only because
; the DEMO User Access Routines need to talk to the job controller
; and use the persona system services.
;-
.TITLE GETQUI External symbols and condition codes

$QUIDEF GLOBAL
$SJCDEF GLOBAL
$JBCMSGDEF GLOBAL
$ISSDEF GLOBAL

.LIBRARY "T3$LIB"
T3$DEF

NOW_CLOSE ==
SEARCH_ALL_JOBS ==

.END
;
$ MACRO QUIDEF.MAR
$!
$! We'll define the logical name LNK$LIBRARY to point to T3$USER so that
$! the Tier3 system service library will be searched automatically. The
$! T3$OBJECT library contains all of the Tier3 External Symbol and
$! Status Code definitions, so we have to link to that also.
$!
$ DEFINE/USER LNK$LIBRARY T3$USER
$ DEFINE/USER LNK$LIBRARY_1 T3$OBJECT
$!
$ LINK/SHARE'LINK_QUAL' DEMO_UARS.OBJ, QUIDEF.OBJ, SYS$INPUT/OPTION
!
! There are no EXTERNAL file connectors, database handles or working-
! storage variables defined in the DEMO example, so no PSECT attribute
! modification is required to build this shareable image.
!
SYMBOL_VECTOR = ( -
USER_INIT = PROCEDURE, -
USER_LOGON = PROCEDURE, -
USER_RECV = PROCEDURE, -
USER_LOGOFF = PROCEDURE, -
USER_FINI = PROCEDURE, -
USER_INT = PROCEDURE -
)
$!
$! Unless the resulting shareable image will be placed in the SYS$SHARE
$! directory, a trusted logical name needs to be defined so that Tier3
$! can locate the shareable image at run-time. NB: this requirement is
$! *not* enforced for DEBUG images.
$!
$! SYSNAM privilege is required to define a trusted logical name and
$! CMKRNL privilege is required to install the shareable image.
$!
$ UAR_SPEC = F$PARSE("DEMO_UARS.EXE") - ";"
$ DEFINE/SYSTEM/EXEC/NOLOG DEMO_UARS 'UAR_SPEC
$!
$ INSTALL := $INSTALL/COMMAND
$!
$! In the following command the /SHARE qualifier is required. The /OPEN
$! and /HEADER qualifiers are optional.
$!
$ IF F$FILE_ATTRIBUTES("DEMO_UARS.EXE","KNOWN")
$ THEN INSTALL REPLACE DEMO_UARS/OPEN/HEADER/SHARE
$ ELSE INSTALL ADD DEMO_UARS/OPEN/HEADER/SHARE
$ ENDIF
$!
$FINI:
$ PREV_PRIVS = F$SETPRV(PREV_PRIVS)
$ EXIT
$!
Jeffrey H. Coffield
New Member

Re: Modernizing a Legacy COBOL App

We have used FastCGI for over 6 years now to access both Cobol and Basic existing code. For more info goto www.fastcgi.com or contact me thru my website www.digitalsynergyinc.com
Hoff
Honored Contributor

Re: Modernizing a Legacy COBOL App

Regardless (mostly?) of the approach chosen, I'd recommend you encapsulate the COBOL, and provide APIs (program calls into a shareable, network connections, mailboxes, email messages, etc) in and out for user activities. Build up an application server, and separate user interface module(s).

Fashions in front-end interfaces and in platforms can wax and wane. COBOL server code seemingly outlasts most other known constructs known to computing.

I'd not build the front-end into the COBOL. (If you encapsulate, you can support multiple front-end interfaces. Other capabilities can also fall out, as well. Automated test injection for regression testing, for instance.) Have the UI data arrive and depart via application-defined message structures, and keep the back-end and the front-end as separate as reasonably managed.
Richard J Maher
Trusted Contributor

Re: Modernizing a Legacy COBOL App

For the first time in a long time, Steve and I are completely at one on an issue. (But don't let that put you off :-) See my COBOL code attached above for my interpretation/implementation of the design philosophy/strategy of which he speaks.

That same code can be accessed via TCP/IP (or DECnet if you like record boundries like me) from any platform and GUI tools of your liking, and whatsmore simultaneously!

The client example I provided in the other thread is using JavaScript and HTML to provide a GUI for the COBOL queue management code. At the same time a VMS client could be accessing exactly the same servers via DECnet (or TCP/IP). Java? .NET? VB? You name it!

Your servers serve; who calls them, how, and why, is their business! (As long as they are authorised to access the VMS Server and your Server Application, of course)

But then this would make a lot more sense if you could see it! If you look at your t3$examples directory you will see the demo_client_tcp_ip.cob and demo_client_decnet.cob programs; these can both be accessing the attached DEMO_UARS.COB at the same time as my DEMO_CLIENT_WEB.HTML.

Sounds good doesn't it?

Cheers Richard Maher