• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Passing Parameters To Python

    August 5, 2019 Mike Larsen

    Python scripts offer great benefits to developers, whether used standalone or in conjunction with RPG programs. As I’ve been exploring Python and recently I had a need to execute a Python script from an RPG program. In addition to executing the script, I also wanted to pass it parameters.

    One of the benefits of passing parameters is to give us the ability to soft-code programs or scripts. Soft-coding makes programs more flexible and re-usable, and helps to reduce maintenance.

    To illustrate how to do this, I’ve coded a very simple RPG program and an even simpler Python script. I’ll start …

    Read more
  • Guru: How Thorough Was Your Last Test? RDi Code Coverage Can Tell You

    July 22, 2019 Susan Gantner

    When you’ve made changes to one or more programs, you test all the changes – right? And, of course, you also test all the rest of the code just to make sure you didn’t break anything else. Did you do that with your last set of changes? Did you test ALL the code? Enabling you to answer that last question is what RDi’s Code Coverage facility is all about.

    This is an introduction to Code Coverage — the basics of both why and how to use it. Before I go into how to run it, it may pique your interest …

    Read more
  • Guru: Finding Large Files With Python

    July 15, 2019 Mike Larsen

    It’s always a good idea to purge files that aren’t needed any longer. Chances are that you already have procedures in place to purge data from Db2 files and tables, but what about files that reside in the IFS? Do you have a good solution for keeping the IFS clean?

    Perhaps you have old order files stored in the IFS. If you work for a large company, these types of files can accumulate quickly. I’ve written processes in the past to remove files from the IFS using RPG, but I’d like to offer an alternative. I’m going to show how …

    Read more
  • Guru: One Way To Deal With Two Null Formats

    July 8, 2019 Ted Holt

    Hey, Ted:

    We are building a new system and want to use modern programming and database techniques. I have had quite a time trying to get nulls to act right. It gets confusing fast because RPG handles them differently than the way embedded SQL does. When using SQL for I/O, how do we handle the two null formats?

    — Brian

    There are several ways to go about the “problem” of nulls. Let me give you one simple method, but keep in mind that it’s not the only way.

    First, let’s create a table and put some data into it.

    create 
    …

    Read more
  • Guru: When %SCAN Isn’t Sufficient

    June 24, 2019 Ted Holt

    The RPG %SCAN built-in function is wonderful! I can still remember having to look for a string within a string using RPG II on System/36. What an ordeal that was! Yet in some situations %SCAN can’t do all I need it to do. In those cases, I rely on the power of SQL.

    One case where SQL comes in handy is when I need a case-insensitive scan. Instead of RPG’s %SCAN function, I use SQL’s LOCATE and UPPER functions, like this:

    dcl-s  Description  char(48);
    dcl-s  pos          int (10);
    
    exec sql
       set :pos = locate ('HAMMER', upper(:Description));
    

    If Description has the …

    Read more
  • Guru Classic: Looking For Commitment, Part 1

    June 19, 2019 Paul Tuohy

    Author’s Note: This set of three articles was originally published in March of 2009. (See links in Related Stories below). As companies look to modernizing their applications, commitment control can play an integral role. In my next three Guru Classic articles, I will be updating the content of these articles for free-form RPG.

    In this article, I will discuss what commitment control is, why you may want to use it, and the basic requirements for commitment control. In subsequent articles, I will look more closely at how commitment control works, different ways in which it can be implemented, …

    Read more
  • Guru: Use SQL to Generate Random Data

    June 17, 2019 Ted Holt

    Suppose I needed to generate a large database table with random data in order to adequately test the performance of an SQL query. Suppose that, for security reasons, I was not allowed to copy the production version of the table. Suppose that I needed a way to generate a lot — and I do mean a lot! — of random data. Suppose this scenario is not mere supposition.

    Before an SQL query goes into production, it should be tested against a production-like dataset. Running a query against a test dataset of 25 rows (records) can produce unpleasant surprises when it’s …

    Read more
  • Guru: Getting Started With Python On IBM i

    June 10, 2019 Stephanie Rabbani

    Python is one of my favorite open-source languages. I’ve used it to build web applications, utilities, and diverse tools such as a web server monitor and an automated application testing suite. In this article, I’ll show you how to install Python on IBM i and create your first program.

    Why Python? For several reasons.

    • You can use Python to do some cool processing on your system. Graphical application development, games, data analysis, and web development are all Python’s strengths.
    • Coding in Python is easy, relatively speaking. The syntax is easy to learn, dropping the formal verbosity found in traditional
    …

    Read more
  • Guru: 7.4 Brings New RPG Goodies

    June 3, 2019 Jon Paris

    As I’m sure you know by now, IBM recently announced version 7.4 of IBM i. Along with major enhancements such as Db2 Mirror, we also got a number of new RPG features. In this tip I’ll cover those that are already available in 7.3 via PTF. The 7.4-only enhancements will be covered in a subsequent tip.

    Before we get into the details of the 7.3 features, just a hint of what is to come . . . 7.4 brings the long-awaited arrival of dynamic arrays known to IBM as varying dimension arrays. No more do you have to compromise between …

    Read more
  • Guru: Application Tracing With The QTRC APIs

    May 20, 2019 Dawn May

    The IBM i operating system is extensively instrumented for diagnostic purposes to help IBM resolve issues should they arise. Instrumenting your application for diagnostics is also possible in a manner very similar to what IBM has done in the operating system.

    STRTRC and the QTRC APIs

    The operating system includes a trace facility called QTRC. This trace facility is a set of APIs (QTRC APIs) that allow you to instrument your application to collect trace data.  This trace data can be whatever you may find helpful for debugging applications in a production environment, where using a debugger is …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • SEU’s Fate, An IBM i V8, And The Odds Of A Power13
  • Tandberg Bankruptcy Leaves A Hole In IBM Power Storage
  • RPG Code Generation And The Agentic Future Of IBM i
  • A Bunch Of IBM i-Power Systems Things To Be Aware Of
  • IBM i PTF Guide, Volume 27, Numbers 21 And 22
  • 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

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