Talking to using XML, RPG from IBM i

  • Posted on: 30 November 2013
  • By: NickLitten

So, for the last few weeks I've been working on adding credit card handling to a legacy RPG application with an static HTML website over the top. The application code itself was written in the eighties and has evolved through a number of different versions of RPG (a mix of RPG2, RPG3, RPG400 and even a liberal splash of RPGLE) so I've had an enjoyable task of taking a bunch of old code, re-factoring to RPGLE/free and then adding some funky web services.

Now I've added the CIM functions and windows to my website pages, I can manually test the payment process. Now, the documentation is not for noobs and makes an awful lots of assumptions, so implementing this technique on IBM i (AS400) using RPG, without a modern PHP Server on the front, is not as clear as it seems. After reading everything I could on the various SOAP, XML, JAVA, RUBY techniques - I've opted for the XML route.

The next step is setting up the XML conversation to this lovely IBM i System talk to After two days of googling, reading, studying, prototyping, re-prototyping, going down dead ends, trying sample code that doesn't work and repeating moaning and smacking my forehead with a wooden paddle.

So I want to

Latest version of RPG is RPG7.1 right?

  • Posted on: 13 November 2013
  • By: NickLitten

 RPG is not a Rocket Propelled Grenade

RPG2 is that Logic Cycle Thing

RPG3 is the System/38 version

RPG400 is the revamped RPG3 that came with AS400

​everything after that is RPG... unless its ILE then its RPGLE or sometimes RPG4, or its free format so its RPGLE /Free... or its SQL so its RPGSQL or SQLRPGLE... or as many people call RPG/Free - RPG FIVE..... aaaargh

Why doesn't IBM just have a simple version number for each iteration of the wonderful IBM RPG programming language?

IBM i 7.1 Technology Release 7

I love the enhancements to RPG with IBM i V7.1.7. RPG finally looks and reads like a normal modern language. With the advent of this latest version of IBM i, RPG has been neatly upgraded to be a fully free format language. This is a long overdue and a significant change to the language itself. 

Upgrade my written CV to an 'Infographic Resume'

  • Posted on: 9 October 2013
  • By: NickLitten

The peeps at say:

We believe that the traditional text resume is boring, lengthy and long overdue for a makeover. We are creating an online resume format that is beautiful, relevant and fun. We want to enable people to express their professional accomplishments in a simple yet compelling personal visualization. Our vision is to become the future of resumes.

Sounds groovy right?

The Vizualize website is in open Beta testing so I had to go and have a look... and its brilliant. Within seconds I had clicked a button to login with my Linkedin profile and the Vizualize website simply asked me if I wanted to import my resume from Linkedin and BOSH! It created this awesome infographic, with a cool URL ( and active pop-ups showing my work history.

IBM RPG sub-procedures are very saucy indeed

  • Posted on: 25 September 2013
  • By: NickLitten

This morning I got question from an old RPG3 chum of mine:

I know a couple of questions they will ask me, what are the different parms used on sub-procedures like *OMIT/*Nopass. Didn't we use those any way? I thought we were writing programs that did or did not necessarily get parms depending what called them using those keywords? To be honest, I know I can look it up but what the bloody hell is a sub-procedure?

My answer started off little then got into the huge waffling email stage. Bear in mind this is a very high level overview and not designed to get into the nitty-gritty of anything. Anyway, I just decided to copy/paste it here for future reference.



*OMIT/*NOPASS makes parameters funky

*OMIT - Lets you send a parameter as a value or as *nulls

Lets you use the *OMIT keyword when calling you program. So, if you just dont want to pass anything, you can say *OMIT - I think it just passes *NULLS and in the program that is being called you would say something like 

if %addr( parm1 ) = *NULL ;
  parmvalueinprogram = 'something';
else ;
  parmvalueinprogram = 'parm1';
endif ;


*NOPASS - lets you just neglect to pass anything at all

Don't even bother.  I think it just passes *NOTHING and in the program that is being called you would say something like 

A modern AS400 application starts with RPG Modernization

  • Posted on: 17 September 2013
  • By: NickLitten

This machine needs to be modernized!

...seems to be the chant of the moment.

But I put it to you that it is not the Computer System that needs modernizing: It is the applications that run on the system... and more importantly the *expectations* of the users and developers that need modernizing.

Most IBM midrange systems out there have been upgraded/replaced over the last five+ years with the latest IBM hardware - IBM Power Systems. Do IBM Power Systems need upgrading?


Even if you are one of the few IBM midrange shops out there running older system architecture like the older models of IBM iSeries Server, its not that they need modernizing - because I'm sure they are humming along quite contentedly. If your old iSeries Server is running latest version IBM i operating system then does it still need upgrading?


Life with Bailey the English Springer Spaniel

  • Posted on: 10 September 2013
  • By: NickLitten
Bailey Version 2 - happy lunatic springer spaniel puppy only a few weeks old

This is Bailey Version 2.0

bailey the springer spaniel after his first haircut

He's my wing man and constant companion. He never nags, never complains and is always thrilled to see me whether I have left him alone for a minute or for a day. To test if your dog loves you more than your wife - trying locking your pet and your wife in travel cage, in the hold of a plane, for 6 hours. See which one is more pleased to see you when you land. ;)

Bailey has flown around the USA with me and should have his own air-miles account. He was my car companion on our cross country drive from Charleston (SC) to Las Vegas, then a year later up to San Francisco and finally back to Charleston, SC. Six months later we cruised over to Texas for a few months. I should have a gold card membership at various doggie day care facilities, where Bailey spends his days during business hours. He's friendly and loves to chase balls, squirrels and just about anything that scampers, runs or slithers.

PDM user defined options

  • Posted on: 27 August 2013
  • By: NickLitten

Brief: PDM's user-defined options can enhance your productivity by reducing the need to key frequently used commands. This article offers some practical tips on how to implement user-defined options into your programming environment.

PDM's predefined options allow you to perform various tasks against libraries, objects, and members. But did you know that you can create your own user- defined options to execute almost any command including your own? You can also optionally, have PDM fill in or prompt command parameters.

User-defined options save you from having to enter frequently used commands. For example, if you often key the Work with Spooled Files (WRKSPLF) command, you could save time by creating a user-defined option called SP. Then, when you need to access your spooled files, you can use option SP. In this article, I'll give you some tips on configuring and using PDM's user-defined options. For additional information on using PDM, see "Getting the Most Out of PDM," MC, July 1992.

Creating an Option File

IBM i Emails with IFS attachments from RPG and CL using SNDSMTPEMM

  • Posted on: 22 August 2013
  • By: NickLitten
<p>Life as a <strong>IBM i</strong> Software Developer is fun, but life as an <strong>AS400&nbsp;software maintenance programmer </strong>can be a bit a grim.</p>

<p>I seem to spend the bulk of my time maintaining older applications - archaic code monstrosities that started life in the&nbsp;AS400 generation. "The AS400&nbsp;generation?" You remember these days in the early 90's when email was a new an exciting thing, Yahoo was the search engine of choice and the phrase 'social networking' hadn't been dreamed up. So, when I find that a new exciting snippet of IBM i Software has slipped passed&nbsp;my radar it gets me all twitchy.</p>

<p>Guess what I found out today?</p>

<h1><em>SNDSMTPEMM is a native IBM i command that will send emails with IFS attachments!</em></h1>

<p>By native I mean, it comes quietly packaged with the operating system. I can now send emails from within RPGLE programs or from the command line by simply entering the command. I can attach any kind of files from the IFS (PDF, TXT, HTML, XML, yadda yadda) and I can even format the body of the emails using HTML to make it look all pretty.</p>


Land Rover LR3 V6 2006 - the Big Boris Breakdown

  • Posted on: 16 August 2013
  • By: NickLitten
landrover break down

The Full Boris

This damn problem has been going on forever. I’m sick of it. Sick sick sick bleeuuuuurgh!

So come on people… someone out there must have a solution? It’s a totally weird starting problem but at least its now showing a repetitive solution. So lets go through it in clear English (well as clear as I can make it) and perhaps… just perhaps someone will kindly put me out of my misery.

CARFAX Vehicle Description: 2006 LAND ROVER LR3 SE

VIN: SALAD24436A347352



Engine: 4.0L V6 FI

Here we go:

This starting problem is utterly random. It might work perfectly for days, weeks on end then suddenly refuse to start. It happens when the car is hot, cold, wet, on a hill, in the sunshine, in a garage, while refueling or anywhere at any time basically. When the car is running it runs perfectly. When it starts it starts perfectly. It never misfires or does anything else naughty.

When the car is refusing to start – it will totally refuse to start. I have tried setting the alarm, immobilizer and even opening manually with the key override. Boris will not start.

I have tried leaving the car for an hour and then trying again. Boris will not start.

Turnover runs on IBM i not on 'iSeries'

  • Posted on: 13 August 2013
  • By: NickLitten

Turnover (from Soft Landings Inc) is a pretty cool Software Change Management system running on ISERIES *cough* IBM i.

NOTICE FOR SOFTLANDING SYSTEMS You are marketing your Change Management Product as 'Turnover for iSeries V100'. But IBM no longer sell the iSeries systems. In fact, IBM haven't sold this machine for a few years now and as we all know - a year in IT is a decade in the real world.

The hardware is the IBM Power System and, as we all know, the operating system is IBM i.

So, isn't it time to rebrand your change management software and call it - Turnover for IBM i V100?

when does iseries become IBMi