Wednesday, January 29, 2025

New SQL scalar functions to generate UUID

At times there a coincidences, and this is one. I had been asked to add a UUID column to a SQL table that is sent to another application on a non-IBM server. My original plans were to use the MI program _GENUUID to generate the UUID. Then, to my delight I find that the latest Technology Refreshes, IBM i TR5 and IBM i TR11, includes two new SQL scalar functions that will generate an UUID. Which is ideal for me as I was using a SQL Insert statement to add data to the interface's table.

What is UUID? Without going into too much detail, it stands for "Universally Unique Identifier". It is administered by the Internet Engineering Task Force, IETF, with a standard, RFC9562, which defines it as: "A UUID is 128 bits long and is intended to guarantee uniqueness across space and time". If you are interested in learning more the standard's document is here.

In character form a version 4 UUID is 36 characters, and is formatted thus:

 XXXXXXXX-XXXX-4XXX-XXXX-XXXXXXXXXXXX

Monday, January 27, 2025

How would I validate and format dates to align with the "2039 issue"

After my post about IBM providing a control option to look for dates that could fall foul of the 2039 issue, someone messaged me to ask:

I think the problem is when date is converted an external representation and converted back. I think of a display file, if the user input in a display file say an expiry date in 2041 how would you handle the display and conversion?

That is a good question. There are times when users should have to enter eight long dates for things like dates of birth, but other dates can be used on a display file as six size long and stored in the database as a date data type. With the impending "2039 issue" how would I manage the need to change from the "1940" rule to another?

Wednesday, January 22, 2025

Identifying code that could fail the "2039 problem"

As soon as we handled Y2K I thought when we reached date 2039 we would have something in place to prevent the "2039 problem".

What is the "2039 problem"? This only occurs with dates with years that are just two characters. A date data type, character or numeric representation of a date, that has a two character year uses the following rule to determine the century:

  • 40 – 99:  Century is assumed to be "19"
  • 00 – 39:  The assumption is that the century is "20"

We are 14 years away from 2039, but soon there a going to be applications that will need to use dates beyond that year. When I attended COMMON's Navigate in Toronto, in November 2024, Barbara Morris, IBM's lead developer for the RPG compiler, told us that it would be up to us, the IBM i developers, to remedy the issue. The way RPG handles dates will remain unchanged.

Monday, January 20, 2025

IBM Power9 maintenance end of life

On September 12 last year IBM published a document about the future of maintenance for some of the IBM Power9 servers.

In it IBM explains that after eight years of IBM Power9, the end of their Standard Service maintenance for various Power9 servers is effective January 31 2026.

I think this is brought on by the expected announcement of the IBM Power11 chip based servers later this year.

IBM's document gives you all the information, therefore, I am not going to repeat it. You will find IBM's document here.

Wednesday, January 15, 2025

New built in functions %HIVAL and %LOVAL

As part of the latest Technology Refreshes, IBM i 7.5 TR5 and 7.4 TR11, two new RPG built in functions, BiF, were added: %HIVAL and %LOVAL.

Their names describe what they return:

  • %HIVAL:  Returns the highest value that can be returned from the variable
  • %LOVAL:  Returns the lowest value that can be returned from the variable

The syntax for the BiF is:

  %hival(variable)

  %loval(variable)

Wednesday, January 8, 2025

How to create a logical file with data from more than one member

I wrote an earlier post about how to define a file twice in a RPG program so that I can use two members in the file. This led to a further discussion about could I combine data from those multiple members into one using a DDS logical file. This post demonstrates the results of those subsequent discussions.

I am going to use the same file as I did in the earlier post. If you have questions about file layouts, etc., check that post.

I am going to add a third member to the file, which will be called THIRD:

ADDPFM FILE(TESTFILE) MBR(THIRD) TEXT('Just added')

I can list the members in TESTFILE using the SYSMEMBERSTAT SQL View:

Monday, January 6, 2025

The future of IBM Power CPUs

A "Chips and Cheese" interview with George Cozma, "Cheese", hosting Bill Starkey, Chief Architect for Power chips. They discuss the future of IBM Power and where Bill sees the industry going for future memory standards.


Wednesday, January 1, 2025

Happy 2025 to you all

Another year has passed, and now our thoughts turn to the New Year, 2025. New Years is one of my favorite times of the year, it is filled with excitement for what the forthcoming year will bring us all.

Before we put the old year out of mind, what did you find interesting last year? These were the top ten popular posts from last year: