• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Quick And Handy RPG Output, Take 2

    October 25, 2021 Ted Holt

    I am pleased today to revisit a topic I wrote about just over seven and a half years ago. I do so for two reasons. First, I’ve made a slight improvement to my routine. Second, I’d like to provide more examples of this routine in action. My previous article suffered from a paucity of examples. I can’t believe I let that happen.

    I’m talking about the writeln subprocedure, a handy routine that I use to write unstructured text to a spooled file. I derived the inspiration for this routine from Pascal, a programming language I used heavily when I was …

    Read more
  • Guru: What Is Constant Folding And Why Should I Care About It?

    October 18, 2021 Ted Holt

    Constant folding is a compiler-optimization technique, whereby the compiler replaces calculations that involve constants with the result values when possible. Constant folding is common in modern compilers, and according to the RPG reference, the RPG compiler uses this technique. (See the documentation of the %div and %rem functions, for example.)

    But you and I don’t write compilers. We write business applications. Why then should we care about constant folding? That’s a question worth pondering.

    Consider how I used to have to write RPG in the Dark Ages.

    C                     MOVE CUSTNR    CUSTSV  50
    

    Here I’m copying the customer account number to …

    Read more
  • Guru: Fall Brings New RPG Features (And So Did Spring!)

    October 4, 2021 Jon Paris

    When I first sat down to write this tip my focus was on introducing you to the new RPG features that were added alongside the latest September Technology Refresh (TR). However, when I tried to reference one of the enhancements from the spring enhancements, I quickly discovered that I had never written those up for the Guru column!

    Oooopppps! As a result, this “tip” will cover all the RPG enhancements added this year, both in the April and September announcements. It will be in two parts. This first part will cover the array-oriented features.

    RPG’s range of array-processing options has …

    Read more
  • Guru: Alternate SQL Row-Selection Criteria Revisited Revisited

    September 27, 2021 Ted Holt

    I am not a “do as I say and not as I do” kind of person. After I wrote the article Guru: Alternate SQL Row-Selection Criteria Revisited, I got serious about using dynamic SQL in my RPG programs instead of enabling and disabling logical expressions in the WHERE clause. I’m reliving the days when OPNQRYF was my best friend, trying to make apostrophes play nice with string concatenation.

    Overall, I’m happy with the change. When I have converted the switch-laden version to dynamic SQL, I have seen a noticeable performance improvement in some cases, and at least a slight …

    Read more
  • Guru: RDi 9.6, Part 11 – New Features for Experienced RDi Users

    September 20, 2021 Susan Gantner

    Just when you thought my multi-part series on V9.6 of RDi was surely finished, it’s back! It seems like the song that never ends. Happily, though, since more new features have been added to RDi, many of which are the direct result of RFEs (a.k.a. Requests for Enhancement) from RDi users like you and me.

    We’ve waited longer than usual for release 9.6.0.11, but it’s available now. I’ll cover the enhancements in this release in a couple of tips. This first tip will target mostly experienced RDi users. The next one will focus on some of the enhancements to ease …

    Read more
  • Guru: What Are Workload Groups And Why Should You Use Them?

    September 13, 2021 Dawn May

    Workload Groups appear to be a hidden gem of IBM i work management. In all my work with clients, I have only encountered one shop actively using workload groups. Introduced in 2010, they provide an additional control on CPU and can also be used to license software products to a fewer number of cores than are active on the partition.

    Workload groups are very simple entities; you add a workload group with the Add Workload Group (ADDWLCGRP) command. You just need to give it a name and how many processor cores, called the processor limit, can be used …

    Read more
  • Guru: Another Red Flag – Joining On Expressions

    August 30, 2021 Ted Holt

    One would think that a given datum, for example a sales order number, would be defined identically in the various database tables in which it is found within an organization, but one might be wrong. I have on many occasions faced the challenge of joining two or more tables on unmatched data types.

    But it gets worse than that. Sometimes joins involve expressions, which may consist of mathematical operations and/or invocations of functions, both intrinsic and user-written. As with the word DISTINCT in a SELECT, the presence of expression in a join sends up a little red flag that …

    Read more
  • Guru: Set Beats A Loop

    August 23, 2021 Ted Holt

    Hey, Ted:

    I’m sending you some RPG source code that I put into one of our inquiry programs and would like to have your insight. Instead of using the SETLL, DOW and READE opcodes to loop through a group of selected records, I used the SQL SET statement. This seems to me much easier for someone else to understand and follow. Is this good practice?

    — Mike

    I was glad to see Mike’s email in my inbox, as always. He and I met in person at the RPG & DB2 Summit a few years ago, and I’ve enjoyed getting to …

    Read more
  • Guru: Odds and Ends

    August 16, 2021 Ted Holt

    I really appreciate the comments that readers add to the end of articles or send to me in email. The more you share, the more all of us are better off. I know that you don’t have time to go back through articles we have published to see if anyone has commented, so this week I do that for you. Please keep the feedback coming!

    Several people posted responses to Paul Tuohy’s article Getting Meaningful Audit Information from a Journal. You can read them for yourself, but I wanted to thank Emanuele, who mentioned a tool that is similar …

    Read more
  • Guru: The Deception of Fractional Labeled Durations

    August 9, 2021 Ted Holt

    Hey, Ted:

    We measure certain processes in tenths of an hour. For whatever reason, we cannot make date/time arithmetic work properly when dealing with this data. There must be something that we don’t understand — what we’re doing seems simple and straightforward. Can you help?

    — One Confused Reader

    What this reader wants to do makes perfect sense. He wants to take a value like 8:00 AM, add a fractional number of hours to it, let’s say 1.1, and come up with 9:06 AM. Let’s try an example.

    declare global temporary table StampData
     ( Stamp   timestamp );
        
    insert into session.StampData 
    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20
  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19

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