• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: SQL Writes CL

    November 30, 2020 Ted Holt

    SQL is the one tool I cannot work without. Take it away from me and I’ll start driving a truck for a living. Naturally I’m eager to find more ways to make SQL work for me. Today I’d like to share how I recently used SQL to write a huge CL command for me. This is a technique that’s good to know.

    My challenge was to copy all of the several hundred physical data files in a library to a save file so that those files could be loaded onto another IBM i system. The Save Library (SAVLIB) command was …

    Read more
  • Guru: RDi V9.6, Part 10 – Debugger Enhancements

    November 16, 2020 Susan Gantner

    Here I go again – more enhancements to talk about that have come about in RDi V9.6. This time, it’s the debugger that has been enhanced. The 9.6.0.7 fix pack included some new goodies for the debugger.

    Both of the enhanced features were popular Requests for Enhancement (RFEs) — the ability to display very large variable values and the addition of a condition to Service Entry Points (SEPs). These are further proof that the RFE process works. If you haven’t visited the RFE site to vote for your favorite suggested features for RDi, do it now. . . or maybe …

    Read more
  • Guru: Manage PTFs With The Administration Runtime Expert

    November 9, 2020 Dawn May

    This fourth article in my series on using the Administration Runtime Expert (ARE) reviews how ARE is used to manage PTFs. This article assumes you have already learned the basics of how to use ARE from the prior articles.

    PTF management with ARE features these key functions:

    • Check your installed group PTF levels compared to the latest levels available from IBM
    • Verify consistent PTF levels installed across multiple partitions
    • Distribute PTF images to endpoint systems
    • Optionally load and apply PTFs

    The ARE Template Editor provides the interface to define your templates for PTF management.

    Start by determining what type of …

    Read more
  • Guru: SQL and Expanding Subfiles

    October 26, 2020 Ted Holt

    I’ve heard it said on more than one occasion that SQL does not work as well as record-level access (RLA) when loading subfiles. I understand why people feel that way. They’re usually thinking about repositioning to a key value, and there is no SETLL (Set Lower Limit) op code in an SQL cursor.

    Yet I think SQL is better, and today I’d like to share one case that I think presents a good illustration. I had in mind the expanding subfile. There’s a parallel between the two. Consider:

    • Every time you clear the subfile, you open a new cursor.
    • Every
    …

    Read more
  • Guru: Concerning The Stepping-On Of Feet

    October 19, 2020 Ted Holt

    It has come to my attention that once again I did not tell the truth, the whole truth, and nothing but the truth. In Three Suboptimal I/O Practices, I said that a simple SELECT INTO was preferable to a cursor that fetches one row. It turns out that there is at least one situation in which SELECT INTO will not serve the purpose, and one has no choice but to use a cursor that fetches one row.

    The situation is this: the program must lock the fetched row for update. Despite its power and simplicity, SELECT INTO cannot lock …

    Read more
  • Guru: Dynamic Arrays Come To RPG – Limitations, Circumventions, And More

    October 12, 2020 Jon Paris

    In my first two tips in this series I covered the basics of automatic sizing arrays and variable sized arrays. In this final part am going to discuss some of the current limitations in this support and the facilities IBM has put in place to help circumvent them.

    IBM publishes an extensive list of the limitations, but in normal usage only a couple present “real” restrictions in practical terms. If you are curious though, you can find the full list here.

    Limitations

    The first limitation to bear in mind is that, currently, only top-level variables can be defined …

    Read more
  • Guru: Overloading Subprocedures

    October 5, 2020 Paul Tuohy

    The ability to overload subprocedures in RPG is something I had been waiting for a long, long time. IBM finally made it available through a Technology Refresh (7.4, TR1 or 7.3 TR7). If you are not familiar with the term, overloading (in RPG) is the ability to create multiple subprocedures of the same name with different implementations.

    Let’s have a look at how overloading might benefit us when it comes to writing programs and subprocedures. This is a portion of a prototype copy member that, amongst others, contains the prototypes of these three subprocedures:

    dcl-pr format_from_Date varChar(10) extProc(*dclCase);
      dateIn date(*ISO) 
    …

    Read more
  • Guru: DISTINCT Can Hide A Performance Problem

    September 28, 2020 Ted Holt

    When I see the word DISTINCT in an SQL query, a little red flag goes up inside my head. Not literally, of course. But it does make me pause and scrutinize the query more closely. I have found that poorly designed queries sometimes include the word DISTINCT as a final act of redemption to forcibly return the proper result set.

    The purpose of DISTINCT is to remove duplicate rows from a result set. As the DB2 for i SQL reference puts it:

    The keyword DISTINCT is not considered an argument of the function, but rather a specification of an operation …

    Read more
  • Guru: SQL Can Read Program-described Data

    September 21, 2020 Ted Holt

    I thought I left program-described database files behind me in 1988. That’s when I left my last S/36 shop to begin working on the S/38. Well, I did, but not completely. From time to time I work on a system with program-described files, and even some externally described files have program-described fields. Fortunately — and I owe this to Scott Forstie — I have learned that SQL can read program-described data. Will wonders never cease?

    You may be thinking, “This article doesn’t apply to me. Our files are externally described.” You may be right. Then again, you may be wrong. …

    Read more
  • Guru: Qualified Files – Underused and Unappreciated

    September 14, 2020 Ted Holt

    When IBM adds a new feature to the RPG compiler, they do so for a reason. That’s why I try to learn new techniques. I hope they’ll improve the quality of the source code I write. One relatively new feature that I do not see widely used is the qualified file. In the following paragraphs, I’d like to tell you why I like qualified files and how to use them.

    To understand the need for qualified files, it may be good to begin with a brief lesson on the history of the RPG language. When RPG was originally developed, the …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

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