Two completely unrelated tidbits this week.
First, as a follow up to our previous blog entry on issues with RPG's XML support bombs.html, there is news this week of another PTF related to XML support. This one fixes a couple of shortcomings in XML-INTO support. Unfortunately it is only available for the 6.1 release, but that's a lot better than nothing. The new support helps in two problem areas. The first is in cases where a element contains both data and attributes:
<Customer type="retail">Smith and Company</Customer>
Until now, XML-INTO was unable to handle this situation and you had to play "silly games" to access both.
The second problem area addressed by this PTF concerns the handling of nested elements that repeat a variable number of times. Currently if you specify the related array as (say) Dim(50), then a run-time error occurs if less than 50 nested elements are present. The only cure for this has been to specify the %XML option "allowmissing=yes". The problem with this is that it doesn't allow you to specify what is allowed to be missing and therefore allows anything to be missing, so it is a bit of a blunt weapon.
We'll be digging into these new options in more detail in our next IBM i EXTRA article (click here to subscribe), but if you can't wait for that, more detail can be found on IBM's RPG Cafe
It's a sMash!
Another thing that piqued our interest this week was WebSphere sMash. IBM describes sMash as, "A development and execution platform for quickly building agile, web-based applications." but since we encountered it in a PHP publication, it was that aspect that intrigued us. In our minds (and we suspect yours too) we equate WebSphere with Java--so the notion of WebSphere embracing PHP was an interesting one. Turns out that sMash supports applications written in both PHP and Groovy (a dynamic scripting language like PHP, but designed to exploit existing Java skills). Not only does sMash support
the two languages, it allows them to intermix just as IBM i allows intermixing of RPG, CL and COBOL. sMash has evolved out of Project Zero--IBM's first foray into what they term a "public incubator," which remains the development base for the project. This is not your father's IBM!
In addition to further cementing PHP as a major player in the enterprise, sMash has also contributed directly to its current and future health. How? Well this particular PHP implementation wasn’t based on the Zend engine as are most others, including our own IBM i implementation. Rather it was rewritten completely in--you guessed it--Java! During testing of this new implementation, several behavioral differences with the current PHP standard implementation were encountered. Since many of these
behaviors weren’t covered by existing PHP test cases, sMash developed many hundreds of new tests, which were subsequently contributed to the PHP test bucket. Isn't symbiosis wonderful!
Once we've had a chance to download sMash and give it a bit of a test drive we'll report back on what we find. We'd been intending to investigate Groovy anyway, so this is an added incentive to do that.
One last thing before we go. We're speaking at the WMCPA spring conference in Delavan, Wis., this week and at NEUGC in Framingham, Mass., next week, followed by our own RPG & DB2 Summit event in Orlando, Fla., the following week. If you’re attending any of these events, drop by and say hi. If you're not currently planning to attend, please consider doing so.
Connect With Us: