Wednesday, April 30, 2025

Report of the success of the nightly saves

My manager asked me if I could provide him with a report of all the libraries that were backed up as part of the night process job, NBACKUP. "You know what I mean: one line for each library" was his final statement to me.

I did want to browse a different job log for each day. I wanted to design something that was simple. I decided to use the HISTORY_LOG_INFO table function. I could select results using:

  • Starting timestamp of 1 day (24 hours) ago
  • I know the job name

I started with this SQL statement:

Wednesday, April 23, 2025

Quickest way to determine which day of the week today is

In a program I wrote recently I needed to return which day of the week today is. My first thought was to use SQL, as it would only be one line of code. But is that the fastest way to return today's day name?

I thought about writing my own RPG routine to calculate the day name, but decided to use Google to see if there was a better example. I found an article by Rafael Victoria-Pereira for MC Press from 2015 that gave what I think is an efficient way to do this, you can read his article here.

Using his example I refactored the RPG code up to 2025 standards and created this procedure:

Monday, April 21, 2025

Useful manuals

I have few more recent IBM manuals that I wanted to share with you, including the one I have been waiting for since the IBM i 7.6 announcement:

I hope you find these links interesting and useful.

Friday, April 18, 2025

IBM i 7.6 available today

The new release of the IBM i operating system, IBM i 7.6, is available today. While 7.6 will steal the headlines today, there is a Technology Refresh for IBM i 7.5, TR6, that is also available.

If you have missed all the news, you can find out what is in the new release and the new TR, here.

Wednesday, April 16, 2025

LISTAGG scalar function can return distinct results

I did not realize it had been so long since I first wrote about the LISTAGG scalar function. I mentioned very briefly in that article something that became very useful to me just a short while ago.

The LISTAGG scalar function aggregates the results from a one or more rows into a single new column, separated by a character of my choice.

In my scenario I have a table, TESTTABLE, that contains a column of colors, COLOR:

01  SELECT COLOR,COUNT(*) "Count" 
02    FROM TESTTABLE
03   GROUP BY COLOR

Tuesday, April 15, 2025

Award for this website

I was notified yesterday that this website, RPGPGM.COM, had won an award.

Anuj Agarwal, founder of FeedSpot, informed me of this:

I would like to personally congratulate you as your blog Rpgpgm.Com has been selected by our panelist as one of the Top 45 IBM Blogs on the web.

https://bloggers.feedspot.com/ibm_blogs/

This is the most comprehensive list of Top 45 IBM Blogs on the internet and I'm honored to have you as part of this!

RPGPGM.COM is ranked in fifth place.

Thank you Anuj, and the panel at FeedSpot, for this honor.

Monday, April 14, 2025

IBM i technical resource

Last week I found a web page I want to share with you all. It is called the "IBM i technical resources roadmap", and is curated by Robert Cecco and Scott Forstie.

The page provides links to all kinds of useful IBM resources about IBM i, including this website.

I think this is such a good resource that I am adding it to the "Links to useful sites", which is found in the right column of all the pages and posts in this website.

You can also reach that web page by using the link here.

Thursday, April 10, 2025

ACS 1.1.9.8 out now

Following on from the announcement of the new release on Tuesday, yesterday a new version of ACS became available for download.

Wednesday, April 9, 2025

More information about IBM i 7.6

I found some more interesting information about IBM i 7.6, the new release that was announced yesterday.

The first is what IBM called a "data sheet". It is only three pages long an gives a very high level insight into the new release. This might be something to share with your superior, so that they have an idea of what is in 7.6.

Tuesday, April 8, 2025

Version 7.6 announced

The awaited IBM iNext was announced today as IBM i 7.6. Also announced is a new Technology Refresh for IBM i 7.5 TR6.

IBM i 7.6 will only run on IBM Power 10 servers, and, I presume, on the Power 11 too whenever that is announced.

It would appear to be the end of TRs for IBM i 7.4. IBM has said they will provide fixes for 7.4, but nothing new. If you are on 7.4 on a Power 10 my recommendation it is time to start making plans to move up to at least 7.5.

The new release, IBM i 7.6 and the PTFs for IBM i 7.5 TR 6 will be available April 18, 2025.

Every release in recent years has a "theme". The "theme" of this release is security, with many of the new features and functions being to do with keeping your data and server secure.

Wednesday, April 2, 2025

Easier way to check if member exists

Amended April 23, 2025:  To use CHKOBJ command.


I was asked: What is the easiest way to check if a member exists in a file?

They had been recommended to perform the check in a CL program, but wondered if there was a way to do the same in a RPG program.

In a "pre-SQL" world I would have used the Check Object command, CHKOBJ, in a CL program to check if the member exists. My program would look something like this: