• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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
  • Guru: Web Concepts For The RPG Developer, Part 3

    July 22, 2024 Chris Ringer

    Greetings everyone. Articles part one and two were both an introduction on how to build components in an HTTP request. In part three, we will begin to connect the dots and discuss how to asymmetrically sign a simple string. If you ever need to send a secure HTTP request to a government agency or financial institution, you likely will authenticate with a signed token. So, here we go!

    Base64 Take Two

    In part one, the SQL scalar function BASE64_ENCODE embedded in RPG converted a string to base64. This technique will cover most use cases, but what if you need …

    Read more
  • Guru: Parsing JSON That Has Spaces In The Key

    July 8, 2024 Mike Larsen

    One of my favorite tasks is working with APIs. I’ve worked with many APIs over the years, and some introduce unique challenges that must be overcome. Recently, I worked on a project where I was to consume a REST API that provided a JSON payload. While that seems straight forward, I quickly discovered a challenge.

    The JSON payload had keys that have spaces in them (Figure 1). That may be considered bad practice, but I still needed to figure out how I could parse it correctly. Having never seen JSON like this before, I started with a Google search. I …

    Read more
  • Guru: Growing A More Productive Team With Procedure Driven RPG

    June 24, 2024 Gregory Simmons

    There are many great benefits to procedure driven RPG, and I have covered many of them in my previous articles. In this article, I want to share with you what I believe is the biggest benefit to implementing procedure driven RPG in your shop; procedures, when written and implemented properly, are reusable.

    When you’ve written a new procedure that expertly tackles one task, you should be proud of the accomplishment. But don’t keep that in your program. Export it in a service program for your whole team to use! Now, undoubtedly, you will find yourself at one point thinking: “Yeah, …

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

    June 10, 2024 Chris Ringer

    Hello again! Part 1 of Web Concepts for the RPG Developer was an introduction on how to build components in an HTTP request and I hope you enjoyed it. Part 2 is just a continuation of that vast topic because there is so much to learn. I encourage you to click on the links in this article and explore on your own too.

    JSON

    A web API endpoint may require the data in the body of an HTTP POST request to be constructed as JSON (“jay sahn,” short for JavaScript Object Notation). JSON is formatted text (a string) containing key:value …

    Read more
  • Guru: With Procedure Driven RPG, Be Precise With Options(*Exact)

    June 3, 2024 Gregory Simmons

    Introduced to the RPG language in V7R2 TR1 and V7R3 TR7, the Options(*Exact) enables RPG programmers to adopt a more defensive coding style. Defensive coding is something all developers should be practicing.

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

    **Free
    Ctl-Opt Main(Test_Exact_Options);
    Ctl-Opt Debug Option(*SrcStmt:*NoDebugIO);
    
    …

    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