Blogs

Drums The Word - Website Version Two Point Oh!

  • Posted on: 14 June 2015
  • By: NickLitten
Robert Litten - rob the drummer
Over at DRUMS THE WORD a new kid is on the block; the new kid is the old kid, but with a new coat on.
 
The King is dead so long live the King!
 
Rob and I have been working together over the last six months, between him in Hampshire (England) and me in California (America) and now South Carolina... we've taken his seven year old Drupal website and been through a full Drupal upgrade, but after lots of review and ecommerce tests Rob decided it just wasn't for him. His artistic flair took my logical programmer brain and gave it a well deserved right hook.... So, other CMS were reviewed and finally the winner was WordPress and Woocomerce. The final result is pretty damn slick and I'm super proud of the website collaboration that Rob and I have created. Many bottles of wine have been consumed, many Skype conversations have (literally) spent all day in design, testing and website revamps to come up with a rather cool new website.
 
Drums the Word V2.0 is born
 

Website Cleanup - Delete Drupal Users who have no ubercart orders

  • Posted on: 11 June 2015
  • By: NickLitten
sql trips for drupal

Migrating Cousin Rob's www.DRUMSTHEWORD.com website from his 6 year old Drupal6 website to a new (hopefully sexier) Wordpress4 website has meant a lot fo data cleansing before golive. Before we get any comments about Drupal vs. Wordpress, or a CMS flamewar, the new website was chosen to be on Wordpress because of WOOCOMMERCE and a neat Wordpress Theme that had already been selected.

So, I'm going to leave a little blog about any particular problems I found, or cool tricks I found, during data migration.

The old drupal website had over 48,000 users defined... many of them spam... many of them dead... many redundant or no longer needed.

So how do we cleanup users?

Using the PHP panel I used this SQL script to select the users that have been registered but who have never ordered anything using Drupal6 Ubercart:

select count(*) from users where mail not in (select primary_email from uc_orders) and uid <> '0' and mail NOT LIKE "%drumstheword.com%" and mail NOT LIKE "%projex%"

note: do not touch uid=0 because this is the ANONYMOUS user and do not touch any *@drumstheword.com or *@projex.com users

this will give you a count value showing how many users are selected and if your ready to delete then just use:

You gotta get GIT - change management for RPGLE via the IFS

  • Posted on: 4 June 2015
  • By: NickLitten
git off that code you slack jawed larkey whistle box

Thanks to Mr Aaron Bartell (of Krengel Technologies) for this excellent article on using GIT for controlling source code changes on IBM i.

I've been doing this for a while on source code for PROJEX4i and have kept meening to write a little blog about it. Aaron's article nicely touches on the high level concepts of GIT, it's ease of use and nice documentation techniques. Perhaps I will follow this up with another blog talking about GITHUB and it's lovely windows GUI for GIT'ting things

<Article originally published via itjungle.com on 2/10/15>

In a previous article, we learned about Ruby methods and encapsulation. During the various exercises there were many code changes made and we didn't really have a simple way to keep track of how the code changed from one version to the next. That's where source change management (SCM) tools like git come into play and is what we will be diving into with this article.

Display, View, Debug IBM i Data Queues

  • Posted on: 20 May 2015
  • By: NickLitten

Data Queues are a common object type in many applications on IBM i Systems: They offer an easy way to queue up data to be read and processed. Easy to load, easy to read and an easy way to handle sequential data. The only thing that I really dont like about them is the tricky way you have to poke around in them to look at their contents. But, I found this neat article on that highlights some new IBM i *API's that change to the old way that data quees are handled... we can now retrieve data queue entries without removing them. Yay!

This allows us to peek at Data Queue contents without upseting programs that are processing the queue itself...

 

In the past month or so, I've received two requests related to accessing data queue (*DTAQ) information. The first request concerned finding out how many messages were currently on a *DTAQ and how long the oldest message had been on the queue. These questions, to me anyway, suggest a management application to periodically poll *DTAQs and determine whether they are backlogged and in need of additional readers to be started and/or are stuck for some reason, for instance an outstanding inquiry message.

 

Varying fields in DDS after SQL:

  • Posted on: 6 May 2015
  • By: NickLitten
I found this terrific article over at IT Jungle. It's an oldie but a goldie

 

Working with Varying-Length Database Fields

 

Hey, David:

We use a utility to replicate data files between our iSeries system and several SQL Server databases running on Windows 2000. When the original file definition comes from SQL Server, this utility creates varying-length character fields on our iSeries. This caused a problem in an RPG program when I forgot to set the length of the field when I changed its value. Do you know how much space we save when a field is varying-length? Also, what is the easiest way to determine and set the length of data in a varying-length field after changing the field's value? Our programs are ILE RPG, and we are on V5R1.

