Web Services for Dummies

  • Posted on: 3 December 2015
  • By: NickLitten

What are webservices?

Broadly speaking "Web Services" are programs that let one computer system talk to another computer system over the internet. For example, you might want to enter customer details into a office computer system and have those customer details be checked on an online 'address checking' website or something similar.

Today, Web Services are self-contained, self-described, component applications that can be published, located, and invoked across the Web. Web Services provide a standard means of interoperating between different software applications running on a variety of platforms. eXtensible Markup Language (XML) provides the extensibility and language neutrality that is the key for standards-based interoperability of Web Services. They perform functions that can include anything from simple query responses to complex business processes. Once a Web Service is deployed, other applications can discover and invoke it. At present, Web Services require human interaction for identification and implementation.

A web service has list of methods and procedures that can be used by any of the applications irrespective of the programming languages, OS, hardware used to develop them. Any type of applications can access the functionality provided by the web service and such functionality is called web methods or web APIs.

RPG example - How to retrieve System21 Background Job status

  • Posted on: 18 November 2015
  • By: NickLitten
L1017 Infor start stop application background jobs.png

"How do I check the status of the System 21 (JBA/GEAC/INFOR) background jobs from an RPG program?"

I was asked to hack together a quick little routine to check the status of the System21 background jobs, for some specific web-service calls that were talking to an IBM i system running INFOR's System21 ERP. Hmmm... That is an awful lot of words in that sentence! Let's try it again. I am trying to say this "a web-service call to JBA SYSTEM21 needs to know if a background job is running before it does something". In this case the background job its checking for is called "WH_CONFDSP" the warehousing confirm dispatch job (or post shipment as Americans call it).

So, we know that System21 ERP does some things interactively and some things in background (aka "batch") mode.

We can easily view the background job status' using the System21 Menus: we can either goto menu /L1S (or L1SUS if American) in both the green screen and Infor Client or simply call the program from the command line:

s21 background

Chain(NE) hang low....

  • Posted on: 17 November 2015
  • By: NickLitten

The wonderful IBM RPGLE programming language:

What is Chain(N) and Chain(NE)


For file I/O requests in RPG (ie: Chain, Read, Reade, Setll, etc) we can add some options using

(N) - No Lock

(E) - Error Logging

(NE) - No Lock and Error Logging


Writing code in RPG the CHAIN operation code is used to go and get a specific ROW (or record) of data from a file. It returns the first entry that matches the KEY that is being used. In this blog let's look at what happens when the file(CustomerMasterFile) is defined in our program as an UPDATE file. So, if we wanted to retrieve the Customer information from a Customer Master file (assuming it is keyed by the company name and the  customer id number) we might code it simply like this:


CHAIN (Company : CustomerNumber) CustomerMasterFile;


which is basically the same as:


SETLL (Company : CustomerNumber) CustomerMasterFile;

READE (Company : CustomerNumber) CustomerMasterFile;


Does the B in BBC stand for Bigot?

  • Posted on: 15 November 2015
  • By: NickLitten
Iain Lee called homophobic views bigoted and he is correct. religious bigots are bigots.

I've been a fan of talk radio for many years. I enjoy listening to all kinds of talk radio ranging from Political to Theatrical, from Religious to Sports. I regularly drive long road trips and listening to an engaging conversation on the radio keeps my gray matter buzzing. Even when I disagree with someones point of view, it's always interesting to hear other peoples opinions.

Mister Iain Lee is an English radio presenter who excels at this art form  ;)   Sometimes he makes me laugh out loud, sometimes I disagree with him and find myself yelling at the radio and at other times I've got home and just sat in the car for 20 minutes to listen to the end of the show. For the last few months I've been listening to Iain Lee's podcasts from BBC Three Counties Radio...

So, I was surprised to see his name plastered all over Twitter yesterday and found out that the BBC has sacked him or maybe he quit lets just say they have parted ways after he was forced to apologize for an interview he hosted.

What was his grand mistake?

