Blogs

Change Case in RPG - UPPER to lower using XLATE vs. SQL

  • Posted on: 15 February 2015
  • By: NickLitten

Changing sentence case is easy with RPG

dcl-c lowerCase ('abcdefghijklmnopqrstuvwxyz');
dcl-c upperCase ('ABCDEFGHIJKLMNOPQRSTUVWXYZ');

dcl-s inputString varchar(200);
dcl-s outputString varchar(200);


  //CONVERT FROM UPPERCASE TO LOWERCASE
  inputString = 'Convert from lowerCase to upperCase';
  outputString = %xlate(lowercase:uppercase:inputString);
  dsply outputString;                                            

  //CONVERT FROM LOWERCASE TO UPPERCASE
  inputString = 'CONVERT FROM UPPERCASE TO LOWERCASE';
  outputString = %xlate(uppercase:lowercase:inputString);
  dsply outputString;                                            

         

But it's even easier with RPG and SQL because you dont even need the XLATE variables and this will let you catch all the special characters for that language:

dcl-s inputString varchar(200);
dcl-s outputString varchar(200);

CharField = 'hello db2 summit!';

  //CONVERT FROM UPPERCASE TO LOWERCASE

  EXEC SQL SET :outputString = UPPER(:inputString);

I will leave the lower to upper to your imagination  ;)

 

How to fix VPN problem after Win8.1 update? It's the same as Windows10 just use Compatibility Wizard

  • Posted on: 10 February 2015
  • By: NickLitten
absolutely nothing to do with VPN or Windows... but DAMN its a sexy motorcycle

Bloody VPN is giving me a headache!

Microsoft released an update to Win8.1 this week -- which has screwed my Cisco VPN connection. Again. I thought it was only my Win10 laptop that was hating Cisco VPN but I think there is a developer on the Windows team that hates Cisco... lets call him "Henry". Well, Henry is a little bugger because he likes to screw with VPN compatibility, tinker with required MTU settings and basically shaft us poor windows users who have multiple VPN connections. Luckily I have found a fairly solid way of fixing these problems over the last couple of months.

Compatibility Wizard setting to WIN7 generally does the trick, but I always recommend re-installing the software first because (a) it will ensure you are running the latest version and (b) will make sure the software registry is all setup correctly. So lets get to it...

(1) Reinstall the VPN software

Cisco Anyconnect

Cisco Legacy Client (5.0.7)

Example RPGLE web service program [SOAP]

  • Posted on: 20 January 2015
  • By: NickLitten
provide a web service not consume a web service

Meeting Notes from webservice proof-of-concept tech-talk

 

Free SOAP Test Tools

Use SOAPUI for testing webservice input data and validatin the XML replies.

SoapUI is a freeware tool to help test all IBM i webservices; all developers need to download and should use this. 

 

Components

RPG program to prepare the SOAP request - takes input and returns back data; RPGLE

Using SQL inside of the RPG programs to get data which is easiest

 

IBM i Web Server Tool

o    http://ahptest:2001/httpadmin

o    HTTP Admin interface for iSeries

o    Use IBM i ID/Password to log in

o    Use the Manage Web Services Server, use WIZARD to create the WSDL files

o    SOAP21 is new webserver created by Nick and all new servers in here

o    Need to delete then re-add each time you publish a service (Managed Deployed Services then Uninstall to remove; Deploy to add one)

Upgrade Drupal 6 to 7 - Part3 Migrate ubercart from Drupal6 to Drupal 7 in simple steps

  • Posted on: 17 January 2015
  • By: NickLitten
drupal is druapl is drooopulululuu

(follow on article from http://www.nicklitten.com/blog/upgrade-drupal-6-7-part2-setup-drupal-7-w...)

Lets review what we have done: We have cleaned up the old Drupal 6 website to make it as minimal, clean and fully functional as possible. It's just housekeeping and a good thing. We have installed an empty Drupal 7 content management system in a new webserver (or in our case a subdomain of the original server) and we have installed the ubercart and migrate modules to the new Drupal 7 site.

#3 - Migrate from Dupal 6-7 in easy steps

So, we are ready to get it done.

Turn on Ubercart and setup the basic store info and prepare the PRODUCT content type (so that we have a content type to import into)

Turn on Migrate modules:

enable migrate modules

and as this the third blog for the day, I think it's time to stop typing and record a screen-cast of the import actually working.

Fingers crossed and lets do this:

Upgrade Drupal 6 to 7 - Part2 Setup Drupal 7 website empty and ready to receive

  • Posted on: 17 January 2015
  • By: NickLitten
lets do some drupal tweaking

(follow on article from http://www.nicklitten.com/blog/upgrade-drupal-6-7-part1-using-migrate-an...)

We are not focussed on a running an upgrde here, instead we are going to create a clean Drupal7 website and import (or migrate) the contect into it.

#2 - Setup a Drupal 7 installation for a Drupal6 upgrade

So, we have the original Drupal6 website now running in a clean state, with old crap purged and unnecessary modules uninstalled and deleted. You mileage may vary but my websites look something like this:

drum website in drupal6

and the new install of Drupal 7 -- I set this up in a subdomain on the new server. It uses it's own database, is seperated into a drupal7.drumstheword.com subdomain and is just good old plain vanilla Drupal 7:

Upgrade Drupal 6 to 7 - Part1 Using MIGRATE and UBERCART

  • Posted on: 17 January 2015
  • By: NickLitten
upgrading drupal is simple if you follow the right steps

Las month my cousin, drumming demi-god Rob Litten asked me to help him upgrade his website. He has been running a very succesful online drumming sensation called Drums The Word for a few years now. It's a Drupal 6 eCommerce website running Ubercart focussed on selling digital products -- downloadable videos and drum lessons.

We played with Wordpress for a while but he didnt like various things about the WP user Interface, we discussed Drupal 8 but it's still in Beta and didnt think it was the right solution to this business critical eccomece website (not yet anyway) so Drupal 7 was selected, ubercart7 was chosen and it's time to migrate from Drupal6 upto the much nicer (imho) Droop7.

#1 - Tidy up your old Drupal6 configuration as much as possible.

This is really a pretty straightforward and obvious process: we dont want to migrate a crappy, messy drupal 6 installation into a new shiney drupal7 one do we?

Anyway - Lets walk through a live example and I will do a screen-cast on youtube recording the actual migration bit. First of all, lets talk about the old Drupal 6 website. To get it tidy lets just do this:

Katy Perry tweeted my youtube video

  • Posted on: 16 January 2015
  • By: NickLitten
Katy Perry is beautiful bird thats for sure

Katy Perry... PHWOAR!   ;)

This antipodean beauty is working on her performance for the American Superbowl half-time show on February 1st 2015. How does she get inspiration? Well, it looks like she browses around Youtube looking for interesting dance videos, because she has tweeted that she watched one of *my* youtube videos :0

oooh a brush with super-stardom and I've gone all flustered and weak kneed like a tweenage girl. 

The dance video itself is something I discovered a few years ago and found it beautifully weird, slightly disturbing and definitely thought provoking. It's a performance recorded by Sadlers Wells theatre and it's called "bODY_rEMIX/gOLDBERG_vARIATIONS - a Ballet in two acts". But thats the wrong name it should have been called "sEXY sPIDERdaleks and a SCarY BLOKe on a skateBOARD"   

#‎JeSuisCharlie‬ - I stand with Charlie Hebdo

  • Posted on: 7 January 2015
  • By: NickLitten
freedom of expression

get a grip!

Gunmen have shot dead 12 people at the Paris office of French satirical magazine Charlie Hebdo in an apparent militant Islamist attack. Four of the magazine's well-known cartoonists, including its editor, were among those killed, as well as two police officers.

Source: http://www.bbc.com/news/world-europe-30710883

Clearly, only the worst people alive could commit such terrible acts. If these terrorists are driven by religious fanatacism then I hope they burn in whatever hell their fevered minds imagine.

These masked men killed twelve people in cold blood, because the news paper they worked for published a cartoon that the masked me didnt like. Just think about how insane that sentence is?!

I would like to see every newspaper, every website, from every country publishing the Charlie Hebdo cartoons in solidarity against this terrible act of terrorism. Normalize the notion that other human beings are allowed to have different beliefs. Normalize the notion that other human beings are allowed to disagree with you and make jokes about it.

Jibbers Crabst - convert to Crustaceanity

  • Posted on: 25 December 2014
  • By: NickLitten
All praise the holy Jibbers

praise jibbersThe oatmeal is one of my favourite online distractions.

Matt Inman, the author of the aforementioned comic brilliance, recently gave a speech at BAHFest West 2014. He presented an alternate theory on the origin of the universe, and related his belief in the cosmic deity that created all things. Praise Jibbers.

NOTE: I am a definite atheist, probable agnostic and openly secular human being. Religious people will sometimes use the phrase "the root of all evil" which is ironic since Religion itself is the root of all Evil. However, after saying that and after seeing this proof of his Holy Crustaceanity Jibbers Crabst, I think that JC has drawn me back in to the lands of religious dogma.

:)

Writing RPG program code using SEU getting error - "The keyword is not recognized; keyword is ignored"

  • Posted on: 11 December 2014
  • By: NickLitten
RPG Handler supported by SEU

Why doesnt SEU let me enter the HANDLER keyword to my F-SPECS in RPG?

Because, SEU is a code editing program that was designed decades ago (it sounds *really* old if you say it like that) and isn't aware of any of the newer RPGLE operation codes.

Source Entry Utility error with new 7.1 RPG code

You have two basic solutions:

Pages