Blogs

RPG is finally set free

  • Posted on: 14 February 2014
  • By: NickLitten

Since the introduction of the latest Service Pack for IBM i V7 -- cunningly entitled 'Technology Release 7.1 -- RPG programmers can now finally eschew the old fixed column coding and roam around a modern free format language. Lovely jubbly.

Long overdue and in the words of Jon Paris (RPG Guru and all round Nice Geezer):

1) I hate F-specs.

I can never remember which letter goes in which column, and of course the more I use embedded SQL, the less frequently I have to code them. I almost always end up either cloning or using the prompter in RDI (about the only time I ever use it) and even then I'll get at least one thing wrong.

I also find it frustrating to have to specify every little detail. For example, if I say it is a printer file, then of course the thing is output. How many input-capable printers have you ever encountered?

Forget that the new F-specs are free-format. For me the most liberating thing about them is that they assume sensible defaults! For example, suppose I code this:

HTML for the RPG Programmer - HTML5 the basics

  • Posted on: 30 January 2014
  • By: NickLitten

Over recent weeks I've been discussing career options with my eldest mini-me -- Nathan, who is nearly 15 and at the stage of life where he is asking the "what am I going to do with my life?" big questions.

Obviously, the 'make money in your career' options are "Son, get into Medicine or Law!" but I am obviously biased in my thoughts that you can make a decent living and enjoy laying your hands on a keyboard and sinkning your mind into technology...

An easy way to get into website design and a brilliant over is courtesy of the free online book : "Dive into HTML5".

Example:

How to change Remitplus Server in Client Config

  • Posted on: 29 January 2014
  • By: NickLitten

I've spent this week implementing a Cheque (yes -- that is the correct and very English way of spelling 'check') scanning solution for a client.

The basic idea is -- company receives lots of money payments by cheque, these are scanned, sorted and deposited direct into the companies bank account and the deposit information is then automatically uploaded to their back office accounting system (in this case an in house RPG IBM i application). It's been a fun project with some neat automated features which are now working nicely in production. *phew*

The clever scanning and talking to the bank bit is handled by a cheque scanner and some rather nifty software to control it, called RemitPlus by Profitstars:

RemitPlus® Remittance/LockboxTM

Electronic check, remittance, and lockbox processing solution.

dsplnk '/tmp/httpapi_debug.txt'

  • Posted on: 20 January 2014
  • By: NickLitten

If you are using the IBM i HTTPAPI (LIBHTTP) opensource utilities, you already realize how easy it is to talk to a webservice from within your RPG programs.

But remember, after you have run your program, you will have a beautiful log of the entire SOAPey process stored in an IFS file in your temporary folder -- assuming you are running in debug mode.

So , in your program make sure you are turning on debug:

        // Note:  http_debug(*ON/*OFF) can be used to turn debugging
        //        on and off.  When debugging is turned on, diagnostic
        //        info is written to an IFS file named
        //        /tmp/httpapi_debug.txt
      /if defined(DEBUGGING)
         http_debug(*ON);
      /endif  

and then after you have ran it you can see the results by typing: dsplnk '/tmp/httpapi_debug.txt'

You will see a gloriously detailed log that looks something like this:

What is the best media player for Android, Apple and Windows mobile devices

  • Posted on: 18 January 2014
  • By: NickLitten

So, you've downloaded some video but your standard media player doesnt seem to want to play it?

Video media comes in all shapes and sizes: AVI, MP4, MP5, MOV, XVID, yadda, yadda, yadda

​I cant be bothered with downloading a media player for each format when one player will do the lot. But with various operating systems on the devices in the walls of Castle Litten these are my favorites for my Android Phone, Tablet and also for Windows, IOS7 and Ubuntu Desktops:

For ANDROID the winner is BS PLAYER FREE

bs player free plays everythingSitting on various planes, trains and automobiles this is my favorite solution for watching media. It plays everything!

What is the best media player for Android, Apple and Windows mobile devices

  • Posted on: 18 January 2014
  • By: NickLitten


So, you've downloaded some video but your standard media player doesnt seem to want to play it?

Video media comes in all shapes and sizes: AVI, MP4, MP5, MOV, XVID, yadda, yadda, yadda

​I cant be bothered with downloading a media player for each format when one player will do the lot. But with various operating systems on the devices in the walls of Castle Litten these are my favorites for my Android Phone, Tablet and also for Windows, IOS7 and Ubuntu Desktops:

For ANDROID the winner is BS PLAYER FREE

bs player free plays everythingSitting on various planes, trains and automobiles this is my favorite solution for watching media. It plays everything!

You say Tomato, I say Pomedoro

  • Posted on: 9 January 2014
  • By: NickLitten

Over the last year, I've found a marked decrease in productivity during project work due what seems like a lot more life interruptions.

I'm (a) easily distracted, (b) the king of procrastination and (c) frequently trying to multi-task to such a wide degree that I almost completely zone out and have revisit and rework things I've marked complete. Interruptions are insidious and I've discovered that its not the major breaks that break things but the small social ones. When I say 'social' I means by way of social media: emails,  texts, facebook, twitter, instagram and the list goes on.

[ and thats not even mentioning kids, dogs and the missus wanting to go for a quick lunch at the beach]

Prevent the Interruptions

When I'm working on something, I've decided I need to put away my phone, tablet or other techno-interruptor and designate certain times to review it for messages. Many times I've replied to a text message from friends and/or family to be told "but i sent that message an hour ago" as if I am being utterly unreasonable! It's not an instant world and I struggle daily to leave my technodevices alone. It's OK too be unable to reply immediately. This got me to thinking about coming up with a plan to better manage my time.

What is the RPG Open Access Handler all about?

  • Posted on: 8 January 2014
  • By: NickLitten

 

What is open Access

Rational® Open Access: RPG Edition provides a way for RPG programmers to use the simple and well-understood RPG I/O model to access resources and devices that are not directly supported by RPG.

Open Access opens up RPG's file I/O capabilities, allowing anyone to write innovative I/O handlers to access other devices and resources such as:

  1. Browsers
  2. Mobile devices
  3. Cloud computing resources
  4. Web services
  5. External databases
  6. XML files
  7. Spreadsheets
  8. And more



An Open Access application has three parts:

  1. An RPG program that uses standard RPG coding to define an Open Access file and use I/O operations against the file.
  2. A handler procedure or program that is called by Open Access to handle the I/O operations for the file.
  3. The resource or device that the handler is using or communicating with.

Open Access is the linkage between parts 1 and 2. Licenced program 5733-OAR is required to use Open Access at runtime. Open Access is a full-featured version of the limited support provided by RPG SPECIAL files. It provides a way for RPG programmers to use the simple and well-understood RPG I/O model to access devices that are not directly supported by RPG.

How to get IBM i command line during runtime using System Request 3

  • Posted on: 5 January 2014
  • By: NickLitten

Here's a blast from the past:

I was just testing an IBM i program that is importing data from a Windows Server, converting the data, juggling it, tweaking it and when its finished playing it finally shoves it into an IBM i Database. Fun Fun FUN! But if its running interactive and I want to quickly get the command line... I'm stuck. The green screen is input inhibited. Luckily, we can easily get command line access by tweaking the system request functions of IBM i.

HACKEAT EMPTOR - obviously only grant this command line access if your system i is properly secured. You dont want any old Tom, Dick or Harry getting to the command line to do you?

The system request functions do a bunch of neat things during any interactive session - SysRq/2 shows a DSPJOB command. Luckily its super easy to change the command associated with all the system request functions.

Right now, lets quickly tweak the sysrq/2 function.

WRKMSGD MSGID(CPX2313) MSGF(QCPFMSG)

How to Reset or rebuild a Sitemap in Drupal

  • Posted on: 2 January 2014
  • By: NickLitten

A sitemap is exactly that -- a map that search engines read to find what is on your website.

Sitemaps are a simple way of keeping the main search engines like Google or Bing up to date with what is going on with your website. I mean, why bother writing a website if nobody every reads it right? 

The XML sitemap module creates a sitemap that conforms to the sitemaps.org specification. This helps search engines to more intelligently crawl a website and keep their results up to date. The sitemap created by the module can be automatically submitted to Ask, Google, Bing (formerly Windows Live Search), and Yahoo! search engines. The module also comes with several submodules that can add sitemap links for content, menu items, taxonomy terms, and user profiles.

I can almost guarantee that you are reading this because you searched for something on a search engine and it bought you here. It only knows about this website because of the website map 'sitemap.xml'

The sitemap is pure XML (a kind of funky HTML) and basically lists everything that is on the website and looks something like this:

Pages