Wednesday, September 16, 2026

Chopping up a file that is too big

I know the title sound intriguing, and I thought the subject was worthy of a post. A friend approached me wanting to know how could he "chop up" files that contain hundreds of millions of records into smaller files, that he would transfer to another platform. He knew he could do it manually, but he wanted a program.

Something like this is very simple in CL. In no time I had a program for him that would take a file, copy one million records at a time to a work file, and copy the work file's contents to a CSV in the IFS.

Unfortunately I do not have file containing hundred of millions of records, so I am going to use my Person file. This file has only 41 records, and I am going to show how I can "chop" it up into files that contain a maximum of ten records. The principal is the same as copying the files with hundred of millions of records.

The source for the program is not big, just 36 lines. I am going to start with the first 17 lines:

Monday, September 14, 2026

Another new release of ACS, 1.1.9.16

Addendum

I noticed today, September 20, that the familiar "Update available" pop-up now displays that release 1.1.9.16 is the new release.


This is the third new release of IBM's Access Client Solutions, ACS, in the past two months. While my ACS does not alert for a new release (Help > Check for Updates), version 1.1.9.16 is mentioned on IBM's ACS webpage.

This version is to remedy the following, that has been an issue for all previous versions of ACS:

  • STRPCCMD command sent from a compromised IBM i
  • 5250 emulator macro that contains a malicious 'RunProgram' action
  • 5250 multiple sessions file (.bch, .bchx) that contains a malicious 'Run' action

From this version each of the above actions will require user confirmation to run. A confirmation will be displayed, with "Yes" and "No" options. For the 5250 emulator macro 'RunProgram' action an additional "Cancel" option is offered to end the execution of the entire macro.

Wednesday, September 9, 2026

Separating parts of qualified job name with SQL

In a previous post I explained how I could extract the parts of the qualified job name using the LOCATE_IN_STRING scalar function. With the latest Technology Refreshes, IBM i 7.6 TR2 and 7.5 TR8, a number of Db2 for i scalar functions and a table function were added to make this easier. These are:

  • JOB_NAME scalar function:  Returns the job name
  • JOB_NUMBER scalar function:  Returns the job number
  • JOB_USER scalar function:  Returns the job user
  • JOB_NAME_DETAILS table function:  Returns all of the above

All of the above are found in the library SYSTOOLS.

Wednesday, September 2, 2026

Validating CL commands with SQL

There has been an API to validate CL commands for as long as I can remember, but is not simple to use. Fortunately, as part of the latest Technology Refreshes, IBM i 7.6 TR2 and 7.5 TR8, a Db2 for i scalar function was introduced that performs the same function.

CHECK_COMMAND_SYNTAX requires one parameter, the command string to be validated. The string can be up to 32,000 characters, which should cover most command strings I use. It returns a Boolean value:

  • True = the command string is valid
  • False = the command string is invalid

Here are a couple of examples I made and ran in ACS's Run SQL Scripts, RSS: