Wednesday, June 25, 2025

How to identify flat files

The question was is there an easy way to identify "flat files" without having to use the DSPFD command. The answer, of course, is "Yes".

The questioner explained that a "flat file" was a file that was generated without the use of DDS or DDL. In other words, just with the Create Physical File command, CRTPF. For example:

  CRTPF FILE(MYLIB/FLATFILE) RCDLEN(100)

The questioner was finding he could identify these "flat files" with the Display File Description command, DSPFD, like this:

  DSPFD FILE(MYLIB/FLATFILE)

Tuesday, June 24, 2025

Michiganders join the RPGPGM.COM-unity

At the MiTec conference earlier this month more people joined the RPGPGM.COM-unity.

You can see photographs of these new members here.

If you see me at an IBM i event feel free to introduce yourself to me. In all likelihood I will have a RPGPGM.COM-unity ribbon on me, and you can become a member. All I ask in return is a photograph of you with it.

If you would like to learn more about the RPGPGM.COM-unity click here.

Friday, June 20, 2025

Happy birthday to IBM Power and IBM i

Tomorrow, Saturday June 21 2025, is the 37th anniversary of when the IBM AS/400 was first announced. You can watch the video of the announcement in the UK here.

What a wonderful journey we have all been on all these years as the AS/400 (1988 – 2000) begat the iSeries (2000 – 2006), which in turn gave way to the System i (2006 – 2008), and finally IBM Power server running the IBM i operating system (2008 – Present). All the time being IBM's premier server and operating system providing modern functionality, stability and robustness to their customers.

Today the AS/400 looks dated, which it is. But IBM Power can hold its own compared to any comparable business system.

I think I did a good job describing this history for the 35th anniversary. If you are interested in learning more what AS/400 was, and what it has become, read the story here.

Happy birthday IBM Power and IBM i! May you have many more!

Wednesday, June 18, 2025

IBM makes it easier to delete old journal receivers

Old journal receivers can quickly become one of the big wasters of storage on any IBM i partition. I have written before how to identify receivers I think can be deleted. In IBM i 7.6 and 7.5 TR6 comes a new SQL procedure that makes it easy to delete the old receivers.

I need to define what I mean by "old receivers". An "old" journal receiver has been detached from its journal and saved. In my mind if it is detached and been saved, I can delete it. If I need the information contained within it, I can restore it.

I would not use the new procedure to look if I have old receivers, I would use the JOURNAL_RECEIVER_INFO View to get to the information I would want, before using the new procedure.

For example, if I want to find the ten oldest journal on my partition, I would use the following statement:

Thursday, June 12, 2025

RPGPGM.COM-unity at PowerUp2025

Last month I attended COMMON PowerUp2025. It was wonderful to be able to catch up with all my friends in the IBM i community, and hand out RPGPGM.COM-unity ribbons. You can see who I gave them too here.

If I gave you a ribbon and I missed taking a photograph of you with it, please send me a photograph posed like the other people I photographed and I will add you.

What is RPGPGM.COM-unity? You can click on this link to learn what it means.

Wednesday, June 11, 2025

A dozen years of RPGPGM.COM

Every year my mind is boggled each time I reach the anniversary of this blog. It is incredible to me that I have been writing for a dozen years about everything I find interesting with IBM i, and that you take your time to read it. Your encouragement is very much appreciated.

What has happened in the past twelve months?

Wednesday, June 4, 2025

Simple way to check if a file exists in the IFS

Someone reached out to me asking for a straightforward way to check if a file exists in a particular folder in the IFS. They included their program, which, IMHO, was overly complicated. This will be another example of providing a simple, easy to understand, solution using SQL and RPG.

In my example I will be checking if a file exists, and the path for the file will be passed as a parameter from a RPG program. I also want to make the part that does the checking be a procedure. As one procedure can be called by multiple programs, as there could be other files in the future I want to check on.

I am going to create this procedure in a module that I will then bind into a RPG program. In the "real" world the procedure would be added to a service program, so that the logic within the procedure could be changed without having to recreate all the programs that use it.