He asked someone with bigoted views on homosexuality if they realised their views were bigoted!

Program Source Code - Clever or Clear?

  • Posted on: 1 November 2015
  • By: NickLitten

I've been working on an interesting project focused on taking some old RPG code and re-factoring it to make it more efficient. Fascinating work for a client that is focused on doubling its IBM i throughput and reducing the CPU load of all its old programs. This has frequently made me choose between writing a single line of %BIF'd up code that looks slick and minimalist - or - writing 3 lines of code that are more readable and arguably (marginally) less efficient.

/me remembers the AS400 "SETON vs MOVEL *ON" arguments of yesteryear with a fond smile...

I think I've finally found my official position on this: I prefer code readability over specialized (aka clever!) techniques. I would rather write code that is a little more verbose, and well commented rather than do the same thing in a cryptic or obfuscated manner.

Yes, I'm guilty of waffling in my comments and sometimes using variable names that make me smile:

If WineBottleIsEmpty;



Remember, Software undergoes beta testing just before it's released.

Beta is Latin for "the program still doesn't work". 



Autodesk Inventor problem with Win10 - Student edition needs Win7

  • Posted on: 13 September 2015
  • By: NickLitten
hotle room, win10 x1 carbon, win7 lenovo Yoga and a mental dog

Eldest son has started a new high school class - Engineering. I'm excited for him because Engineering Science was one of the classes that I really enjoyed. Back in the day, we used slide rules, sketched on huge sheets of paper with hard pencils, used sin/cos/tan to calculate angles and load bearing values. Things were different back then but the basic principles were the same! Computers were something that I only ever saw on my weekly dose of Star Trek, Space 1999 or Blakes7.

Nowadays, the students will be learning how to use Autocad 2014 on their laptops. Tapping away and creating perfect technical drawings in the space of a few minutes.

*sigh*   Kids nowadays - /insert rant about how hard it was working down the mines when I was a kid  :)

But I digress...

So, Nate inherited my two year old IBM Lenovo Thinkpad Yoga 13s. It's a solid laptop, touchscreen and perfect for him to carry to from school and to play with Autocad on. Or so we thought.

JR Mobile Mechanic in Charleston SC - highly recommended!

  • Posted on: 5 September 2015
  • By: NickLitten
cheap mechanic in mount pleasant daniel island sc

Jerry is a friendly chap, accomplished mechanic with great prices and swift work!


It's not often I endorse a local business but JR Mobile Mechanic in Charleston is awesome! Jerry is a thoroughly decent chap, punctual, professional, did the job with minimal fuss and cleaned everything up afterwards. Great job Jerry -- you have a new repeat customer.

If you are in Charleston SC and need a solid reliable mechanic then call Jerry on (843) 345-5258



After recently relocating to Charleston, South Carolina, my stepsons Jeep Wrangler having the front brakes catch on fire -- well, maybe not a fire but a serious smokescreen for sure! He was driving along in front of me and suddenly the front drivers side started smoking heavily and I could see the Jeep juddering from side to side as he tried to slow it down. So, we swapped cars and I limp it home and get on Craigslist to find a cheap, local mobile mechanic who can come to our house and have a look at the thing...

First Experience

Encoding images in base64 for email signatures

  • Posted on: 2 September 2015
  • By: NickLitten
quills qweeels qwils erm pens

A couple ofyears ago, when I first moved to GMAIL, I wrote a blog (how to display images in Google mail). Things have changed massively since then, not least being the introduction of email .sigs in GMAIL itself. But, nowadays I get so much email fluff I have just decided to split my email into two accounts: GoogleMail for personal stuff and Office365 for business.

So I now have two seperate email sigs...

Personal email -- FACEBOOK Image in gmail signature

Now, with a basic knowledge of HTML you can edit the source code to include any extra bits you wish.

Nick Litten's Facebook Profile


Business email

I have a much more boring business email signature. So, when sending mails from my *work* account I simply use images pulled from the business server @