23rd April 2024

IBM i Update: March/April 2024

IBM-i-Update-March-and-April-2024

Welcome to the #IBMi update for the past four weeks in March / April 2024.

This month, we’re at the i-UG event in London and investigate modern development languages with IBM i Champion, Andy Youens as well as why keeping everything on i makes sense for your data.

You can watch the video below or read the full article underneath.

Watch the Video:

UK IBM i Conference South March 2024

So, in the middle of March we enjoyed the UK IBM i conference South.

This single-streamed, well attended event included some informative sessions including ‘seamless IBM i data movement and ‘positioning IBM i development languages’.

i-UG-Opening-IBM-i-Update-April-2024

Hosted by IBM London in their rather plush southbank setting, the event started with the obligatory bacon butties and an introduction and update from -UG chairman, Mike Ryan before moving into the main topic of the event, programming options on the IBM i.

In this session, IBM i Champion, Andy Youens provided his take on today’s programming options on IBM i.

He began by providing the open source options from 1988 starting with the Java Tool box.

It took another 18 years for when the next significant open source language – PHP was added in 2006.

This was followed by Ruby in 2013, Node.js in 2014 and Python and ‘R’ in 2015.

Of these six languages, Andy provided his views on the ‘good and the bad of each’.

 

IBM i Programming Options

Ruby

He started with Ruby – and initially, all was positive.

Power-Ruby-IBM-i

Andy explained that, while high-level, it’s syntax is simple and easy to learn and it comes with an extensive collection of libraries and frameworks.

However, Andy also believed that the language is largely a failed experiment.

Why? Well there are some limitation on IBM i that would make it difficult to implement and frustrating to use as it’s object oriented language isn’t as intuitive to learn if you’re an RPGer.

Compatibility is a problem too with different IBM i OS’s causing different problems that don’t readily get repaired by IBM including memory leaks and performance degradation.

So, all-in-all, Ruby was deemed a bad choice.

 

Java

Next up was Java.

Andy explained that Java improved on Ruby in compatibility alone, with the license being shipped with the system and including a compelling and complete developer kit.

Java-on-the-IBM-i

However, Java does come with its own issues which limit its functionality and flexibility.

The support for low-level programming and system access, the support for direct memory access or native data types such as packed and zoned decimal were a few that Andy mentioned.

But perhaps its biggest flaw Andy suggested, was with security vulnerabilities and then, more security vulnerabilities.

 

R

R was also mentioned… which was nice, as frankly, I’d not heard of it before that day.

R-IBM-i

But, it’s been available on IBM i since 2015 and it’s an open source language used for statistical computing and graphical visualisation of data – so, perfect for a green on black environment then.

Now, as you would expect, the language has not been widely adopted and as a result, resource and knowledge base limited.

 

Python

Ok, so it’s safe to say that Andy didn’t recommend the first three presented.

So, what were the open source languages Andy thought were good?

Well, first we have Python.

Python-IBM-i

Andy explained that its a simple and readable syntax that runs on many platforms and enjoys a vibrant and active community.

But perhaps most compelling of all was the fact that Python would allow you to write programs with fewer lines of code.

Python-Programming-Languages-on-the-IBMi-April-2024

Andy went on to provide examples of code that demonstrated its simplicity and readability…

I mean, if I can read it, it tells you that it doesn’t take a programming genius to tell you what this Python program is meant to do.

Andy continued that, while it’s looks simple, this doesn’t mean that it’s not powerful.

Python can use arrays, for loops, whiles, ifs, and more.

Plus it functions similar to subroutines and definitions – making it a complete coding base.

However, to verify this, one of the tests used by Andy to determine if it was a language was good for an IBM i developer was the creation of a porting program that would populate an IFS CSV file with called results from an SQL statement.

Andy demonstrated that this was easily done through Python.

So, with Python, Andy believes you have a hit.

But there are a couple more to investigate and next on his list was Node.JS.

 

Node.JS

This ‘avant-garde’ open source runtime environment is based on Chrome’s v8 JavaScript engine and is written in JavaScript and C++ and is primarily used for server side operations.

Node.JS-IBM-i

It’s… different but with its ability to handle multiple requests at the same time, it has gained popularity within the programming community.

Indeed, Andy himself noted that ‘Node is weird’… but revised that statement later saying, “as he used Node more and more, he fond that Node is not so weird, it’s just different, not what we’re used to.”

So, what makes Node so ‘different’?

Well, it uses an asynchronous call stack – So, instead of waiting for the function to complete after fetching the data, Node.js will run the next requests, while processing the I/O ones (like fetching data) in the background.

This is possible because of callbacks and promises of which can be nested and queued appropriately making it a good option for micro-service architectures.

So, due to its architecture, it may take a little while for the average RPGer to get their head around Node… but that doesn’t mean that it won’t work on IBM i.

Indeed, Andy suggested that, once you ‘get-it’ Node.Js is quite the powerhouse.

In the example provided, Andy explained that Node provides lots and lots of choices on how you use it – it’s flexible and available and a reasonably good choice for development – but, when you know what you’re doing, Andy says it becomes a very good choice.

 

PHP

Finally, Andy discussed the ever popular PHP explaining that 79% of website use PHP in some form due to its power and ability for rapid development and scalability.

PHP-IBM-i