--Rob

 

AS400 Client Access is dead - long live IBM i Access and BETA software!

  • Posted on: 4 May 2015
  • By: NickLitten
beta iseries emulator

Ask any AS400 programmer, iSeries Developer or IBM i Nerd and they will all tell you that good old "Client Access" is a pain in the arse!

Client Access was introduced back in the hazy 1990s on the old AS400 for DOS Computers, it was marginly revamped for the launch of the iSeries some years later. Premillenium saw Client Access being focussed more on Windows computers and now a decade later, it's finally being totally rewritten for the modern world of IBM i systems and connecting from any platform you like -- "Yes" its all written in JAVA so we will finally have a mobile solution to connecting to our IBM i Server from anywhere at anytime.

I've been running the technology preview for the last 6 months and overall am very impressed.

It's pretty solid and the main 5250 green-screen emulator is a big improvement over the old green screen emulator.

IBM i Error Message of the day - CEE3201

  • Posted on: 15 April 2015
  • By: NickLitten

Yesterday, I wrote a little SQLRPGLE web-service program to retrieve Picking details from System21 Warehousing. Days like this I really enjoy my job. Writing new programs in RPG is just plain good old fashioned fun. It ran perfectly with the handful of test data that I had to play with. But today I am testing it and after signing into the Infor S21 ERP and generating some pick notes, I find that when I have a hundred or so pick lists. Call the webservice and the program is timing out with an unusual error message: IBM i Exception code CEE3201.

I've never seen CEE3201 before and it has a generic error code that proclaims Exception recursion detected.    

sqlrpgle webservice error

Message . . . . :   Exception recursion detected.                            

Cause . . . . . :   An unhandled exception occurred in an exception handler. 

Recovery  . . . :   Do not let an exception that occurs in your exception handler go unhandled.

Start Stop System21 Background Jobs (WHSE, GL, IN, OE - BACK3)

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

This is just a memory jogger for me and while I was typing this in my notes I realized that someone else may have asked the same question: "How do I see the status of the System 21 (JBA/GEAC/INFOR) background jobs to see what is running?"

I feverishly search the interweb superhighway and apart from some mystical mumbo-jumbo from ten years ago on an old ASCII bulletin board nothing came to light. Luckily, during a meeting today one of my clients propellor heads told me the infor program that does the magic. The simple answer is "L1017 is the program that shows the status ofall the system21 background jobs and allows you to start and stop them"

Nice.

So, 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

It's easy to upgrade AS400 RPG/400 to modern web-enabled IBM i RPGLE... Honest!

  • Posted on: 11 April 2015
  • By: NickLitten
upgrade old source code to modern style doesnt have to be tricky

RPG Code Modernization made simple

or a tale of taking old crusty gray haired legacy RPG and making it modern rich and vibrant -- or is that over playing it too much? ;)

The more I play with the latest version of IBM's programming language 'RPG' the more I like it. It's a quantum leap from the old RPG column based style of the 1990's and the latest version of RPGLE is free format, readable and easy to code. It's moved away from the old clunky keyboard terminals of pre-internet days and has all the bells and whistles of any modern language coded using modern IDE's. The trouble with RPG is it's astounding success during the 90's and the billions of lines of code written globally that are still running in today.

If it's not broke -- dont fix it!

This is the problem. How do we sell the benefits of a rich modern programming language when the old program is simply running, with no errors for years and possibly decades?

The simple solution to this is to keep the same program! Wouldnt it be nice if there was a way to automatically modernize the program source code so that it was upgraded to the latest version but still functioned exactly the same and was able to be maintained in the same legacy way. Wouldnt it be nice if there was a utility that would take any System36 RPG2, any System38 RPG3, any AS400 RPG400 or any version of column based RPG and convert to modern easily maintained RPGLE program code?

MSGGEN048 Error on IBM Client Access Solutions

  • Posted on: 20 March 2015
  • By: NickLitten

I installed the first Technology Preview (aka Beta) for the new version of IBM i Access (aka Client Access) a few months ago. I really liked it, but was working on a clients project which had different standards for TN5250 and a few other things. So, to align with my team mates I worked with their software instead. Now, fast forward a few months and I'm on a new project and decided to fire up the old Technology Preview to have a play with it.

*BOOM* Error message: MSGGEN048 IBM client access solutions trial has expired

I really wanted to try out the tech preview and see how it feels so I did a little digging and discovered you can over-ride the installation date here: HKEY_CURRENT_USER\Software\JavaSoft\Prefs\com\ibm\iaccess\base\trial period start

Pages