My Blog

IBM i #IBMiStepUp

I've been working with a new customer recently which means I'm once again, finding myself in the i-vangelist pulpit.  I was about to say that I'm tired of responding with "Huh? You said AS400? Do you really still have one of those old machines? I thought IBM stopped making those in the nineties..." but a little secret part of me quite enjoys the sarcastic bluster of it all, and if I'm honest - gets a kick out of it    ;)

The IBM Power System is still being referred to as either (a) an AS400, (b) the 400 or (c) an iSeries. The Dinosaur developers need to be educated and reminded that our lovely box has been through some changes in the last ... fifteen... years! Yes, it really is that long since the AS/400 was replaced with the iSeries. How can IT professionals have failed to notice that the AS/400 no longer exists?

Mr Trevor Perry has long been a proponent of the IBM i moniker and tries hard to educate the masses via his excellent blog at

crank sensor makes no sense

boom goes the dynamite

Crank Sensor didn't fix anything   :(

the golden gateHowever, on my life mission of looking on the bright side, it did work for nearly eight weeks straight. Before refusing to start while parked outside a client office in San Francisco, which is only really a minor embarrassment. I suppose it could have happened half way across the golden gate bridge which would have been far more excruciating.

That is a world record for this dodgy Landrover LR3.

But it seems the ghost that used to haunt the engine has tracked me down again.

So, I'm typing this from my hotel room.. with a rental car parked outside once again. The most annoying thing is that when I go into the office tomorrow morning I can guarantee the car will start first time.

UPDATE: the bloody thing did run perfectly the next morning. At time of typing this update it has also been two weeks of error free starting. Aaaaargh



Rich Beyond my Wildest Dreams thanks to Rev Dr. David Anderson

stupid people click on stupid emails

I got an email this morning telling me that I have somehow, miraculously, out of nowhere inherited over ten million dollars. Yahooo! I'm rich beyond my wildest dreams.

All I have to do is email my personal information, my bank account details and my drivers license information to The Very Reverend Doctor David Anderson in China. Once they have verified my information - they will send me $10,500,000.00!



using IBMi FIELDPROC encrypt sensitive data

I wrote a data encryption routine a few years ago. In my ongoing mission to refactor my old utilities, I was looking at it this weekend thinking about ways to improve it. The basic premise behind my routine is to read a row of information from a file, perform encryption of said data based on a specific 'key' and then hide the key within the encrypted data - so it can be decrypted correctly at a later date. Keeps data safe from prying eyes even if they manage to get access to the file data itself. This worked very nicely for obfuscating the source code for my Projex4i programs, but has bitten me on a few occasions when somebody has tampered with the data in the file, therefore making my encryption key incorrect. Tampered data means I have effectively lost my ability to decode it.

There must be a better way right?

There is - FIELDPROC in IBM-i v7.1

What is Field Proc?

Let me build your website

who knew that Professor Uncle Dave would make this impace

If you want a memorable website that attracts new customers, a website that explains who you are and explains how to contact you... You've come to the right place.

I have always focussed on quality affordable websites designed and built to your requirements. I offer input where needed but strive to build a site that matches your vision. Over the Years I've developed websites for clients worldwide. Once the website is delivered I still stay with you because building your website is only half of the job, your website needs to be properly marketed to generate fresh visitors and sales.

  • Need a website?
  • Want a cool domain name?
  • Email that you can access just like Hotmail?
  • A family website for sharing photos and videos like YouTube?
  • Is your search engine ranking high enough?

I've built websites ranging from single pages to complex eCommerce sites allowing customers to interact with each other on a forum. The key is in listening to your needs and creating a solution that exceeds your expectations.

Drupal7 MediaGallery Colorbox Integration

spying spaniel

I recently installed the DRUPAL MEDIA GALLERY module and really like it. Finding a simple to conifgure Drupal Image Gallery has been a thorn in my side for an age. This one works nearly perfectly - except it just will not handle COLOROBOX as its image handler because of its inbuilt integration with LIGHTBOX  - a similar function but I prefer the way colorbox looks looks. So before I was forced to unisntall colorbox and integrate lightbox instead, a quick Google search showed me this simply excellent blog post by Paul Junior.

