Four Hundred Monitor, November 16

Four Hundred Monitor, November 16

November 16, 2022

Jenny Thomas

Next week is Thanksgiving, so today we are giving thanks for all of you. We feel quite lucky here in the Jungle to have survived another year, and are looking forward to thriving in 2023. We are also looking forward to a little holiday break – as I am sure are all of you – so look for Monitor again in early December before we close out for the year. Until then, get your fill of the latest industry news and happenings below, and enjoy a little family (and turkey) time. You have our deepest gratitude for your continued support, and we’ll see you after the break!

Top Stories From Around The Jungle

(Phoronix) IBM is working to extend Power10’s MMA architecture with a new feature for “dense math” that is expected to premiere with future IBM Power processors.

(Consultancy.uk) IBM Consulting’s senior vice president talks news and how the firm helps businesses achieve digital transformation ambitions.

(Financial Times) IBM strikes up a deal with a new chip company to counter China.

(Analytics Insight) The Quantum computing wars continue, with IBM and Intel fighting for supremacy.

(IBM) The IBM i on Power FAQ is available for download. It addresses the most frequently asked questions concerning IBM i performance on Power, and provides best practice guidelines for most commonly seen performance issues.

Redbooks, White Papers, Blogs, and Other Resources

(iTech Solutions) This blog takes a look at the New Navigator (the new Navigator for i web interface).

(Zend) This blog shows how to install and configure Zend PHP, PHP-FPM, and Nginx for IBM i.

(Seiden Group) This article will help you with the easier-to-install IBM i ODBC driver for Db2 using YUM.

(MicroFocus) This slideshow summarizes a talk from last month’s Open Mainframe Summit about COBOL and modernization. Click through to learn about the history of COBOL.

(IntelliChief) Intelligent AP automation to radically improve the benefits and payback of automation. Watch this on-demand webinar to learn more about automation for accounts payable.

Chats, Webinars, Seminars, Shows, and Other Happenings

November 17 – Greenfield, Wisconsin – The monthly dinner meeting of the Wisconsin Midrange Computer Professional Association (WMPCA) will feature Steve Bradshaw, who will present two sessions: “Things i love about 7.5” and “How healthy is your IBM i?”

November 23 – Online & In-Person Meeting – The TUG (Toronto User Group) meeting of the month will feature presentations on “BOB” and data integration.

March 14-16, 2023 – Delavan, Wisconsin – The Wisconsin Midrange Computer Professional Association (WMCPA) will be having its annual Spring technical conference in-person at Lake Lawn Resort in 2023.

Tags: Tags: Four Hunded Monitor, IBM i

SAP on IBM i: SAP Support Required PTF Lists have been updated

On November 11th, 2022, the SAP Support Required PTF Lists, formerly known as Information APARs, have been updated to include fix levels for the most recent security bulletins and other corrections. High Impact/Pervasive PTF groups, Db2 for i PTF groups and cumulative PTF packages were updated. The PTF lists can …

Another Reason to be Thankful for SQL VALUES

 Last year, I highlighted the performance advantages of writing tableless queries with the SQL VALUES support. In the spirit of the upcoming US Thanksgiving holiday, I want to point out another reason developers can be thankful for the VALUES support in SQL.

The VALUES support comes in two flavors, VALUES & VALUES INTO, just like the SQL SELECT syntax. The VALUES INTO and SELECT INTO statements enable you to run a query that generates a single row and assign the values in that row to variables. While both statements provide the same capability, the VALUES INTO statement has the added advantage that it can be dynamically prepared and executed. This advantage is a big one for SQL developers because it allows you to implement a solution with less SQL code.

To help you understand why developers should be thankful for the dynamic SQL support of VALUES INTO, let’s look at the hoops you had to jump through prior to the VALUES support. Since the SELECT INTO statement could not be dynamically prepared, the only way to assign the results of a dynamic query to variables was through the usage of a dynamic SQL cursor. 

Let’s assume that a program needs to return the count of rows in a table (e.g., MYTABLE) and dynamic SQL is required because that table can reside in many different libraries. The SELECT version of this solution would look like the following set of code. First, the count query statement text is assembled and prepared. Next, a cursor for that prepared statement must be declared and then that cursor must be opened, fetched, and closed.

STMTTXT = ‘SELECT COUNT(*) FROM ‘ TBLIB + ‘/MYTABLE’;

EXEC SQL
PREPARE QRY_ROWCOUNT FROM :STMTTXT;

EXEC SQL
DECLARE ROWCOUNT_CUR CURSOR FOR QRY_ROWCOUNT;

EXEC SQL
OPEN ROWCOUNT_CUR;

EXEC SQL
FETCH ROWCOUNT_CUR INTO :ROWCOUNT;

EXEC SQL
CLOSE ROWCOUNT_CUR;

A lot of code and work to just run and save the results of a simple row count query. 

Now, let’s examine how the VALUES INTO statement provides for a simpler solution. The fact that this VALUES INTO implementation requires half as much code should make it clear why this is a preferred solution.

STMTTXT = ‘VALUES (SELECT COUNT(*) FROM ‘ TBLIB + ‘/MYTABLE) INTO ? ‘;

EXEC SQL
PREPARE QRY_ROWCOUNT FROM :STMTTXT;

EXEC SQL
EXECUTE QRY_ROWCOUNT USING :ROWCOUNT;

The VALUES INTO support enables the simple execution of a dynamic query without the coding overhead of using an SQL cursor.

The fewer lines that you have to code means less code that you have to test and maintain going forward. And those are great reasons to be thankful if you’re an SQL developer!

Verified by MonsterInsights