• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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
  • 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
  • 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
  • OLAP Is Simple, Once You Understand It

    May 9, 2012 Hey, Ted

    I have a problem that I solved with a simple RPG program, but I know it can be done with SQL as well. I needed to generate a simple table of employee ID, name, and average of the last five weeks paychecks. Is this simple or complicated to do with SQL?

    –Barry

    You are correct that SQL can do the calculation, Barry. However, you’ll have to decide for yourself if it’s simple or complicated.

    First, let’s get some data to work with. I’m going to simplify your question slightly by using a name only, without an ID, to identify an

    …

    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
  • 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
  • CL Error-Handling With APIs

    May 2, 2012 Ted Holt

    Note: The code accompanying this article is available for download here.

    I had the great pleasure of meeting Brian Rusch in Milwaukee last month, when I spoke to the Wisconsin Midrange Computer Professionals Association (WMCPA). Brian told me about the method his shop uses to handle CL program exceptions. I’d like to share it with you.

    IBM has established an architecture for exception handling. When a program exception occurs, the system may send one or more diagnostic messages that give information about the error. The system does send an escape message, which summarizes the problem and cancels the program.

    …

    Read more
  • How Do I Format Date Literals? Let Me Count The Ways

    May 2, 2012 Hey, Ted

    I have a strange SQL problem. I have an SQL DELETE command that works perfectly in interactive SQL. But when I use Run SQL Statement (RUNSQLSTM) to execute it, it does not find any rows to delete.

    –Jabir

    Strange, indeed. I gave Jabir some suggestions, but none of them helped. Jabir found his problem himself. In one of those environments (he didn’t say which), the date format was *MDY, while the date format of the other one was *DMY. SQL was interpreting a date value in two different ways. It’s fortunate that Jabir did not test with a date that

    …

    Read more
  • Admin Alert: Secrets Of The IBM i IPL Parameters

    May 2, 2012 Joe Hertvik

    IBM i operating systems contain a number of attributes that are used to control IPL processing when you start or restart a partition. Some attributes (such as Start To Restricted State) are well-known, while others are seldom looked at. This week, let’s take a look at your system’s IPL attributes and how they can help you perform specific functions on your system.

    Viewing And Changing Your IPL Parameters

    You can view and change your IPL parameters by typing in the Change IPL Attributes (CHGIPLA) command from a 5250 green screen and pressing the F4 key. When you do this, you’ll

    …

    Read more
  • NOMAX? No Way!

    April 25, 2012 Hey, Ted

    I just read *NOMAX Does Not Mean Infinite Capacity and I politely beg to differ. I work at some shops with smaller and older systems with smaller disk capacity (70 GB, 140 GB). Some are already using more than 70 percent of available space. If I read the capacities correctly, a physical file can hold over four billion records. I did some calculations and I think I’d fill up a system before reaching capacity.

    For DDS-described files, I usually set some maximum number of records, as 10,000 seems ridiculously low. Now that you have mentioned SQL described tables, which I

    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

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