It’s been available on IBM i since 2002 but became popular when Zend released a licensed version in 2006.

In 2018 however, you can now get an open source community release – all the better.

Andy explained that PHP is an interpreted language so, it’s as simple as you writing the code in the IFS, press enter – and away it goes.

Its rich functionality makes it a great choice for developing GUIs and Webpages and Andy demonstrated that to support this, you can also embed PHP into HTML webpages.

Getting data from the box is simple using PHP too – for this, Andy used ODBC using a pre-existing IBM package and an SQL statement and low-and-behold, a CSV was created on execution.

 

So which is the best programming langauge for the IBM i?

The choice for IBM i development outside of RPG was left to the audience, but only Python, PHP and Node.JS got the thumbs up from Andy.

Best-programming-languages-for-the-IBM-i

One of these three, or indeed the three others he poo-pooed, will feature as a presentation at the i-Power event this summer and the audience was asked to vote for their preferred choice – it’ll be interesting to see which it is!

 

IBM i Technology: AI

Lunch was next, and I must say that IBM were fantastic hosts, with an array of tasty treats for the participants.

Also on offer at around this time were sessions on IBM technology.

IBM-i-Technology-AI

These included demonstrations of AI – most noticeably, on how they can collect and user real-time data for practical ‘real world’ applications. One such demonstration used ‘spot’, the Boston Dynamics robot dog which (in this example) was used to find, monitor and read, analog temperature and pressure readings and react appropriately.

Another was a workshop that demonstrated how artificial intelligence in automated cars could learn how to navigate street layouts, understanding traffic and (for example, if it was an emergency response vehicle) could get to its destination in the most efficient manner possible.

Then there was a display of IBM’s quantum system one, the first circuit-based commercial quantum computer as well as other IBM innovations and experiences too…

 

Unleash Your Data Presentation by the i-UG Committee Members

The other presentation I wanted to cover during the event was ‘Unleash your Data’ presentation completed by the i-UG committee members.

Unleash-your-data-presentation-IBM-i-April-2024

 

Keeping enterprise data on the IBM i

The presentation started with Mike Ryan, i-UGs chairperson providing the common background of everyone within the enterprise wanting ports of data from the IBM i for many different purposes – reports in spreadsheets, extracts in SQL for data analysis… you name it, it requires an export.

Mike argued that these secondary pools of data aren’t needed – you have everything you need on the IBM i for everything you need…

Keeping and (more importantly) utilising your enterprise data on the IBM i makes sense.

Here, without creating ‘two versions of the trust’ you can manage, share, secure, explore and protect your data without the additional overheads and headaches of additional infrastructure.

In fact, Mike said, because of these reasons, centralisation could be critical to future success should we keep everything on the one box… but can you actually do it?

Well, yes you can, and between the three principles – examples on how you can go about utilising data on IBM i more efficiently were provided.

 

Web services on the IBM i

Steve Case the Marketing Director for i-UG was up next and provided an insight into direct access to web services on IBM i.

He did this by demonstration how you can use the Geospatial capability now built into DB2 to be able to calculate travel distances from positional points, conditioned in this example by postcode.

He then built a webservice that allowed the dynamic reporting of these by email.

But the key to all this was in the fact that from IBM i OS v7.2 and above – this option to explore data and report on data in more meaningful ways is available to the modern IBM i enterprise… without the need to port data off the box. Genuinely good stuff.

 

Porting data from spreadsheets into DB2

Steve Bradshaw i-UGs Technical Director took to the stage and, in his own enigmatic style, provided insight into direct access to spreadsheets and cloud databases.

Now, normally, you’d use some middleware or intermediary system to complete this, but using open source on the IBM i, you can port the data direct from a spreadsheet into DB2 and update a file with the IBM i being the control for these messages.

In his live demonstration, Steve had an XLS file, residing at a network location, polled then directed to the IBM i with the relevant files updated.

This meant that if there are islands of data that people create in spreadsheets, and you would like to import and monitor that (and put some business logic behind it), you can use their spreadsheets as the source of that data.

Again, the IBM i remains the control and centre for the organisation and management of this data.

 

Automating processes

Finally, Mike returned to pull the elements together by providing a modern, open sourced means to manage these processes through workflow.

Automating-Processes-on-the-IBM-i

Using a linux partition on the iUG demonstration box, Mike used Node Red to automate processes.

Node red provides the framework to build a workflow based upon attaching programs within a flow-diagram and adding conditions based upon criteria or outcome. It’s based on Node.JS and comes with a runtime and editor that allows you to graphically place and ‘wire together’ applications.

But the crux of this demonstration was to show that with all the data, information and intelligence centralised on the IBM i, we can utilise, share and manage it better through using open source tools that are again, on the same box. Meaning that your Power architecture really does become more powerful…

And that’s it – a quick summary of the very excellent i-UG event in London, I hope you enjoyed it?

I believe that the presentations are or will be available on the i-UG website for you to download and digest.

But for now, thank you for taking the time to read (and watch) the blog post.

Should you wish to view any of the articles featured in full, please see our blog on the proximity website here https://www.proximity.co.uk/blog/

Until next time,
Andy

 


Catch our previous February IBM i Update here. Alternatively, if you’d like to receive the latest IBM i Update hot off the press to your inbox, subscribe to the newsletter version on LinkedIn here.

Posted by Rob on 23rd April 2024.