• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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: Faster Fetching, Revisited

    November 13, 2017 Paul Tuohy

    While visiting a client recently, I was shown how they were using a multi-row FETCH into a multiple-occurrence data structure to retrieve large sets of data. When I asked why they were not using a data structure array instead, I was referred to an IT Jungle article in which Ted Holt answered a question on whether it was faster to perform a row-at-a-time FETCH or a multi-row FETCH when using embedded SQL.

    Ted provided a comparison between a row-at-a-time FETCH, a multi-row FETCH into a data structure array, and a multi-row FETCH into a multiple-occurrence data structure. At the end …

    Read more
  • Database Modernization: Methodology To Solve Problems

    November 6, 2017 Dan Burger

    Innovation is a combination of tools and processes. Big mistakes get made when there is too much emphasis on the tools and too little on the processes. Innovation in a can, a bottle or a box isn’t reality-based strategy, although it’s often thought of that way, particularly at the executive level where the goal of competitive advantage is sometimes tied to specific products and technologies.

    Tools and processes support innovation. They aren’t the innovation. Not at the individual business level where competitive advantage is differentiated and honed with years of experience. Too often experience is discounted or even disregarded when …

    Read more
  • Guru: Logging SQL Errors And Warnings

    October 30, 2017 Birgitta Hauser

    If something goes wrong with an embedded SQL statement or an SQL routine (a trigger, stored procedure or user-defined function), the system does not crash. Instead, DB2 returns a negative SQL code and an SQL state that starts with something other than 00, 01, or 02. If the routine does not handle the error, the program continues to run.

    It is good practice to log errors to a table, especially unexpected ones. Before you can log any errors, you need to know how an SQL error can be trapped and handled. You need to know how to write a condition …

    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: Error Handling in SQL PL, Part 2

    October 16, 2017 Ted Holt

    In the previous episode of this exciting, action-packed series, I introduced you to the exception-handling methods that IBM has built into SQL PL. The cliff-hanger has lasted four months now, much too long. It’s high time I explained RESIGNAL, as I promised I would. I will explain SIGNAL while I’m at it.

    Before I start the syntax lesson, I need to explain a bit of philosophy. I use the hit-the-ball-drag-Harry method of exception-handling when I embed SQL in RPG and COBOL programs. That is, I execute a command, test the SQL state, execute a command, test the SQL state, …

    Read more
  • Guru: Making Sense of Codes

    October 9, 2017 Ted Holt

    I have most likely never seen your database, yet I can tell you with confidence that it is full of codes. We can’t live without them. Codes give us shortcuts for all sorts of types and categories. They consume less storage than the values they represent. They help us keep the database clean and consistent within itself.

    But they surely can be hard to read. Some codes are obvious. M for male and F for female, for instance. My experience is that most are not so. Look at this and see how much sense you can make of it.

    select 
    …

    Read more
  • TRs for IBM i 7.3 and 7.2: Enhancements, No Big Surprises

    October 4, 2017 Dan Burger

    With each Technology Refresh, we are reminded that the pace of enhancements IBM brings to its IBM i operating system and related software products is significant and that certain areas are more significant than others. So, the IBM i community is either aligned with these upgrades and eager to put them to use or it’s not yet ready, willing or able to be technologically current. As usual, there are IBM i shops watching as the enhancements unfold and making decisions on whether the enhancements can deliver benefits to their business in terms of productivity and solving business challenges.

    Steve Will, …

    Read more
  • IBM Adds Support For Publishing JSON In DB2

    October 4, 2017 Alex Woodie

    At long last, IBM i shops will be able to publish JavaScript Object Notation (JSON) documents from their Db2 for i database. That much-desired capability will finally arrive as part of the latest Technology Refreshes (TRs) for IBM i versions 7.2 and 7.3, which were announced yesterday and ship this month. New SQL commands and security log enhancements round out the release.

    The capability to publish JSON documents has been a long time coming for IBM i shops, who until now have had to content themselves with the capability to consume and store JSON within their database, but who lacked …

    Read more
  • Guru: Consuming A REST Web Service Using SQL And POST

    October 2, 2017 Mike Larsen

    In my prior article, I showed how to consume a REST web service using the GET verb. This time, we’re going to continue to build our knowledge of web services by working with the POST verb. In addition to working with a different verb, I’m also going to demonstrate how to pass a header and body to the service.

    The goal is to post information to an Amazon Web Service (AWS). I created a simple REST Amazon Web Service that accepts information about a pet which will be inserted into a pet store database. I pass a JSON structure …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • Positive News From The Kyndryl Mainframe Modernization Report
  • NAViGATE, inPower 2025 On Tap for September 2025
  • Guru: WCA4i And Granite – Because You’ve Got Bigger Things To Build
  • As I See It: Digital Coup
  • IBM i PTF Guide, Volume 27, Number 37
  • AI Is Coming for ERP. How Will IBM i Respond?
  • The Power And Storage Price Wiggling Continues – Again
  • LaserVault Adds Multi-Path Support To ViTL
  • As I See It: Spacing Out
  • IBM i PTF Guide, Volume 27, Numbers 34, 35, And 36

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