• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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
  • Guru: Testing URLs With HTTP_GET_VERBOSE

    May 20, 2024 Gregory Simmons

    In my previous article Fooling around with SQL and RPG, I explored having a little fun with the HTTP_GET function to fetch a witty Dad Joke from https://icanhazdadjoke.com/. In this article, I want to demonstrate a more practical use of this great function. Or should I say, another version of HTTP_GET, that is HTTP_GET_VERBOSE, which also was introduced to us by the DB2 team in V7R3.

    In its simplest implementation, I can insert the URL I want to test into an SQL statement:

    select *
    from table(QSYS2.HTTP_GET_VERBOSE('https://icanhazdadjoke.com/',''))
    

    I will later want to run this embedded in an RPG …

    Read more
  • Guru: The OpenAI API – The Easy Way

    May 13, 2024 Dan Darnell

    When it comes to programming in a particular programming language there is what you can do and what you can do easily. I use RPG every day and have done so since the System/34 days. I love the language but I’ve also picked up other programming languages over time because sometimes RPG isn’t the right tool for the job.

    I’ve been using IBM EGL – Enterprise Generation Language – to create IBM i applications since 2009. IBM made a push at one time to entice RPG programmers to pick up the language and toolset (Rational Business Developer) for modernization …

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

    April 22, 2024 Chris Ringer

    Way back in the 1990s, I recall accessing data with only RPG III F-Specs. But nowadays some of that critical data may live in the cloud. The good news is tools like HTTPAPI and RXS and SQL functions like SQL HTTP are available to access that remote data from the IBM i. But what you may not know is how to actually format components in those HTTP requests.

    Here I will discuss some techniques to build those components in an HTTP request before sending it across the web.

    HTTP Get Versus Post

    The two most common methods for an HTTP …

    Read more
  • Guru: Fooling Around With SQL And RPG

    April 15, 2024 Gregory Simmons

    Editor’s Note: This was originally scheduled to be published on April 1. No joke. And for a lot of complex reasons, that could not happen. But, it’s still fun, so enjoy.

    I started out one morning, purely interested in having a bit of fun. Honest. In RSS within ACS, I often like to run this SQL:

     select *
     from json_table(
          QSYS2.HTTP_GET('https://icanhazdadjoke.com/',
                  '{"header": "Accept,application/json", "sslTolerate":"true"}'),
                  'lax $' columns ("joke" varchar(200) CCSID 1208)
          )
    

    Okay, that was fun. This is harmless, good fun. But then I thought, what if I put this into a simple RPG program? Then I …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • 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

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