• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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: 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
  • Guru: Open Access To The Rescue – The Next Step

    May 6, 2019 Jon Paris

    I recently wrote a tip on using an Open Access handler to enable the creation of flat files in the IFS. In that version of the handler I generated a generic file name and used hard-coded record delimiters and code page settings. I mentioned at the time that I would normally supply these values at run time. In this follow-on tip I describe how the handler can be modified to use the Open Access User Parameter to facilitate this.

    The User Parameter is simply specified as a second parameter to the HANDLER keyword. It can be a simple variable or, …

    Read more
  • Guru: Creating Excel Spreadsheets With Python

    April 29, 2019 Mike Larsen

    Over the past several years, I’ve seen a growing demand to provide business data in Excel. Some shops are content to receive their data in .csv format and then manually apply formatting to make it presentable. Wouldn’t it be better if we could provide a spreadsheet that is already formatted?

    In my opinion, the answer is yes. Most recently, I’ve been using PHP to accomplish this task. PHP works great for me, but I always like to have different options from which to choose. This is important to me because some shops may not have PHP installed. Based on that …

    Read more
  • Guru: Preamble Comments

    April 15, 2019 Chris Ringer

    Do you remember what you ate for lunch two days ago? If you’re like me, you had to think about it for a minute before answering. Now imagine trying to recall the detailed requirements of a few programs you wrote a year ago so you can modify them for a new project. Or better yet, what if someone else like a retired employee or a traveling contractor coded these programs? At this point you may become very dependent on any comments they left in the code.

    It’s been said that any time spent commenting on your code now might save …

    Read more
  • Guru: Dealing With RPG Errors and Embedded SQL

    April 8, 2019 Ted Holt

    Hey, Ted! I’m having trouble using some of the new techniques I learned at the RPG and DB2 Summit. Below is a screen shot of a program I am writing. I cannot figure out why the compiler doesn’t like it. Can you see anything that would be causing the declarations to fail?

    — Mike

    I glanced over Mike’s code and noticed that he used a correlation name in the SELECT and WHERE clauses, but did not define that correlation name for any of the tables, like this:

    SELECT x.onefield, x.twofield, x.redfield, x.bluefield
    FROM MYTABLE
    WHERE x.onefield = :TestValue;
    

    He …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • EvolveWare Makes Progress With RPG Code Modernization Using AI
  • Why The IBM i Market Needed Another VTL Option
  • What Price Power?
  • Cloud Revenues Saved By The GenAI Boom
  • IBM i PTF Guide, Volume 27, Number 44
  • Power Systems Grows Nicely In Q3, Looks To Grow For All 2025, Too
  • Beta Of MCP Server Opens Up IBM i For Agentic AI
  • Sundry IBM i And Power Stack Announcements For Your Consideration
  • Please Take The IBM i Marketplace Survey
  • IBM i PTF Guide, Volume 27, Number 43

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