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.
August 27, 2018 Ted Holt
When I first learned COBOL, I coded loops the way all the programmers in my shop did — with GO TO. Paragraph names were labels, not routines. Then I took a class in COBOL and learned structured programming. I’ve never looked back. I wish other people felt the same way, because I don’t like to work on GOTO-laden programs.
Injudicious use of branching — in RPG that would be the GOTO and CABxx op codes — is a major reason I refactor. GOTO plays havoc with program “logic”, a word I hesitate to use in this context. The minute someone …Read more
August 20, 2018 Ted Holt
“Make it easy on yourself,” warbled Dionne Warwick when I was just a pup. That may be good advice when severing a romantic relationship, but not when programming computers. Instead of making it easy on ourselves, we who develop and support applications need to make it easy on the people we serve.
Recently I worked on a project in which users had to enter time values into various Web pages. The original specifications stated that users would enter time values in a format we commonly use in the United States: two-digit hour, a colon, two-digit minute, a space, …Read more
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
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
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
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
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!
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
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
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.
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