Ted Holt
Ted Holt is the senior technical editor at The Four Hundred and editor of the former Four Hundred Guru newsletter at Guild Companies. Holt is Senior Software Developer with Profound Logic, a maker of application development tools for the IBM i platform, and contributes to the development of new and existing products with a team that includes fellow IBM i luminaries Scott Klement and Brian May. In addition to developing products, Holt supports Profound Logic with customer training and technical documentation.
-
Guru: Beefing Up The Job Log, Take Two
August 6, 2018 Ted Holt
In Tracing Routines Explain Why The Computer Did What It Did, I wrote about the usefulness of writing information about program execution to determine why a program run gave certain results. Today I want to present a simpler method than the tracing routines. The tracing routines are not obsolete, but they are powerful and I have found them at times to be overkill.
Just a word about terminology. Since I wrote that article five and a half years ago, my reading has led me to a different understanding of the terms tracing and logging. I’ve since decided that …
Read more -
Guru: Refactoring RPG – Indicators
July 30, 2018 Ted Holt
Occasionally I hear someone comment about how terrible indicators are. I don’t think they’re bad. Indicator-laden RPG helped me graduate debt-free with a computer science degree and housed, clothed, and fed my family for several years. I prefer to say that indicators were good for their time, but now we have better programming techniques that I much prefer to use.
Refactoring code to reduce or even eliminate the use of predefined indicators (not indicator variables) can pay off big in benefits. The fewer indicators a program uses, the easier it tends to be to read, understand, modify, and debug that …
Read more -
Guru: Table Value Constructors Build Tables On The Fly
June 25, 2018 Ted Holt
Because I wish to be as valuable and productive as possible to the people who pay me to program their computers, I continually search the Web for new ideas and techniques. Doing so often leads me to sites that cater to other computing platforms. Today I want to share with you some SQL techniques that I learned from Microsoft SQL Server professionals.
These techniques are based on the Table Value Constructor (TVC), which is a group of data values, usually literals, organized into rows and columns. In its simplest form, a table value constructor is literal tabular data that is …
Read more -
Guru: How To Override Query Options
May 21, 2018 Ted Holt
QAQQINI is a physical file with which you can control certain behaviors of the DB2 for i query engine. For a list of the query options that you can change, visit the IBM Knowledge Center. Normally you don’t have to use it, as the engineers of IBM have done a great job designing an optimizer that does a great job.
At times you may want to change a query attribute for a certain job. There is no need to build many QAQQINI files to handle all possibilities. Instead, you can temporarily override query attributes within a job. DB2 for …
Read more -
Guru: Odds And Ends
May 14, 2018 Ted Holt
Little things can make a big difference. Today I am pleased to present a few short tips that may make a difference for you. I hope you get something useful here. If you have short tips that you would like to share with your fellow readers, please email them to me and I’ll see what I can do. Have a wonderful day!
Hey, Ted:
I just read your article More Date And Time Conversions Using SQL. Just as aside, the scalar functions Decimal/Dec, Integer, and BigInt can convert times, dates and timestamps directly into a numeric representation in the …
Read more -
Guru: Refactoring into Routines
May 7, 2018 Ted Holt
In RDi and Refactoring, I illustrated the process of refactoring by taking code of a very old style and converting it little by little into something modern. I promised to write more about the subject, and today I fulfill that promise.
The things I did in that first article — removing indicators, removing the COMP op code, removing GOTO, and renaming variables — are great, but they are not the only refactoring techniques. One of the best ways to refactor is to create new routines or improve existing routines, especially routines that can stand alone.
To illustrate, I’ll begin …
Read more -
Guru Odds and Ends: Readers Respond
April 30, 2018 Ted Holt
I appreciate the comments and feedback that readers have contributed. Some of you sent it my way via the Contact page at IT Jungle. Others emailed me directly. Yet others left comments at the end of the articles themselves. I am always grateful for your knowledge and wisdom, however I receive it.
Knowing that you are very busy and don’t have time to revisit the articles we have published, I’ve collected some of that feedback for your edification. Please feel free to add to the body of knowledge.
Had to chuckle when I read Sorting Options For CPYTOIMPF, …
Read more -
Guru: RDi and Refactoring
April 16, 2018 Ted Holt
When I first heard the term refactoring, I thought, “So that’s what they call it.” I had been refactoring for years, my only tools being SEU and a compiler listing. I learned a long time ago that refactoring is often necessary to enhance code, especially poorly written code. Another reason I often refactor is to better understand poor code.
To refactor means to rewrite source code without changing its external behavior. Due to all the “legacy” source code (RPG II, RPG III, fixed-form RPG IV, OCL, etc.) in IBM i shops, the ability to refactor source code is a …
Read more -
Guru: LTRIM + RTRIM > TRIM
April 2, 2018 Ted Holt
When IBM enhances SQL for my favorite database management system, I feel so happy I could dance like Karlos Klaumannsmoller selling diabetes medicine. It is my pleasure today to let you know (in case you don’t already know) that IBM has once again enhanced two SQL functions to make them as powerful as their RPG counterparts.
The functions to which I refer are LTRIM (left trim) and RTRIM (right trim). Until recently these functions could only remove blanks (or hexadecimal zeros, for some data types) from the beginning (left) or end (right) of a string. IBM recently added …
Read more -
Guru: More Date And Time Conversions Using SQL
March 26, 2018 Ted Holt
Since many, if not most, IBM i shops store dates and times in numeric and character fields, it behooves those of us who program those systems to understand all available date- and time-conversion tools. A conversation with a fellow attendee of the recent RPG & DB2 Summit made me realize that I had not written about certain SQL conversion methods.
IBM i programmers need to convert date, time, and timestamp data from one format to another for at least two reasons. First, we can’t do date and time arithmetic with numeric and character fields. Second, the people whom we serve …
Read more