• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • DB2 For i XMLTABLE, Part 1: Convert XML to Tabular Data

    June 13, 2012 Michael Sansoterra

    DB2 for i 7.1 brought many new features including the ability to compose and decompose XML data. However, decomposing an XML document in DB2 for i 7.1 requires quite a few steps and creates, sometimes unwanted, permanent objects. Further, for all of the XML processing features, one lacking feature is the ability to easily and dynamically shred XML. Fortunately, that missing feature is now present with the technology refresh 4 update, which adds the XMLTABLE table function to the SQL developer’s arsenal. In this article, part 1 of my series on DB2 for i, we will look at how

    …

    Read more
  • The New Basics

    June 13, 2012 Jon Paris

    Every time I teach some of the more recent additions to RPG, such as XML parsing or Open Access, I find that I need to include some “remedial” education on some of the D-spec enhancements that have been made to the language over recent releases.

    Most of these enhancements came into the language many years ago, but if you had no immediate need for them, they may have passed you by. After all, even the most avid reader of this newsletter has probably forgotten most of what they read here 10 years ago if they didn’t use it. And yes,

    …

    Read more
  • Three Ways To Fix NetServer Access Problems

    May 30, 2012 Hey, Joe

    I tried mapping a Windows drive letter to the root folder (/) of my Integrated File System (IFS) by using an IBM i NetServer file share. But I can’t get the drive to map. My cubicle buddy can map her drive. Why can’t I map my drive?

    –Phil

    Just as your IBM i user profile can be disabled from signing on to the system after a set number of incorrect sign-on attempts, the system can also automatically disable your user profile from IBM i NetServer access after you exceed the maximum number of sign-on attempts when trying to access a

    …

    Read more
  • Eliminate The Legitimate Use Of GOTO

    May 30, 2012 Ted Holt

    Today I want to share with you some of the ugliest RPG code I’ve ever seen. It is to me the programming-language equivalent of Quasimodo, the hunchback of Notre Dame, and I am its progenitor. Then I will tell you why I wrote this code, and why, despite its ugliness, the code was correct. Last, I will tell you how to “prettify” it.

    The ugly code of which I speak is in a template source code member for file maintenance programs. It is similar in structure to this example:

         P MoveItem        b
         D                 pi
         D  inItemID                      6a   const
         D  inWhsID                       
    …

    Read more
  • Preparing To Install IBM’s RUNSQL Command

    May 30, 2012 Rob Berendt

    I’ve often needed to run a SQL statement from within a CL program. I knew I could by calling a RPG program with SQL embedded in it, or by executing RUNSQLSTM, but I really didn’t want to go to that much trouble to run one simple SQL statement.

    IBM has given you a way to run an SQL command within a CL procedure if you’re running IBM i 6.1 or 7.1. It’s a new CL command called RUNSQL. For 7.1, you must order level 14 or higher of DB2 PTF Group SF99701. For 6.1, order level 25 or higher of

    …

    Read more
  • Preventing Your System from Restarting After a Full System Backup

    May 16, 2012 Hey, Joe

    Good article on the secrets of the IBM i IPL parameters. Is there a way to stop the system from restarting after my full system backups complete (GO SAVE, option 21)? There are times that it would be great for the system to stay in restricted state after a backup, but the startup CL program always runs. How do I stop it from running?

    –Doug

    Here’s the drill for changing your System i and Power i partitions so that they don’t kick off their system startup programs after a GO SAVE, option 21, full system backup.

    First, realize that

    …

    Read more
  • Generic Processing, Continued

    May 16, 2012 Ted Holt

    Imagine needing to delete a large number–50, 100, 1,000–device descriptions, all of which begin with the same group of characters, from your system. Now imagine the Delete Device Description (DLTDEVD) command not accepting a generic device name. That got ugly quickly, didn’t it? And yet that sort of thing is what programmers often force end users to do. Maybe we need to add generic processing to our applications.

    I have written about generic names before. (See Related Stories at the end of this article.) But I have not written about using generic values in the context of application development.

    Suppose

    …

    Read more
  • Boolean Variables: Underused and Unappreciated

    May 16, 2012 Ted Holt

    Boolean variables can have only two values: true and false. In CL, they are known as logical variables. In RPG, they’re called indicator variables. They’re not essential; I got by without them for years. But they are useful. Let’s take a closer look at Boolean variables.

    Let me share a story with you. Some years ago, a certain factory started faxing requirements reports to their suppliers. The suppliers liked the reports, but some of them asked if they might receive the requirements electronically in a spreadsheet format. The IT department added a one-digit code to the database.

    • 1=send by
    …

    Read more
  • Admin Alert: Prepping For And Responding To An Unheard Of IBM i #FAIL

    May 9, 2012 Joe Hertvik

    In the past six months, I’ve had three occasions where two of the six IBM i partitions I manage have needed emergency IPLs to restart their systems. This is unusual for an IBM i installation and it got me thinking what could have been done to avoid the issue and how I could have reacted better after the issue occurred. This article summarizes what I’ve learned from these experiences.

    This Ain’t Windows, You Know

    These emergency situations occurred on a Power 720 i 6.1 partition (one emergency) and a Power 6 550 partition (two emergencies). While it’s not as unusual

    …

    Read more
  • The Proper Way To Deallocate A Pointer

    May 9, 2012 Ted Holt

    Jerry Clower used to tell a story about attending a rattlesnake roundup. He said that people from the humane society were on hand to be sure that the rattlesnakes were killed properly. Mr. Clower remarked that he didn’t know that there was an improper way to kill a rattlesnake. Pointers can be like rattlesnakes, biting you when you don’t expect it. Do you know the proper way to kill a pointer?

    Use the %ALLOC function to allocate memory to a program. The system copies the address of the memory into a pointer variable.

    D SomePointer     s
    D SomeData        s            256a   
    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

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