I have a spot of '400 work to do. It sounded a bit daunting to begin with; I need to make an HTTP request and look at the response. Doesn't sound too hard, does it? Bear in mind, though, that I have to use RPG, and that RPG doesn't come with support for anything above the level of raw sockets, and that by using the notoriously hairy '400 API calls. Pointer arithmetic everywhere. Yuck.
(It could be a 3270 mainframe system though, I suppose.)
My first break away from pure green-screen code grinding came with a Java applet based screen scraping conversion using Jacada. We made a much better job of it than these guys did, though, I must say. Not only did ours look a lot better, but we plugged in a lot of new functionality; prompting, documents attached to major business entities, data import and export, and we even managed to give the user multiple sessions in the same window, allowing then to with between up to sixteen windows each.
Update: Phil tells me that this is a 3270 mainframe system, and it's converted using ResQNet.
Well, not all of them, anyway. ;-)
One of our biggest recent projects was a new Java front end to an old 5250 green screen application of ours. The majority of users were more than happy with the pretty new front end, but some were not. These users were finding that the GUI slowed them down.
Mouse considered harmful: "Have you ever watched an experineced heads down data entry clerk do thier job? With a green screen system they rarely look at the keyboard and in most cases ignore the screen. They are responding to audible feed back (key press clicks, console beeps, etc) with thier eyes focused on the data to be input. They remember key sequences (press 1, A, down arrow 2 times, F2 to save) to navigate. A mental model of the screens become engrained in thier head. They "SEE" the application in thier head and that vision is updated realtime. They know the system because it's predictable."
What's more, if the 5250 user gets ahead of the system, it doesn't matter - the 'dumb' terminal will just buffer their keystrokes, and play them back when the application is ready for them. So, they can enter data as fast as they can hit the keys.
I heard a story, probably apocryphal, about a salesman trying to sell what IBM calls a 'refacing' tool, and what the rest of the industry calls either a screen-scraper or a 'lipstick-on-a-pig' tool. He demonstrated how easy it was to slap a new front end on the 5250 app. The head of the data entry department then snipped off his mouse with a pair of scissors, and asked him to enter some data. "It costs us a penny every time one of our data entry people takes their hand off the keyboard," he explained.
Anyway, I've implemented a keystroke buffer for a Java app once before, and I know it's pretty much top of our to-do list for our pretty new front end. Perhaps then we can wean the last of our 5250 users onto it...
Via James Robertson.
Steve's bug hunting. So am I, and the bloody ILE debugger doesn't let you add a conditional breakpoint depending on two fields' values. IBM left this feature out deliberately to piss me off.
I've got a few one-off data fixes to do. I have to do them all in RPG: though the client has SQL, they don't really know how to use it, so they don't want me using it. Also, they consider it dangerous.
Don't know SQL? Don't know SQL! SQL has to be the single most ubiquitously useful and transferable skill in IT. If you don't know SQL, and know it well, learn it now.
I can't recommend any introductory books on SQL, but I can recommend Joe Celko’s SQL for Smarties. At an advanced level, it's the only SQL book you'll need. (Platform specific stuff, you say? Don't use it.)
Dangerous? Well, yes, it's dangerous. You can indeed hose a lot of data very quickly with SQL. But then, screwing up a database with a compiler takes only a little longer. Both approaches are as safe as one another; test thoroughly, and you'll be fine. And doing the data fix right is usually quicker with SQL, too.
One piece of advice, though; no matter how sure you are that your SQL statement is right, test your query one more time over tha actual data that you are going to update before running the update.
Once upon a time, in the dim and distant past, I had a big live data update to perform. So, on the test system, I constructed test data, ran and printed a bunch of queries, wrote my SQL statement, re-ran my queries to show that the update has worked properly, cut-n-paste my SQL statement into a Word document, printed that, and dumped the whole lot onto my bosses desk to check. He gave the go-ahead, so I opened up a session on the live box, set (and double checked) my library list, cut-n-paste my SQL statement from the Word document into the live session, hit enter, and went for a cup of tea.
It was only when I got back to my desk that I realised that the last cut-n-paste had left all the 'not' symbols ('¬'s) behind. Thank God for journals. The system was down for several hours, though. Sigh.
Good God, IBM's marketing of the, uh, whatever it's called is a total mystery to me. Either it's totally crap, or it's so clever that it's way over my head.
It looks like there's another rebranding on the way. Say hello to the "eServer i5". I first came across this name in this news item from The Register: IBM's Power5 pops up first in new iSeries. So, I had a quick google, and found MSN's First IBM Power5 server to debut Monday. "The iSeries label that replaced AS/400 in 2000 will itself be phased out in favor of eServer i5, sources said. And though the OS/400 label for the operating system survived the 2000 rebranding, it now will be replaced with i5/OS, sources said."
i5? I shudder to think about the ads we've got coming, with brash Americans jumping up and down and slapping each other's palms. Sigh.
And don't talk to me about "WebSphere" - does IBM make any software that isn't called WebSphere something-or-other these days?
Update: See also IBM rolls out Power 5-based iSeries server.
RPG's built in
%DEC function is generally happy with embedded spaces - but if the string that you are trying to convert is completly blank, it throws an error. This is fair enough, I suppose, but not what I want - I want a zero.
No problem, thought I. I'll throw together a quick subprocedure.
* Convert string to packed decimal
p str_to_packed b
d str_to_packed pi 31p11
d from_str 40 value
d precision 2p 0 value
d scale 2p 0 value
d return_value s 31p11
c if from_str = *blanks
c eval return_value = *zero
c eval return_value = %dec(from_str:precision:scale)
c return return_value
Does this work? Does it fuck. It fails to compile, because the
%DEC function needs its scale and precision arguments fixed at compile time, would you believe. Arse.
Update: Looks like I'll have to do it the hard way. Sigh.
I mentioned Michele Simionato's lovely command line parser the other day. The nice thing about this is that it takes the command line option definitions from a human readable definition in the module's docstring.
David Boddie commented on this recipe, pointing out his lovely command line parser. The nice thing about this one is that it can throw up an automatically generated GUI form allowing the options to be specified in addition to accepting the options from the command line. (There's nothing new in the world - this is similar in concept to the way the iSeries' commands work.) But the syntax that David's parser uses isn't too user friendly.
So, what I'd really like would be a combination of the two approaches; David's GUI generating parser, but driven from a human readable docstring. Well, I have the code to both, so I'll have a bash at a cut-n-shunt job.
Bugger! Bloody SEU doesn't have an undo facility. I just deleted a whole bunch of source by accident. :-(
That's two hours work down the drain...
As you might have guessed from my last post, I've got some postcode parsing to do. The requirement is pretty simple; I have to parse a postcode into an outcode and (optional) incode. The good new is that I don't have to perform any validation - I just have to chop up what I've been provided with in a vaguely intelligent manner. I can't assume much about my import in terms of formatting, i.e. case and embedded spaces. But this isn't the bad news; the bad news is that I have to do it all in RPG. :-(
Nevertheless, I threw a little Python function together to clarify my thinking. I often do this when I'm coding something nasty in Java. It's worthwhile to make sure that the algorithm that I'm using works before grappling with Java, and Python is perfect for this. And given RPG's awkwardness, it's worth prototyping even the simplest algorithm - you don't want to spend all that time cutting code only to find that it doesn't work even in principal!
Anyway, the Python function:
postcode = postcode.replace(' ', '').upper()
if len(postcode) <= 4:
return postcode, ''
return postcode[:-3], postcode[-3:]
(A syntax highlighted version with unit tests here: postcode.py.)
This is a very tolerant way of dealing with postcodes. It will accept just about anything. In my case, that's what I want; I'm pulling data in from a big SAP database. If that's inaccurate, it's definitively inaccurate. ;-)
In other cases, you might want to validate the postcode. Even here, you have more than one choice. One approach is to make sure that the postcode follows the rules as specified at the Universal Postal Union and the UK Govornment Data Standards Catalogue. I've coded this up: postcode_strict.py. This might even be useful to someone! (I didn't bother with an RPG version of this; I don't need one, and life's too short for writing this kind of thing in RPG if you don't really need it.) The other approach would be to validate against a list, should you have one. Duncan Gough steered me towards Brainstorm's downlaodable postcode lists, but these contain outcodes only.
Oh, BTW, any suggested improvements to any of these functions in any of these languages would be gratefully recieved, as would Java versions for comparison.
Update 14th April: Alan Green's done a Java version of the simple version. Thanks, Alan!
Also, I've spotted a bug in the strict version, which I'll fix at lunchtime. Basically, I'm using the list of characters valid at the 4th position to check characters at both the 3rd and 4th positions. This is incorrect; there's a different list of valid characters for the 3rd position. :-(
It's been quite a while since I've been an RPG programmer. Now I'm back with it for a month or two, and I can't say that I'm liking it much. I've become accustomed to loads of nice things that I no longer have available.
Firstly, there's the language itself. RPG is ugly, inexpressive and fiddly. I think that these are somewhat related - to quote ESR, Ugly programs are like ugly suspension bridges: they're much more liable to collapse than pretty ones, because the way humans (especially engineer-humans) perceive beauty is intimately related to our ability to process and understand complexity. A language that makes it hard to write elegant code makes it hard to write good code.
A few examples: Opening a file in anything but the most standard of ways involves fiddling with an unholy mix of F, D and I specs, all of which are column oriented records, and all of which need to be located in different parts of the source deck. The C specs don't have to be column oriented, but I've yet to see the new free format RPG used in anger. Using the old style column oriented C specs, if your expression gets too long, it'll end up running into the comment column, and will be ignored. If you're unlucky, the compiler won't notice, and your expression will compile with a bit missing. This gets picked up in testing, of course, but there ain't no jUnit for RPG.
There's a narrow range of activities for which RPG works reasonably well, and it must be said, it's very well integrated with the iSeries's built in database. The iSeries is pretty much an accountant's machine, and you can build the applications that you want with RPG, I suppose. But all the fiddling leaves you with appalling productivity.
Then there's the standard library. Or, to be more specific, the complete and utter lack of one. Java has a huge standard library, and Python's standard library is either even larger or much smaller, depending upon whether you are talking about functionality, or lines of code. ;-) And if I can't find what I'm looking for in the standard libraries, well, Google and PyPI are my friends, and there's almost always something to download. RPG, on the other hand, has no standard library at all, and there's little stuff on the 'net. RPG does support software components, just about, but there isn't a community making stuff available. So, every project reinvents its string and date handling, for example.
Lastly, there's the development environment. The site that I'm at, just like every other iSeries site that I'm aware of, use the SEU source editor, which is out of the Ark. This is particularly irritating, because there's a fantastic Eclipse-based replacement, WDSc. This comes as part of the same WDS bundle as SEU does, so if you have one, you have the other - but no one uses it!
In short, if you catch me whinging about Java again, just slap me.
"Imagine if the Perl cafe and Javahut were across the street from each other. You walk into Javahut, and ask to sit down. "I'm sorry," says the person at the door. I'm not actually the hostess, I'm a Factory class that can give you a hostess if you tell me what type of seat you want." You say you want a non-smoking seat, and the person calls over a NonSmokingSeatHostess. The hostess takes you to your seat, and asks if you'll want breakfast, lunch, or dinner. You say lunch, and she beckons a LunchWaitress. The LunchWaitress takes your order, brings over your food, but there's no plates to put it on because you forgot to get a CutleryFactory and invoke getPlates, so the Waitress throws a null pointer exception and you get thrown out of the place."
This is so true it hurts.
Via Ian Bicking.
This is bad: in decreasing order of love, my used-at-work programming languages are:
As you can see, RPGIV isn't high on the list. Sigh.
Still, I'll be working with one or two people I know and like, so it isn't all bad.
Anyway, the three of us are meeting up at The Prince of Wales, Wimbledon tomorrow evening. All welcome.
It's been a long time since my last '400 related post. But then, it's been a long while since I touched a '400, so that's hardly surprising.
Is anyone else unable to download JTOpen at the moment, or is is just me? I've been trying on and off for a week or so now...
Ted Leung points out a couple of iSeries related articles. An Object-based Systems Architecture, which talks about how OS/400 is object oriented to the very core, and its capability-based security features. Few people outside of IBM's Rochester development lab. are aware that the AS/400 is a marvellous bit of advanced technology - still (IMHO) many years in advance of anything else on the market.
WinFS Vs GNOME Storage? Can you Say OS/400? is about the '400's database based filesystem, how ahead if its time this was, and how bloody useful it is.
I just went over to a client this morning to make a quick fix, and I have to say that the '400 doesn't feel particularly cutting edge. But that's just the tools, really - PDM, SEU and DFU, (the tools I used today) are all out of the ark. IBM have certainly provided more up to date tools, but in my experience, no one uses them.
In fact, I was using a 5250 dumb terminal today. Good God, no cut and paste! I kept looking over my shoulder, worried about being attacked by a saber-tooth.
I met Steve last night. I'm rather heartened by our conversation about his 'between jobs' situation, I must say. It seems that he has several irons in the fire at the moment, so things are decidedly looking up.
Interestingly, all but one of these prospects have come through people who know Steve, and have worked with him. The other prospect is a friend-of-a-friend thing, with me being the friend. None of them have been put to him by a recruitment consultancy. Thing is, the Synon/2 market is a small one, and people know one another. Steve's reputation is good - very good - and it's now that this is paying off for him.
So, there are grounds for optimism here. Good luck, Steve!
BTW, The Stage Door turns out to be a lovely pub. First off, it really is a pub - rather than a bar - with a proper pub feel. Good, attentive staff, more interested in serving beer than chatting, unlike in many places I could mention. And not to pricey for a London pub, either. Recommended.
Not enough eye-candy for Steve, though, so at his suggestion we decamped to The Fire Station later on in the evening.
There's a debate going on right now on python-dev about what kind of changes are acceptable in micro releases. (Micro releases are where you go from x.y.z to x.y.z+1 - for example, from 2.2.1 to 2.2.2.)
No one would rely on something like a core dump, right? Well, perhaps, but I was reminded of one of my nastiest ever iSeries hacks, which was very nearly as bad. Scarily enough, this was (and is) used in production code.
The next time I have any iSeries work to do, I'll upgrade.
Bollocks, say I.
Now, OS/400 on a PS/2 I do believe. It's based on the PowerPC architecture, and I've heard Frank Soltis talk about the posibility before.
Via an email from Jay.
One of my team's apps runs on Tomcat 4.0.x, and we use Tomcat's connection pooling. I'm not sure if it doesn't work how we want it to, or whether we are just using it wrong, but we are having real problems with it. Mainly, the problem is that it seems very keen on throwing connections away. Unless you go to the pool very soon after a connection has been returned, you'll find the pool empty, and have to wait for a new one to be built. Which is, of course, exactly what we are using a pool to avoid. (Note to self - try Evo on Tomcat 4.1.x.)
So, perhaps DBCP is the way to go. Certainly it's worth a look. Unless anyone has any suggestions as to where I'm going wrong with either of the other two approaches?
Some interesting history here, but no real news. According to IBM, RPG III is strictly legacy, and RPG IV must coexist with Java.
My, I'm inclined to doubt that many new systems will be written using any RPG at all. Though the developpment tools are improving, RPG itself is still a pig. My current company is a '400 shop, and our main product is in RPG III, but even we haven't written a new system in any flavour of RPG for some years. There is still plenty of maintenance and enhancement work for the RPG people, but it's strictly legacy stuff.
And if you are a '400 developer, and you don't know Java yet, then now is the time.
Some other iSeries stuff:
- Scribble on SQL's Scratchpad - an intro to extending SQL with UDFs
- Calling Java from RPG: A Refresher - see, you can't escape Java!
- Calling Java from RPG: Beyond the Basics
- Pivot Data with SQL/400 - a hand code generator for building cross tab queries
- Pros and Cons of Surrogate Keys - how and why to use surrogate keys.
The IBM eServer iSeries platform, formerly known as AS/400, is very highly regarded by those who work with it day in and day out, says The Register.
Damn right it is. I'm one of them. The iSeries (still known as the AS/400), is a good box for business. Not exciting, not even particularly interesting, but solid, capable, reliable, predictable, cost effective, simple to administer, and scalable.
But for some reason, IBM has never made much of a noise about them. Might this change?
RPG doesn't have anything like as powerful as Exception handling, but it is ironic that for many years the iSeries' scripting language, CL, has offered a more powerful error handling via its MONMSG command than RPG offered.
Well, RPG is finally being dragged kicking and screaming onto the eighties. Power of MONITOR Opcode shows you how to make use of RPG's new
(Well, Jython scripting, to be precise.)
This is going to be so useful...
Via Daily Python-URL
As as V5R1, you can journal changes to data areas and data queues. See Add a Safety Net with Journalized Data Queues for an overview.
Now this is useful. I've always shied away from data areas and data queues, partly because you can't journal them. The other reason is that I'm a relational database bigot, and data areas and data queues just don't feel right.
So, data areas and data queues will still probably be plan B, 'cos of the second reason that I mention, but I won't feel quite so dead set against then in future. After all, both object types can be pretty useful at times.
'Journalize' seems to be an Americanism - on the UK, I've only ever heard it referred to as 'journaling'. A bit odd, this - most IT related Americanisms (disk, program, and so forth) make it across the pond unchanged, which is fair enough, really, since most refer to things invented in the US. But 'journalize' didn't, possibly because it really jars on the British ear.
Why in the iSeries category? 'Cos I recently used it to produce a new green-screen banner page. Probably the first new 5250 banner page to have been written in 5 years.
Pretty useful, but FTP is only one of the things which you need to cover. ODBC and JDBC are other important ones, and I should imagine that securing those would be quite a job - you'd need to parse the incoming SQL to decide what was being read and/or updated. Not trivial by any means.
We are sticking to JDBC at the moment on my projects. Since the prospect of our running the database on anything other than a '400 is just about zero for the foreseeable future ('cos we are interfacing with a rather old, but very capable and very large system), perhaps record level access shouldn't be ruled out?
Program Call Markup Language (PCML) is worth bearing in mind for some things, too.
Also for RPG developers - Data Structure Parameters in RPG Prototypes.
- Using APIs to Send Impromptu Messages
- IBM DB2 UDB for iSeries V5R2 Update (on-line course)
- What's in the IBM Toolbox for Java V5R1?
- New Redbook - DB2 UDB's High-Function Business Intelligence in e-business. This IBM Redbook deals with exploiting DB2 UDB's materialized views (also known as ASTs/MQTs), statistics, analytic, and OLAP functions in e-business applications to achieve superior performance and scalability.
- TN5250j - an open source 5250 terminal emulator in Java
- When is PowerPC Not PowerPC?. Frank Soltis, father of the AS/400, on the architecture of the iSeries, past, present, and future.
A friend of mine needs to process some XML on the '400 with RPG. I pointed him at these:
Good luck, Paul!
Built-in iSeries support!
Two Minutes with Dave Slater on the iSeries Tools Strategy. The future of the WebSphere Development Studio Client, itself the future of iSeries development tools.
There is a nice new Redbook about this - WebSphere Development Studio Client for iSeries: Bringing New Life into 5250 Applications. Six meg, but well worth the download.
Sigh. Yet another way of accessing green-screen apps via a browser.
We have gone with Jacada for Java. It's rather heavyweight, but it allows you to customise it almost endlessly by extending the Java that it generates. It's been around for a while, and it's solid. It has to be said though - its interface sucks big time, and it is totally non-automateable, which causes us a huge amount of manual work with our integration builds.
Easily maintain SQL triggers is a nice example of the kind of thing that you can do with SQL on the '400 these days.
'Smart' databases might seem like an unalloyed good thing, but I'm not so sure anymore. Do you really want your business rules mixed up with your database?
Sure, triggers mean that you can't break the rules even when editing data with SQL, DFU, or the wonderful WRKDBF, but the temptation would be to put too much intelligence into the trigger.
You want your business rules to live in your business objects. These are the things it which you code all your business rules - usually in the form of OO classes, but you can use an RPG service program or suchlike to take the same role. Your triggers should be thin wrappers, simply calling out to the business objects for verification of the required data change, and for any consequential database operations. The database should be just a repository for your data.
Of course, your front end (be it a GUI, a web service, or whatever) should also be as thin as possible, and hook into your business objects.
And thus a 3-tier architecture is born!
This ILE business isn't simple. I know a lot of bright people who have had real problems moving across from RPGIII to RPGIV and ILE. So you can imagine the problems that not-so-bright people like me have had.
It's not the RPGIV part that's the problem, on the whole. RPGIV is just RPGIII dragged kicking and screaming into the nineteen-eighties. The thing that people have real problems with is ILE.
You can find a lot of good stuff in Who Knew You Could Do That with RPG IV? A Sorcerer's Guide. The first four chapters are essential reading for RPG programmers.
Adding Subprocedures to a Service Program is a nice little tutorial on binder language. You can use this to avoid the need for mass recompilation when you change a service program. It's knowing things like this which mean the difference between ILE being useful and being a complete nightmare.
Update (Frday) 13th of July: Reader Feedback and Insights: Binder Language clears up a few bits and bobs.
Yet more new information about DBG2 UDB for iSeries enhancements at V5R2.
This is on top of the earlier stuff. V5R2 is looking like a huge release for DB2 - possibly the biggest since the initial System/38 release all those years ago.
Scalar subselects are the kind of thing that don't look too exciting. Until you need them, that is, at which point you really need them.
Savepoints also look really handy, as do external UDTFs. UDTFs, User Defined Data Tables, allow you to treat the output of a program as an SQL table.
Temporary tables are somewhat useful - nothing you can't do by creating tables in QTEMP, but these will work cross-platform.
Also in The Four Hundred this week - a summary of the state of play with WebSphere Development Studio Client (WDSc) and Eclipse for the iSeries, (no news here, but a nice summary anyway,) and an article explaining why companies should hire mediocre rather than talented people, which explains why I have a job.
But nevertheless, this is a neat hack.
Update: the site seems to be down, so here's the google cache: http://google.com/search?q=cache%3Ahttp%3A%2F%2Fwww.400times.co.uk%2FFrameData%2FSEUCOLOR1.htm
Single Sign-on Support in V5R2. Very interesting...
Doesn't mention the RESET op-code, which I use a lot. Or did - I haven't touched RPG in months, thank God. RESET allows you to customize what the fields in a structure get set to.
I'd not heard of this - using VNC to run iSeries based X Windows sessions. Wild! You can now use EMACS to edit iSeries files.
If Eclipse for the iSeries wasn't around, I'd be looking at using this.
I am using JTOpen in my current project - mainly the JDBC driver.
Which Web Server Is the Right One for You? is an interesting discussion of the various web servers which you can run on an iSeries.
IBM claim that Apache/Tomcat doesn't scale as well as WebSphere. Is this true?
Can you run JBoss on a '400?
If you were to have started with RPGIV at V3R2, when it was first released, then the leap from RPGIII wasn't too big. But since then the gulf has widened considerably. Today's RPGIV wouldn't look anything like RPG to an RPGIII programmer.
This is true, I suppose, but I think that the bigger issue is attitude. Most iSeries developers are, uh, not exactly neophiles. RPGIII has always been good enough for them in the past, so it's good enough for them now.
Outside the iSeries world, the machine is seen as old fashioned. Which is a shame, 'cos it's a superb box for business, and it isn't old fashioned at all. But the uses to which it is usually put are, and that is where the reputation comes from, I think.
Ah well. Anyway, another interesting RPG article today - Generate random numbers using RPG.
Kisco is making some of its utilities available for free. (That's free as in beer, not free as in speech.)
SMARTTTN is a set of mini-apps for green screen users - calculator, calendar, note pad, that sort of thing.
CPYFSEL is a smart file copy utility.
BTW, not new, but very useful - the WRKDBF file editor. Well worth a look.
Useful little RPG tip - Using environment variables with ILE-RPG.
There is a bit more to it than you'd think, but it's all covered here.
An interesting article explaining prototyping of parameters in RPG IV.
Death to PLISTs! Who Knew You Could Do That with RPG IV? A Sorcerer's Guide to System Access and More is an absolute must-read for RPG IV developers.
I have to say, I find it a bit bizarre that just as so many modern languages (Java, Python) were doing away with the concept of pointers (as opposed to references, i.e. pointers without the arithmetic), IBM were busy adding them to RPG.
You can have quality software, or you can have pointer arithmetic; but you cannot have both at the same time. - Bertrand Meyer, 1989
Having said that, there are things in RPG that you can only do using pointers, and some that are much more efficient using pointers, so their use cannot be ruled out altogether. And OS/400 won't let you fandango on core.
You don't need this. But if you do need it, you need it bad.
"We had a well-structured RPG program model that we’ve reused over and over again, so we knew how to tell user-interface subroutines from business- and editing-rule subroutines," Daniels explains. Sigh. Most of us don't have this, so we need RPG refactoring tools, about which I have ranted before.
I've mentioned some of the SQL enhancements before, but the MC article covers more, and give examples. I don't know about you, but I find examples so much easier to comprehend. There are also SQL enhancements mentioned that didn't make it to the IBM document - The CREATE TABLE LIKE command, and the more flexible ORDER BY clause. Genuinely useful stuff.
Also new at V5R2 is the JDBC 3.0 support.
Connection Pooling with Tomcat is just what I have been looking for - I've been trying to work this out for hours!
Dive into connection pooling with J2EE is a good follow-up read, but it doesn't have a simple step-by-step guide to getting started.
(It's a bit slashdotted, so be patient.)
See also the Slashdot coverage.
Nothing to report myself as yet - I'm still downloading!
Update: Downloaded & installed. I can't see anything different, but that's only to be expected, since I've been running a release candidate for a while.
The dawn of Eclipse.
My boss and I attended the Stargate event at IBM yesterday. There we were shown the new version of the WebSphere Development Studio Client. This comes in a bewildering variety of versions, and consists of an equally bewildering array of subcomponents. All of the versions of WDSc, and all of the subcomponents were referred to by acronym, and all the acronyms began with W, and we were thoroughly confused.
But anyway, the long and the short of it is that if you are an iSeries shop, you get the lot.
The new version of WDSc is based in the Eclipse framework. As anyone who has used Eclipse will know, it is just beautiful.
Eclipse is basically a framework for building IDEs, and other things. It ships with a plug in which makes it into a Java IDE, which as I said, is superb. Tools vendors other than IBM are also basing tools on Eclipse.
WDSc consists of a number of plug-ins to Eclipse to enable iSeries development. It has tools to navigate libraries and objects on the iSeries - think of a cross between PDM and Windows Explorer, but with filtering options more powerful than either. You can edit and compile RPG, DDS and so on, with any one of several powerful editors. SEU is ancient history now.
There are also some powerful tools for developing Java based web applications possibly involving iSeries components, though not necessarily. The tools for building JSPs, beans of various types (including EJBs) and so on are powerful. There are also tools to building wrappers around iSeries based RPG modules and turning them into beans and/or web services.
All great stuff, and for iSeries development it is going to be wonderful.
It is missing one crucial set of tools, though, as far as I am concerned. There are no tools for refactoring RPG. All these clever tools which IBM provide are meant to work on nice modular systems, where your presentation and business logic are nicely separated. Our legacy system isn't like this - it consists of large programs (5000 to 15000 lines) with the business and presentation logic thoroughly mixed. There are no separate callable modules implementing business functions, and that is what much of the new tooling requires.
Now, obviously there is no way to automate the modularise of a large program - it is inevitably a manual job, and a big one. But there are tools which can help - or there could be.
The Java development tools which ship with Eclipse include a number of powerful refactoring tools. For example, you can highlight a block of code and extract into a separate function (method). All inputs to and outputs from the selected code are automatically worked out, and turned into parameters (arguments). If large RPG systems are to be modernised, this is the sort of tool which we need.
I brought this up at the event. IBM have no plans to build this sort of thing into WDSc. Eclipse is totally modular and extensible, though, so anyone could do it. It was suggested that this might be an opportunity for my company! We are not a tools vendor, though, so it isn't going to happen. There were a number of tools vendors present, though, and a couple were interested enough in the idea to come and talk to me...
The latest version of WebFacing was also demoed - on which more later.
Tomorrow, I'm going to IBM's Stargate Eclipse - iSeries Development Update event. Should be interesting.
No updates tomorrow. ;-)
No changes to SEU, surprise surprise.
%DEC and %INT (character to numeric conversion) should have been in from the start, IMHO. I've had to write them more than once. (At different sites, I hasten to add!)
The field lists now supported by the database I/O opcodes (CHAIN and friends) sound interesting. No more level checks?
But what might be the biggest thing is the continued Java integration.
Nothing else earth shattering.
It explains what Eclipse is, and lists the new Websphere tools which will plug into it.
What has happened to eclipse.org? It seems to be dead at the moment.
Update: eclipse.org is back.
Not that I'd use VB, naturally. The NT side if things can all be done with Python - sockets are built in, COM support comes as part of win32all, and py2exe allows you to run your scripts as NT services.
SEU sucks. This looks like it will make it suck less hard.
But never mind that - check out the menu applet on the review page!
Other Ecllipse news:
New version of WebSphere Development Studio to be based on Eclipse.
QNX Releases Eclipse-based IDE.
I have used basic triggers extensively, but the V5R1 changes (column level triggers and the STATE parameter on the CHGPFTRG) are new to me. Also, some nice examples of procedural SQL.
We use Eclipse as our IDE for Java development. It is bloody good.
It is also going to form the basis of future versions of the WebSphere Development Tools for iSeries. RPG in Eclipse - I can't wait!
I must say that I am commenting a lot less these days. Using modern IDEs like Eclipse or Boa, long names are not a problem., so I'd rather give a function a self explanitory name, and not bother commenting it at all.
Back on the iSeries, 90% of my work is on existing RPGIV code. With a six character limit on field and subroutine names, well, loads of comments are needed..
If you develop on the iSeries, or operate one, you need a shortcut to the iSeries DocFinder in your favorites list.
My shortcut is called 'INDEX 400', which tells you how long I've been using it!
The other must-have shortcut is to comp.sys.ibm.as400.misc - whatever problem you might have, you are not the first.
IBM has published an overview of the changes to DB2 on the iSeries at V5R2.
Personally, I'm most interested in the SQL enhancements. Views over unions will be useful, and identity columns will make a lot of jobs simpler.
Lots of macho hardware figures here, but what's new in terms of OS/400? (Or have they rebranded it as iOS yet?)
I've been working on PC based Java stuff for a while now, so I haven't been keeping an eye on Per's work, but it looks to have come on a long way.