QCMDEXC scalar function added to SQL

I am sure everyone who has programmed using IBM i has encountered QCMDEXC. Most of us have used the QCMDEXC API, or the QCMDEXC procedure in SQL to execute CL commands from another program or a SQL statement. Included within the latest round of Technology Refreshes for 7.4 and 7.3 is a QCMDEXC scalar function.

A scalar function has to be executed as part of a SQL statement, a Select for example, rather than called directly. Like all the other scalar functions I know, it will return “1” when it executed successfully, and “-1” when it did not.

I have to admit I had to think for a while of a situation I could use this in. Then I remembered one where this could be a perfect fit.

Many years ago I came across a couple of programs that were part of a month end job to release and hold job queues that were used by the month end. There was a file that contained a list of job queues, the library they are found in, and what was called the “flag” field. All the flag was used for if it was not “1” the job queue was not processed.

I have built a SQL table to mimic that file:

Read more »

A big thank you to the Common Europe Advisory Council (CEAC) and the #IBMi development and product teams. Over the last two days, we have gained and shared insights into software and #ibmpowersystems product developments. All we can say is the future is…

A big thank you to the Common Europe Advisory Council (CEAC) and the #IBMi development and product teams. Over the last two days, we have gained and shared insights into software and #ibmpowersystems product developments.

All we can say is the future is…lnkd.in/eVsnvz6

– Therese Eaton (@tetweetings)11:28 – Jun 24, 2021

Verified by MonsterInsights