• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Use SQL To Find Duplicate Source Code

    March 12, 2018 Ted Holt

    According to Brian Tracy, “good habits are hard to develop but easy to live with; bad habits are easy to develop but hard to live with. The habits you have and the habits that have you will determine almost everything you achieve or fail to achieve.” This is as true in programming as in anything else we may do.

    Unfortunately, even those of us who strive for good work habits often have to follow the work of people who did not. One bad habit I come across occasionally is known in software engineering as WET solutions. WET stands for “write …

    Read more
  • Guru: Searching Teraspace

    March 5, 2018 Jon Paris

    In my previous tip, Sorting In Teraspace, I looked at how the qsort API can be used to sequence data in ways that SortA can’t begin to approach. Now that the data is sorted, one of the things I may want to do with it is to search it. In this tip I will look at how that can be achieved using the bsearch API. The approach I will be discussing allows for partial key searches and handling the fact that such a search may result in multiple hits.

    As you will see when we work through the code, …

    Read more
  • Guru: Moving A Web Service To Another Web Server

    February 19, 2018 Mike Larsen

    IBM Integrated Web Services (IWS) makes it easy to create web services and deploy them to a web server. If you need to deploy the same service to multiple web servers, you could use IWS to manually create it on each server, but it would be time-consuming and error-prone. Simply missing a setting when creating the service can lead to unexpected results.

    Or you could automate the process. That would ensure the attributes of the service carry forward from server to server. While I won’t get into the web service creation process, as there are already many articles that address …

    Read more
  • Guru: Combine Related Rows Using SQL

    February 12, 2018 Ted Holt

    A reader writes: “Hey, Ted. In our ERP system, certain business objects, such as sales orders and purchase orders, can have multiple comment records. Is it possible, using SQL, to combine all the comment records for an order into one long comment and retrieve it as a column in a result set?”

    I can relate to this. I can remember supporting an ERP system where not only the orders, but the order detail lines, could have such comments. End users depend heavily on such unstructured data to do their jobs. To answer your question, yes, it is possible and it …

    Read more
  • Guru: Sorting In Teraspace

    January 29, 2018 Jon Paris

    In an earlier tip, Teraspace To The Rescue, I discussed how to use teraspace in RPG to permit the storage and manipulation of data that requires more storage than RPG’s 16MB limit. In this tip I am going to discuss how such data can be sorted. Hint: SORTA won’t work!

    Before I get to that though, there is one thing I should mention. In that original tip I said: “For reasons I have never understood, DEALLOC will not null your pointer. So it is a good idea to do it yourself. . . .” IBM’s Barbara Morris pointed out, …

    Read more
  • Guru: Using Curl To Interact With Web Services

    January 22, 2018 Jacob Holt

    There have been times where I have had to collect or enter data into vendor websites. While usually this was not a hassle, it was an uncommon function of my job. However, it wasn’t long before the standard business process got unbearable. I began looking for ways to automate those tasks by using the command-line program Curl to get and post data to vendor web services.

    Curl is an open-source program that supports a plethora of internet protocols for transferring data. With its wide-ranging parameters, this program offers much power for automating tedious tasks. But just like other highly flexible …

    Read more
  • Guru: An Update Conundrum Finally Solved!

    January 8, 2018 Ted Holt

    Russ writes, “Hey, Ted! I was trying to use a pure SQL solution to adjust some data today. My SQL statement worked fine in quality control, but failed in production. I’ve been wondering if the failure was caused by the database or by me! My problem was to renumber sequence numbers for a customer in a table.”

    Russ’s question arrived in my inbox on February 1, 2012. Yes, almost six years ago. At the time, I couldn’t help him. But with the latest technology refreshes from IBM, there is now a way to make the update work properly, and I’m …

    Read more
  • Guru: Using SELECT * With Cursors

    November 27, 2017 Ted Holt

    From time to time someone brings to my attention the use of SELECT * with SQL cursors in RPG programs. Specifically, is that a good idea or a bad idea? I have learned that the answer to that question is “It depends.” Using SELECT * in a cursor declaration may or may not get you into trouble.

    To set the stage, let’s begin with a simple example — an RPG program that reads one table (physical file) and prints each row (record). Even though most programs use data from more than one table, programs that read only one table are …

    Read more
  • Guru: Wow! I Could Have Had Long Column Names! – Take 2

    October 23, 2017 Ted Holt

    In 1990, three computer science professors named Gorla, Benander, and Benander wrote about debugging effort in COBOL programs. Among their claims was that debugging is easier if variable names were between 10 and 16 characters long. The original native data definition facilities allowed variable names up to 10 characters, but nowadays we can define alias names that Gorla, Benander, and Benander would be proud of.

    It is common in many DB2 for i shops to have physical files with field names of six characters or less. This practice dates to predecessor systems, such as the System/36, for which the …

    Read more
  • Guru: Fundamentals Of Prototyping, Part 1

    July 24, 2017 Jon Paris

    In my series on parameter passing fundamentals, I mentioned the importance of using prototypes to help ensure consistency of parameter definitions; i.e., to help ensure that the parameter passed to the called routine matches what is expected. After that article was published, it came to my attention that many of my readers were unaware of some of the additional capabilities of prototypes, in particular that prototypes can not only identity errors in parameter usage, but that in some cases they can actually fix them for you!

    Before we can begin, though, it would be a good idea to ensure that …

    Read more

Previous Articles Next Articles

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • EvolveWare Makes Progress With RPG Code Modernization Using AI
  • Why The IBM i Market Needed Another VTL Option
  • What Price Power?
  • Cloud Revenues Saved By The GenAI Boom
  • IBM i PTF Guide, Volume 27, Number 44
  • Power Systems Grows Nicely In Q3, Looks To Grow For All 2025, Too
  • Beta Of MCP Server Opens Up IBM i For Agentic AI
  • Sundry IBM i And Power Stack Announcements For Your Consideration
  • Please Take The IBM i Marketplace Survey
  • IBM i PTF Guide, Volume 27, Number 43

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle