Thursday, May 28, 2026

ACS version 1.1.9.13 available

Yesterday, Wednesday May 27, I noticed that a new release of ACS, 1.1.9.13, is now available for download.

This is an update to remediate a number of CVE, and no enhancements have been added.

Wednesday, May 27, 2026

Calculating the power and square root of a number

There are times I need to calculate the dimensions of objects, and to do that I need to use things like x squared, or the square root of y. It all brings back memories of sitting in mathematics lessons back in high school, a very long time ago.

It is simple in RPG, but I want to do it in SQL so that I can calculate the information I need in my SQL View.

I thought it would be a good reminder to show how to calculate the square root and how to use exponentiation (xy, x to the power of y) in both RPG and SQL.

 

Wednesday, May 20, 2026

Determine the length of a string when using SQL

The title is not as descriptive as I would have liked, my original title was too long to appear reasonably at the top of this page. I am going to describe how you can determine the length of the string of characters within a column from a DDS file or DDL table using SQL. I have found this most useful when using it within a Select statement.

This SQL function can be called by one of two names: CHARACTER_LENGTH or CHAR_LENGTH.

There is also a related function, LENGTH, that I will describe later in this post.

As its name suggests, CHARACTER_LENGTH will return the length of a string expression. In the following example I am using the VALUES SQL statement with CHARACTER_LENGTH:

01  VALUES CHARACTER_LENGTH('A             ')

Wednesday, May 13, 2026

Generating help text using an IBM i command

This is another post about something I did not know existed until a few days ago. I have been building some commands to help automate certain processes, and I thought it would be a good idea to create help text for the commands so that anyone using it could use it instead of asking me how to use the command.

Help text for commands must be in the form of a panel group object, *PNLGRP. The programming language used to create the contents of a panel group is User Interface Manager, UIM. Don't worry if you have never used UIM, I think it is a simple language to understand.

Several years ago I wrote a post about creating help panel groups with UIM, therefore, if you want more information than I am going to mention here please refer to that post.

I "stumbled" across the command GENCMDDOC, Generate Command Documentation, which will create a template for my command that I can then add details to. I admit I have never heard of it before, and having used it I found it saved me a lot of time.

First I need a command. I just randomly copied some parts of commands I had created earlier into one new command, TESTCMD.

Thursday, May 7, 2026

PowerUp attendees rally to join RPGPGM.COM-unity

The RPGPGM.COM-unity continues to grow. I handed out more of the ribbons at this year's COMMON PowerUp than I have at any other event. You can see who I gave them to 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 join the community. 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.

Wednesday, May 6, 2026

Determining the number of entries in a list parameter from a command

I was creating a command with what I am going to call a "list parameter", to allow the entry of up to ten libraries. While writing the Command Processing Program, CPP, I encountered something I could not find a good description of how to handle. Therefore, I am writing this post to give you a good example of how I did it.

I am not going to go into too much detail on how to create commands and their parameters as I covered many of the basics in two earlier posts: Creating your own commands, part 1 and Creating your own commands, part 2.

My example command, MYCMD, has just one parameter, which will be the list of up to ten libraries. The source for the command is as follows:

01  CMD PROMPT('List of libraries')

02  PARM KWD(LIBRARY) TYPE(*NAME) MIN(1) MAX(10) +
03         PROMPT('Libraries')

Line 2 and 3: The command parameter LIBRARY has a number of keywords:

  • KWD:  The keyword name for the parameter
  • TYPE:  It is a name type parameter, which means it is equivalent of ten long character
  • MIN:  The minimum number of entries that must be given
  • MAX:  The maximum number of allowed entries
  • PROMPT:  The description that appears on the screen