Wednesday, February 11, 2026

Using SQL TRANSLATE in place of REGEXP_REPLACE

I encountered something last week that I think may be a "bug" in either RPG or in Db2 for i. I was using the REGEXP_REPLACE scalar function, and I received an error message that made no sense. I ran out of ideas of how to overcome this error using REGEXP_REPLACE, and I went on to use the TRANSLATE scalar function. Before I tell you what the error is I need to explain my situation.

I was working upon a partition which was running IBM i 7.5 with the latest PTFs for Technology Refresh 7, TR7, and the latest PTFs for Database and RPG:

  • Database (SQL) = SF99950 Level 11
  • RPG = 5770WDS SJ08064

The partition's CCSID is:

01  SELECT SYSTEM_VALUE_NAME,SYSTEM_VALUE
02    FROM QSYS2.SYSTEM_VALUE_INFO
03   WHERE SYSTEM_VALUE_NAME = 'QCCSID'

SYSTEM_VALUE_NAME   SYSTEM_VALUE
-----------------   ------------
QCCSID              273

Monday, February 9, 2026

2026 Fortra survey published

This year's Fortra 2026 IBM i Marketplace Survey results has been published. This is the twelfth year of the survey, and I for one, always find it an interesting read to learn what the other members of the IBM i community are up to.

If you did not participate in this year's survey I would like to strongly encourage you to participate in the next, as it is a good insight as to what is important to people and companies using IBM i.

You can read it here.

You can also watch the discussion about the survey with Steve Will, IBM i CTO and Chief Architect, Tom Huntington, Fortra, Kris Whitney, IBM i Chief Engineer, Tomothy Prickett Morgan, IT Jungle, here.

Wednesday, February 4, 2026

SEND_MESSAGE can now send message to any message queue

When SEND_MESSAGE SQL procedure was introduced in 2021, as part of IBM i 7.3 TR10 and 7.4 TR4, it would be used to send messages to the System operator message queue. I have used this many times to do so, but I have always wondered how I could do the same to any message queue? Well, in the latest Technology Refreshes, IBM i 7.6 TR1 and 7.5 TR7, this functionality was added.

Two new parameters were added to the procedure to make this possible:

  • MESSAGE_QUEUE_LIBRARY:  The library that contains the message queue I want to send the message to
  • MESSAGE_QUEUE:  The message queue I want to send the message to

If I omit these parameters the message will be sent to the System operator message queue.

The first example I am going to show is using the procedure as it was intended, sending a message to the System operator message queue. I am going to use the message id CPF9898, which is a general escape message, i.e. I can provide any text I want for the message to use. I can show this using the MESSAGE_FILE_DATA SQL View:

Monday, February 2, 2026

February's presentations

I will be involved with one event this month:

Tuesday February 17, starting at 8:30 AM (CT), I will making a two hour presentation at COMMON's Focus conference. This is an online events that spans two days, Tuesday and Wednesday.

You can learn more about it, who will be speaking and what about, and register here.

I hope to see you there!