It's not often I repost someone elses blog but this one is just spot on:

Anyone who has tried to user the Media Gallery module on a site that already has the Colorbox module installed will know that they do not play well together.  If you have both modules enabled, create a gallery (with lightbox capabilities) and try to click a thumbnail, the lightbox will not show.

RPG Debug display large field content

How to view big fat fields using the RPG Debugger

In my on-going mission to to prove that you can teach an old dog new tricks… I learned a neat one today. I was trying to debug an IBMi Web Interface program (IBM RPG/FreeFormat Language) that was blowing the 64k field size limit when reading in an XML string containing hundreds of order lines.

"Yes, I know the upgrading to IBMi 6.1+ will solve the problem and increase the field limit to 16MEG (Yum!) but the client is on v5r4 and I’m stuck with that….”

So, after a little XML cleanup routine I go the field size down below the 64k limit but still had a problem with XML validation. More scratching of head and after running around in debug I discovered that my XML-RPG validation routine didn’t like something at character position 34,381 in the string. Of course, when in debug and you look at a variable it only shows you the first 1000 character of any fields data:


EVAL gReqData                                                         

GREQDATA =                                                            


how to make a quick simple and tasty Indian Curry

curries look and taste like heaven

Hello... my name is Nick litten and I am a curry-a-holic.

I was talking to a colleague yesterday and he asked what I missed most about England. I didnt even need to hesitate in answering the Good old Anglo/Indian Curry (closely followed by 'the local boozer').

I've now been on this side of the pond for nearly four years and have still yet to find an Indian Restuarant that comes close to The Surrey Tandoori for their excellent Chicken Patia or my late night favourite the Diwan-E-Khas, where I would stroll every week for a post-pub noshup. My mouth is watering just remembering.....

I love to make my own little spicey dishes of random stuff. Everything ranging from my vesion of a Curried Duck to a pot of left overs with lots of chillis and spices. The Hotter the Better!

Randomly surfing looking for inspiration for this evenings meal I stumbled across this excellent little page talking about how to make a simple curry sauce which can be cooked with anything... just add chicken, pork, vegetables, seafood, etc... Yummy!:

Best way to setup EXTPRC using Turnover at V5R4

Question: How do I promote External Procedure using Turnover and get them to automatically *REPLACE on the destination machine?

Answer: Like this!

The problem here, is that SQL Stored Procedures have no equivalent of *REPLACE on the CREATE PROCEDURE statement (they do in IBMi 6.1+). That's easy - "just add a Drop to line one of the SQL source code" I hear you say... Well its not that easy in Turnover either. Adding a DROP to the SQL, while using IBMi V5R4 issues a Severity 20 warning message and unfortunately a SEV(20) causes the Turnover SQL Promotion to *FAIL.  Aaaarrrgh!

But wait... help is at hand. We just need to over-ride the default SQL *EXTPRC command to only fail if the severity breaches 20. How about we set it at 25? Luckily thats easy to do:

1 - Set 25 Default

Setup Turnover to over-ride the default severity on the TRUNSQLSTM command (this is the command that Turnover runs to create stored procedures during promotions).

So, launch Turnover and goto - DEV | ADMIN | Type Codes and select EXTPRC.

How to see which forms were ran from a specific Turnover Application?

The answer is "YES"

Here is the green screen (5250) way of doing it.

1 - Go into Turnover main menu using cmd(TURNOVER)

2 - Option 6. Work with Forms

3 - Press F17(Filters) and enter the Filter information you want to look for

When you press enter you will see just the FORMS that satisfy that particular filter condition.




once an AS400 always an AS400

as400 iseries is coffee

I was reading an interesting thread on Linkedin this morning, discussing another article about the much loved AS/400

