• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Find Unused Objects On IBM i Using SQL

    May 15, 2023 Bob Cozzi

    I have a client that uses SQL iQuery for nearly all “Report” type applications since SQL iQuery Version 2. They asked if they could create a report that listed all the unused objects in their user libraries. They also wanted the option to output to Excel-compatible format if desired.

    Since SQL iQuery allows you to output the results of your SELECT statements to any of its supported formats, Excel-compatible is given.

    Note: the code for this article is avaialble on GitHub at this link.

    There were a couple of approaches. I could use our other product, SQL Tools OBJECT_LIST …

    Read more
  • Guru: Speeding Up RPG By Reducing I/O Operations, Part 1

    May 8, 2023 Gregory Simmons

    Perhaps one of the easiest ways to speed up an RPG program is to reduce the number of I/O operations it needs to perform. In this article let’s explore one simple method for moving toward dataset processing.

    Here I have a simple RPG program. Okay, admittedly, we don’t often get to write “simple” RPG programs, but for this example, I have stripped the RPG program down to just the read loop so I can demonstrate the conversion.

    1     Dcl-f AcctMstr Usage(*Input) Keyed;
    2     Dcl-pr entry ExtPgm('RPGRPT1');
    3       n Packed(3:0);
    4     End-Pr;
    
    5     Dcl-pi entry;
    6       inBranch Packed(3:0);
    7     End-pi;
    
    8     
    …

    Read more
  • Guru: String Manipulation Using SQL

    October 24, 2022 Mike Larsen

    Recently, I was working with an employee file where first and last name were concatenated with a comma separator. A requirement of the project was to parse the name and populate a different table where first and last name are separate columns. I won’t address the design of the employee file, but I will show how I completed the request.

    In Figure 1, I use the position string function via SQL to extract the first name.

     

     

    Figure 1. Extract first name

     

    In this example, I use the trim, substring, and posstr functions to position to the first …

    Read more
  • Guru: Beware of SQL Precompiler Variables

    September 26, 2022 Ted Holt

    In a famous Henny Youngman joke, a patient says, “Doctor, it hurts when I do this,” to which the doctor replies, “Then don’t do that.” Corny jokes aside, I have spent decades trying to identify programming practices that hurt when I do them, and having identified them, cease to do them. A case in point is the misuse of the variables that the SQL precompiler defines in my RPG programs, variables such as SQLCODE, SQLSTATE, and SQLER3.

    “So what,” I hear you ask, “is the problem with these variables? ” Well, they’re global, and global variables are evil.   Global …

    Read more
  • Guru: The SND-MSG Op Code And Message Subfiles

    September 12, 2022 Ted Holt

    If you’re one of the many IBM i programmers who still writes green-screen applications, think about how your programs communicate with the users. How do you tell a user that a value that he’s just entered is invalid, or that he needs to press a command key to proceed? I’ve seen several methods, but a common one — and my favorite — is to communicate through a message subfile.

    The nice thing about message subfiles is that I can report two or more messages at one time. I like the computer to find as many errors as possible and let …

    Read more
  • Guru: Regular Expressions, Part 2

    August 15, 2022 Mike Larsen

    In the first part of this series, I showed how to replace characters in a string using SQL and regular expressions. This time, I’ll show other regular expressions that are available for us to use. The regular expression functions I’ll show are REGEXP_COUNT and REGEXP_LIKE and the examples come from production programs that I’ve recently implemented.

    In the first example (Figure 1), I want to get a count of the number of occurrences of a pattern within a string. To make this more interesting, I’m searching for two different patterns within a sting. To accomplish this objective, I used …

    Read more
  • Guru: IBM i Privileged Account Management, And What’s So Special About Special Authorities

    August 1, 2022 Bruce Bading

    Privileged Account Management (PAM) is a keystone of cybersecurity. Everywhere we look PAM is a hot topic. How and why should we worry about it? IBM, Ponemon, Verizon, etc., tell you that it is vitally important to protect your endpoints from cyberattacks and insider threats. While the Verizon DBIR states that external threats account for 80 percent of security incidents, it points out their findings that show otherwise for incidents resulting in data compromise where the insider threat exceeded that of an outsider by more than 10 to one. Simply put by Verizon, “This supports the principle that …

    Read more
  • Guru: Regular Expressions, Part 1

    July 25, 2022 Mike Larsen

    In the first part of this series, I will show how to replace characters in a string using SQL and regular expressions. I know I can replace characters using RPG or SQL, and they work great, but there are some cases where I find using regular expressions is a bit easier.

    For the examples I’ll show, I’m using the REGEXP_REPLACE function. REGEXP_REPLACE allows me to search for a particular value within a string and replace it with another value.

    In the first example (Figure 1), I want to search a string that has both letters and digits and I want …

    Read more
  • Guru: IBM i Experience Sharing, Case 5 – Using IBM i PDI Charts To Answer Performance Questions

    July 18, 2022 Satid Singkorapoom

    During my long career as an IBM i performance specialist, it was natural for people to ask me performance-related questions of various kinds. But in many cases, it seemed to me that the customer could not understand my answers, and I could not provide supporting evidence due to the lack of a performance reporting tool that could produce easy-to-understand explanatory information. The situation changed for the better with the availability of IBM i Performance Data Investigator (PDI) tool as of release 6.1. I would say that the PDI tool provides charts of information that resemble those used by business people …

    Read more
  • Reader Feedback On Guru: The Finer Points of Exit Points

    July 12, 2022 Bruce Bading

    Hey, Alex:

    Hope you are doing well. I was reading this article about exit points and found some technical inaccuracies.

    The Socket Exit can be used to cover the following: You can use exits block all unwanted ports blocked. I will be happy to talk with author of this article to explain how this works.

    • Not all services have exit points available.
    • User defined ports do not have exit points associated.

    Best regards,

    — Tony Perera, Trinity Guard, a division of Fresche Solutions


    Hey, one and all:

    As the article states, exit points are an enhancement to cybersecurity on the …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • 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
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

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