• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Unlocking The Power Of %CONCAT And %CONCATARR In RPG

    April 14, 2025 Gregory Simmons

    When working with strings in RPG, especially in modern free-format code, the %CONCAT and %CONCATARR built-in functions (BIFs) offer efficient and readable solutions for combining strings. These functions simplify the process of concatenating multiple string values, making your code cleaner and easier to maintain. In this article, we will explore how they work and demonstrate their practical applications.

    The %CONCAT BIF allows you to combine multiple strings. It’s a more efficient and readable alternative to traditional concatenation using the + operator.

    Here’s a simple example:

    **Free
    Ctl-Opt Main(CONCAT_1) ActGrp(*Caller);
    
    Dcl-Pr pause ExtProc('sleep');
      time_to_sleep Uns(10) Value;
    End-Pr;
    
    Dcl-Proc CONCAT_1;
    
      Dcl-S firstName 
    …

    Read more
  • Guru: Creating An RPG Stored Procedure That Returns A Result Set

    March 17, 2025 Mike Larsen

    In the previous article, I showed how to create an RPG stored procedure that uses parameters. In this article, I’m going to show how to create an RPG stored procedure that returns a result set, as we would likely encounter this scenario more frequently. The data used in this example comes from the Department table from IBM’s Sample database.

    I created an RPG program (Figure 1) that selects all rows from the Departments table. I didn’t add any selection criteria as I know there aren’t many rows in the table, but you may want to limit the number of rows …

    Read more
  • Guru: AI Pair Programming In RPG With Continue

    March 10, 2025 Gregory Simmons

    In my last article, I shared a brief introduction to the GitHub Copilot extensions. These extensions provide an easy way to get up and running with an AI coding assistant to aid you in your RPG development. Being cloud based, it’s lightweight in terms of system resources, but it does cost a little money per month, per user.

    For this article, I would like to share with you what I have learned about a newer extension for VS Code named Continue. Continue runs locally on your PC, is 100 percent free, and as of this writing, is the leading …

    Read more
  • Guru: Avoiding Land Mines During A Role Swap

    March 3, 2025 Steven McIver

    Having a disaster recovery plan is crucial for many businesses running on IBM i. The data that resides on these systems is often mission critical to the business. Implementing a strategy for disaster recovery is tough. Planning and actually executing on the strategy is even tougher.

    Even with excellent planning, role swap tests to a designated disaster recovery machine can many times fall short due to unforeseen circumstances that force an immediate role swap back to the production site. In this article, I’ve compiled a few of those land mines to look out for to help ensure a successful swap …

    Read more
  • Guru: AI Pair Programming In RPG With GitHub Copilot

    February 17, 2025 Gregory Simmons

    If you have been meaning to give VS Code a try, but just haven’t had a chance, I encourage you to avail yourself today. Yes, for you RDi users, it will take a little bit to migrate your favorite settings, code snippets, and compile commands – but I promise, you won’t regret the move.

    In my article, Getting Started With The Code 4 i Extension Within VS Code, I offer a few more insights to help get you started. And if you are an SEU user, yes, the switch may seem daunting, but one of the great things about …

    Read more
  • Guru: Creating An RPG Stored Procedure With Parameters

    January 20, 2025 Mike Larsen

    There are times we need to build processes that will be used across different platforms. An example is a pricing routine. When a system needs to get pricing, we need to make sure the price the customer pays is the same regardless of how the order was created in our system.

    One way to create this functionality is using web services. Another way we can provide this functionality is through stored procedures. This series of tips will focus on different ways we can build stored procedures on IBM i.

    For the first part, I created an RPG program (Figure 1) …

    Read more
  • Guru: RPG Receives Enumerator Operator

    November 11, 2024 Gregory Simmons

    The RPG language now (some would argue, finally) has an enumerator operator. This was introduced in IBM i 7.5 TR3 and IBM i 7.4 TR9.

    DISCLAIMER: The edibility of the mushrooms listed in my test program are purely to give the program some context and make it interesting. Their edible status is based on information from the Missouri Department of Conservation’s publication A Guide to Missouri’s Edible and Poisonous Mushrooms. Before foraging for or consuming any wild mushroom do your research and be safe.

    Let’s dive right into a code sample. We’ll start with a simple linear-main program …

    Read more
  • Guru: Web Concepts For The RPG Developer, Part 4

    October 21, 2024 Chris Ringer

    The final article in this series is about the JWT (JSON Web Token). If you wish to review the previous articles, you can drill back from part three. For unattended machine to machine (M2M) processes, a JWT string is a formatted container for requesting access to a resource server. I think of a resource server as the applications. And in our case, the JWT has an asymmetric signature.

    But really, what is a JWT? It’s similar to a temporary driver’s license. Think about your last visit to a hotel (figure 1).

    Steps:

    1. You present your ID (JWT) during check-in
    …

    Read more
  • Guru: RPG Select Operation Gets Some Sweet Upgrades

    September 23, 2024 Gregory Simmons

    I have always been a fan of RPG’s Select operation. Any time I’m coding an If statement and think there’s a chance that there could be a third situation other than the If-Else conditions, I will go ahead and code the Select operation instead of the If statement. The RPG language’s Select operation got a pretty sweet upgrade in V7R5 TR2 and V7R4 TR8. Now, the Select statement can be presented with a value and we have two new op-codes to use within the Select operation; When-is and When-in.

    DISCLAIMER: The edibility of the mushrooms listed in my test …

    Read more
  • Guru: Creating A Web Service With Basic Authentication

    August 12, 2024 Mike Larsen

    I have been working with web services for many years, and I usually use IBM’s IWS (Integrated Web Service) tool to create them. The tool provides a wizard-based interface that allows me to quickly create a web service from an RPG program. Recently, I created a web service that uses basic authentication, and I want to share my experience.

    I am assuming that you are already familiar with creating a web server and a web service, so I am just going to show the steps that need to be taken to add basic authentication functionality. If you would like me …

    Read more

Previous 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