Being as I am an old-school S/34, S/36, S/38 guy from back in the Reagan/Bush days ~ I will still call it “the 400” ~ (iSeries / Series i / Power systems never caught on with me). The original “Silverlake” project started over 25 years ago, and the 400 is still cranking. I raised my children from diapers to degrees while programming on this durable box.

There have been many improvements to the 400, heck IBM even switched it from plain ugly tan to cool sleek black – but the fundamental machine is still the same. It has not tried to be something that it is not. The 400 has not been “improved” beyond what is reasonable. It has remained as steady (and ubiquitous) as the ordinary cup holder – which is pretty extraordinary these days.

[original article]

Windows 8 Shortcut - Win+PrtScrn

Windows 8 shortcut


Windows Key + PrintScreen: Screen capture

I've long used the SHIFT-ALT-PRINTSCREEN technique to capture screen shots in Windows XP thru 7.

But in Windows8 there is a new PrtSc function - when you press WindowsWindows-PrtSc it not only captures the screen but also saves the screen short as a PNG FILE into the Screenshots folder located in your picture library.

The old methods of a simple copy to the clipboard can also be used by pressing the PrtScrn key or Alt-PrtScrn for the active window only.

Update WebSphere Development Studio Client to Version

So, you've installed WDSC7 now what?


1 - Automatically update to WebSphere Development Studio Client, Version

Install the fix pack with the same user account that installed the product.


  • WebSphere Development Studio Client for iSeries, Version 7.0,,,, or must be installed.
  • The product cannot be open when you install this fix pack.

To find and install WebSphere Development Studio Client, Version as an update:

Download and Update WebSphere Development Studio Client WDSC7 for free

I'm an IBMi Developer - do I choose SEU, RSE or WDSC?

If your caught between using SEU (Stoneage Editting Utility) and RSE (Really Stupidly Expensive) for your IBM-i code development environment - you have one other glaringly obvious choice - WDSC (Wonderful Double Super Codetool).

Personally, I like WDSC because its $FREE and I'm cheap :)

This was the last iteration of the Websphere Development suite before IBM, rebuilt and rebranded it as the 'Rational Developer Tool' and decided to charge $900 per copy. For Freelance RPG Programmers like me that just puts the tool completely out of my budget. how could IBM possibly justify $900 for a single code editor application that was previous free. Compare this to Microsoft MSDN charges where I gladly pay $300 for a license for every single piece of Microsoft Software out there! That is a big thumbs up for MSDN subscriptions and a big raspberry for IBM's RDi/p costs.

Single Black iSeries looking for a lasting relationship with the latest IBMi operating system

I love programming (RPG, JAVA and CL) on the IBM i Server range... but it feels like IBM are trying to stop me. Aaaaargh!!!!

"But Nick, whats the problem old Chap?" I hear you askcome on ibm i expect better customer service

Here I am - a huge advocate of IBM i technology. I've grown up through the ranks of IBM System 3x systems and evolved alongside IBM through the AS400 and 'i' years. I've excitedly played with the quiet, yet groundbreaking changes in hardware and software that came with the iSeries/eServer range of Servers. I've scratched my head slightly at the i5 branding. I've shook my head at the weirdly blurred focus on Linux. I've cheered at the Power5 Processor range and final (hopefully) name consolidation of the Power Server Hardware and IBMi software. I'm an i-vangelist in the strongest sense.

What does IT Consultant really mean?

I am not a fan of the 'IT Consultant' moniker because its kind of generic, non-descriptive and dull. Sadly, it's the industry standard so I'm stuck with it. :(

I would like to describe myself as a Programmer in the same way that a person who is a Butcher, Dentist, Mechanic or Carpenter is clearly defined. But then people think I am just a code monkey. *sigh* So, I'm back to writing 'IT Consultant' in any form that asks for job title.

So what does being an IT CONSULTANT really mean?

So I suppose in my case, being an IT Consultant means I am a software developer, IBM i evangelist, RPG language lover, Drupal enthusiast, software change management tinkerer, early adopter, proponent of open source and hopeless web addict.

My main fields of expertise are

Query Management Queries are Queer

So, I was emailed the following hints and tips document discussing the ubiquitous Query Management Qeuery object type on the IBM Power Server (the artist formerly known as AS400). It's useful to refer to so, here it is:

QMQRY - QUery Management Query


The key to making a query dynamic is converting it into a form that can accept variables. The easiest way to do that is to convert your query to a Query Management Query (QMQRY). A QMQRY is simply an SQL statement stored in a source member. Once the SQL statement has been placed into a source member, you can replace hard-coded values from your original query with variables that can be replaced at execution time. If you've never worked with SQL before, you needn't worry; we will make use of an IBM command that will construct SQL statements for you.

We'll begin by creating the source file used to store your QMQRYs: QQMQRYSRC. To create this source file, use command Create Source Physical File:

Boris has a new crank sensor

boom goes the dynamite

Courtesy of the very nice chaps at Kensington Motor Cars here in Las Vegas -

landorver lr3 crank sensor jobbie

A new engine crank sensor!

Now... this might seem like a tiny little bit of plastic and metal but is it the savior or haunted LR3 engines everywhere?

After many, many, many discussions with the garage owner (Bill) and Customer Service girlie (Trish) we decided this was the next angle of attack. Apparently this little gadget looks at the engine and decides to tell the starter motor wheter it should start - or crank as these Yanks call it - and if its a little bit whoozy or drunk then maybe it wont tell the engine computer its started. Or maybe it will tell it that its started - even when it hasnt. AHA! This could be it. I'm excited.

And guess what... changing the crank sensor seems to have fixed it!

It's now been three weeks and still going strong. Boris has started every time.

It's a miracle.

So much for the famous Exorcist quote - I've revised it to "The power of the crank sensor compels thee"


Camp Bow Wow Las Vegas - Pet Hotel with a difference

Bailey during an evening walkies in Vegas

My hound, Bailey Version Two, is staying with the wonderful chaps at Camp Bow Wow Las Vegas this week.  I'm Hurricane dodging on the East Coast, and didnt want to risk flying him over here with all the potential air travel problems. So, he's shacked up for ten days with his buddies at Camp. I did laugh this morning, when I discovered that Bailey had taken time from his busy canine-play schedule to email me:

How are you?? I am just fine at Camp. I miss you soo much but dont you worry about me.. I am keeping nice and busy with all of my pals and the counselors, too! Here are a couple cute pictures of me for you to enjoy while we're apart. Hope you like them! Miss and love you lots and cant wait to see you ! XOX
Furry Regards,
Bailey the Springer Spaniel
Love those Camp Bow Wow folks... its the little things like this that make them my preFURd pet people in Vegas   :)

using %REPLACE to Scan Replace in RPG4

replace my head with a younger more handsoe one please

So, I want to do a SCAN and REPLACE in RPG - What's the easiest way?

Using the %REPLACE built in Function is easy and efficient allthough code wise its a little cumbersome:

// Update email address                                  
Dow %Scan('L#EMAIL': %TRIMR(SrcDta )) > *Zeros;          
    SrcDta  = %Replace(%trimr(ParmEmail) 
              :%Scan('L#EMAIL' : %TRIMR(SrcDta ))

In this example, I am scanning a program variable (SRCDTA) looking for any occurence  of the word "L#EMAIL" and replacing it with the contents of "PARMEMAIL". The email value is %TRIM'ed which means that any blanks at the end of the email address are ignored.

I use a similar process in the PROJEX Service Program and then you can easily run a SCAN/REPLACE on a single line of RPG code.

So lets say I wanted to scan for the word 'bob' and change it for the word 'Fred' within a string i could do it like this using this Prototype:

$ResultVariable = #Scanreplace ( $OriginalVariable : 'bob' : 'Fred' )

Much simpler than using the complex %REPLACE BIF I'm sure you will agree. 

Here's the Prototype: