• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Refactoring RPG – GOTO

    August 27, 2018 Ted Holt

    When I first learned COBOL, I coded loops the way all the programmers in my shop did — with GO TO. Paragraph names were labels, not routines. Then I took a class in COBOL and learned structured programming. I’ve never looked back. I wish other people felt the same way, because I don’t like to work on GOTO-laden programs.

    Injudicious use of branching — in RPG that would be the GOTO and CABxx op codes — is a major reason I refactor. GOTO plays havoc with program “logic”, a word I hesitate to use in this context. The minute someone …

    Read more
  • Guru: Make It Easy On Someone Else

    August 20, 2018 Ted Holt

    “Make it easy on yourself,” warbled Dionne Warwick when I was just a pup. That may be good advice when severing a romantic relationship, but not when programming computers. Instead of making it easy on ourselves, we who develop and support applications need to make it easy on the people we serve.

    Recently I worked on a project in which users had to enter time values into various Web pages. The original specifications stated that users would enter time values in a format we commonly use in the United States: two-digit hour, a colon, two-digit minute, a space, …

    Read more
  • Guru: Beefing Up The Job Log, Take Two

    August 6, 2018 Ted Holt

    In Tracing Routines Explain Why The Computer Did What It Did, I wrote about the usefulness of writing information about program execution to determine why a program run gave certain results. Today I want to present a simpler method than the tracing routines. The tracing routines are not obsolete, but they are powerful and I have found them at times to be overkill.

    Just a word about terminology. Since I wrote that article five and a half years ago, my reading has led me to a different understanding of the terms tracing and logging. I’ve since decided that …

    Read more
  • Guru: Refactoring RPG – Indicators

    July 30, 2018 Ted Holt

    Occasionally I hear someone comment about how terrible indicators are. I don’t think they’re bad. Indicator-laden RPG helped me graduate debt-free with a computer science degree and housed, clothed, and fed my family for several years. I prefer to say that indicators were good for their time, but now we have better programming techniques that I much prefer to use.

    Refactoring code to reduce or even eliminate the use of predefined indicators (not indicator variables) can pay off big in benefits. The fewer indicators a program uses, the easier it tends to be to read, understand, modify, and debug that …

    Read more
  • Guru: Serve Web Pages Safely Using A Reverse Proxy

    July 23, 2018 Alan Seiden

    If you are hosting a website or API from your IBM i server, but wish to reduce your worry about allowing access from the Internet, we often recommend a reverse proxy (or “gateway”) server. An industry-standard solution, a reverse proxy server acts as a layer of safety between your production server and your firewall. On IBM i, the IBM HTTP Server (powered by Apache) for i can act as a reverse proxy server, so there’s nothing additional to install.

    While there are several ways to set it up, one approach is to put the reverse proxy or gateway in a …

    Read more
  • Guru: Ready or Not! Part 4 of Big Changes in RDi V9.6, PDM Affinity with Object Table

    July 16, 2018 Susan Gantner

    I’m beginning to feel like a broken record — still more new RDi features with V9.6. I’m excited that there are so many great new features to talk about. In this tip, I’ll cover the primary feature added with fix pack update V9.6.0.3 — enhancements to the Object Table for PDM affinity.

    To me, the enhancements to the Object Table view to make it look and feel much more like PDM are the most significant in the release. There are some other smaller — but still very welcome — enhancements as well, which I’ll cover in a later tip.

    Why …

    Read more
  • Guru: Speed Up Web Pages Using Apache’s mod_deflate

    July 9, 2018 Alan Seiden

    If your web applications run on HTTP Server (Powered by Apache) for i, you can enable a powerful Apache extension, mod_deflate, to speed up your site. Just as zipping up files on your PC saves space and accelerates file transfers, mod_deflate “allows output from your server to be compressed before being sent to the client over the network.” (See https://httpd.apache.org/docs/2.4/mod/mod_deflate.html for more information.) My tests show a speed improvement of 10 to 50 percent.

    You can compress any text-based output, including HTML (whether plain .html files, output from RPG CGI programs, PHP, or other languages), Cascading Style Sheets (CSS), …

    Read more
  • Guru: RPG’s New DATA-INTO

    June 18, 2018 Jon Paris

    In this tip I’m going to give a brief introduction to the latest addition to the RPG language. The new DATA-INTO op-code. DATA-INTO is IBM’s response to the oft-asked question: “When is IBM going to introduce JSON-INTO so we can process JSON as easily as XML?”

    DATA-INTO provides this capability, but IBM has very cleverly given it functionality that goes way beyond what a simple JSON-INTO op-code could ever have done. DATA-INTO is effectively a cross between XML-INTO and Open Access. Like XML-INTO it uses the names of items and their hierarchy to unpack the document into RPG variables. Like …

    Read more
  • Guru: DB2 For i XML Composition And The IFS

    June 11, 2018 Michael Sansoterra

    Hey, Mike! Regarding Composing An XML Document From Relational Data, Part 1, I have built an XML document using DB2 and i. When I run the query, I get a worthless result set. How do I use the SQL XML functions to get a usable XML file?

    This question comes from reader RA, and he doesn’t exaggerate. The result set from his XML-based query looks like this:

    ....+....1....+....2....+....3....+....4....+
    ************Beginning of data************** 
    
    XMLDATA 
    -------- 
    #CGULIB#
    
      1 RECORD(S) SELECTED.
    
     ************End of Data********************
    

    Notice that DB2 for i does nothing to make the XML attractive to human eyes as the entire XML …

    Read more
  • Guru: Ready or Not! Part 3 Of Big Changes In RDi V9.6, Compare/Merge, Code Coverage, and More

    June 4, 2018 Susan Gantner

    This is the third in my series of tips on RDi V9.6. In this one I’ll cover the new compare and merge support, along with improvements to code coverage and a few other smaller enhancements in V9.6. I originally thought this would be the last in the series, but IBM recently made available a new point release that introduced enough new features to mean I’ll be adding at least one more tip.

    Compare And Merge

    The ability to compare the content of two source members is not new to RDi, but with V9.6 the facility now offers the option to …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • With Power11, Power Systems “Go To Eleven”
  • With Subscription Price, IBM i P20 And P30 Tiers Get Bigger Bundles
  • Izzi Buys CNX, Eyes Valence Port To System Z
  • IBM i Shops “Attacking” Security Concerns, Study Shows
  • IBM i PTF Guide, Volume 27, Number 26
  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25

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