Wednesday, May 13, 2009

Benefits of Rational Developer for i

Last time, we brought up the urgency with which System i shops should be making the move to Rational Developer for i (RDi). However we only focused on what you stood to lose (support, for example) when IBM finally pulled the plug. In the next few installments we'll chat about what you stand to gain.

A little known feature of the RPG compiler is the ability to generate Program Call Markup Language, or PCML for short. PCML is really just a small XML based document that languages such as Java can utilize to call our back office programs with less hassle. In RPG programmer's terms, it's not all that different from a prototype. The difference is, RPG isn't the one doing the calling anymore.

PCML is a basic building block for Web Services, which in turn is a building block for Service Oriented Architecture (SOA). The idea is to allow browser based applications to leverage the business logic you've already written in RPG or COBOL - such as pricing routines, stock checks, credit limit checks and countless others. The Rational family of tools provides a wealth of wizards to help you make your legendary calculations available for reuse on the Web. That is why it behooves you to isolate these calculations instead of having them bundled with green screen presentation logic. If you've ever taken our 21st Century track #2, you've probably already made strides in this area.

Generating PCML is as simple as specifying a couple of parameters on the CRTBNDRPG command. Specify the value *PCML for the PGMINFO keyword and an IFS path for the resulting PCML stream file. For example:

CRTBNDRPG PGM(MYLIB/MYPGM)
SRCFILE(MYLIB/QRPGLESRC)
PGMINFO(*PCML)
INFOSTMF('/home/cfb/mypgm.pcml')

It might not be a bad idea to create a new IFS directory and use that as the central repository for your PCML files. In V6R1, the CRTBNDRPG now allows you to store the PCML data right inside the module objects themselves, without the need for an IFS stream file. In either case, it
behooves you to get into the habit of creating PCML at compile time. You can even tweak the command defaults or the RDi shortcuts to fill those in automatically, so you don't even have to think about it next time.

What's this going to do for me now, you might ask? Probably not much. But consider for the moment, what the young bucks in your IT department are up to - Java, .Net, PHP - all being used to develop e-biz applications to serve your business partners and end users. Imagine how much more reliable their apps would be if they could tap into your proven, battle tested routines instead of re-architecting them from scratch in another language. Especially when you consider those young'ns have far less industry knowledge on which to base their design.

Thanks for sharing. Chris.

0 Comments:

Post a Comment

<< Home