• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • A Chicken-and-Egg Trigger Problem

    February 25, 2004 Hey, Ted

    Say I have two physical files: A and B. File A has an insert trigger program (written in RPG IV) that adds new records to B. That is, when someone adds a row to A, the trigger adds a row to B. What would happen if a program read B and added new rows to A?

    insert into A (TransID, AnotherValue, Amount)
      select (TransID, AnotherValue, (0 - Amount) from B
         where substr(TransID,1,1) = 'T'
    

    The intention is to zero-out the balances of all transaction IDs that begin with the letter T. That is, the sum of all records with a

    …

    Read more
  • OS/400 Alert: Security Starts At Home

    February 25, 2004 Shannon O'Donnell

    Everyone talks about security, but how many do anything about it? If you are looking for tools that will help you get a handle on the various security holes and vulnerabilities on your PC and AS/400, this issue of “OS/400 Alert” is for you. I’ll cover several tools that you can download and use to make your PC and AS/400 as secure as they can be.

    MICROSOFT BASELINE SECURITY ANALYZER

    Are you overwhelmed by the number of viruses and security holes spreading on the Web on a daily basis? Do you fear that you may not be able to keep

    …

    Read more
  • iSeries Navigator: A World of Wizards

    February 18, 2004 Shannon O'Donnell

    When learning to do something, whether programming on a computer or playing a song on the banjo, it is always easier when you have someone standing by to teach you all those little tricks and tips that make the task easier. When it is not possible to have such an expert on hand, the next best thing is to have a tool that can teach you. In iSeries Navigator, the experts are wizards.

    A wizard is a piece of software or a program that was written to guide users through completing a task, usually by using a straight-forward, logical sequence

    …

    Read more
  • A Super Way to Display a Date

    February 18, 2004 Hey, Ted

    Here’s a subprocedure I wrote that you might want to publish in your newsletter. My routine uses the ILE CEE APIs to format a date as day of week, month name, day, and year, like this:

    Wednesday, February 18, 2004
    

    I use the CEEDAYS API to convert a date to Lilian date format, which is the number of days elapsed since October 14, 1582. Then I use the CEEDATE API to format the Lilian date into a character string. In the case of an error (for example, a date before October 14, 1582), I return the ISO character representation of

    …

    Read more
  • Short Circuit Evaluation

    February 18, 2004 Hey, Ted

    Here’s a simplification of the code for subprocedure EqAnyNum, which you published on January 28. I was able to shorten the code because of a feature called short circuit evaluation, which is explained in chapter 21 of the V5R2 RPG IV reference.

    –Mel

    Thanks to Mel for bringing short circuit evaluation to my attention. Here’s Mel’s code.

    C/free                                    
         if %parms >= 2 and BaseVal = Val01 or
            %parms >= 3 and BaseVal = Val02 or
            %parms >= 4 and BaseVal = Val03 or
            %parms >= 5 and BaseVal = Val04 or
            %parms >= 6 and BaseVal = Val05 
    …

    Read more
  • OS/400 Alert: Creating a Private Subsystem

    February 18, 2004 Joe Hertvik

    By default, OS/400 comes with one interactive subsystem called QINTER, which is where all 5250 green-screen jobs run. For most scenarios, this is adequate, but many times you may want to segregate interactive work into different subsystems.

    For the purpose of security, you could limit the time of day or days that certain users can sign on. If you have consultants who are authorized to use your system only during working hours, you could segregate their workstations into their own private interactive subsystem and shut down that subsystem during off-hours.

    For maintenance purposes, you could create a separate subsystem for

    …

    Read more
  • OS/400 Alert: Virus Targets AIM

    February 18, 2004 Shannon O'Donnell

    Do you use the AOL Instant Messenger program to communicate with your friends and coworkers? If you do, you might become the recipient of a new virus that’s spread through the program. In this issue of “OS/400 Alert,” I’ll give you the lowdown on this sneaky new virus. I’ll also tell you about several other viruses and updates that you should be aware of.

    AIM BECOMES TARGET OF SNEAKY VIRUS

    If you use AOL Instant Messenger, you may become the target of new virus-like software attacking AIM users. I say virus-like because it is not truly a virus. Virus

    …

    Read more
  • What You Should Know About Activation Groups

    February 11, 2004 Joel Cochran

    In the last several articles we began dipping our toes into the ILE waters by learning about service programs, binder source, and binding directories. You should now have a firm grasp of these building blocks and be ready to start constructing an ILE application. But before plowing ahead, we need to examine the most frustrating and least understood aspect of ILE: activation groups.

    WHAT IS AN ACTIVATION GROUP?

    I like to think of an activation group as a container for memory and other resources. According to the ILE Concepts manual (PDF format), this container is considered a “substructure of

    …

    Read more
  • Soft-Coded Report Distribution

    February 11, 2004 Bruce Guetzkow

    [The code for this article is available for download.]

    Printer files let programmers separate one type of output from program processing. When a printer file is created, several attributes can be specified (like output queue, copies) to simplify report routing instructions. But over time things change. You may, for instance, need to send reports to a different output queue or change the number of copies. The typical response is to update the affected printer files, provided you have the authority. This article presents an alternative: soft-coded report distribution.

    Soft-coded report distribution lets you change printer file attributes

    …

    Read more
  • Dealing with Divided Date Fields

    February 11, 2004 Hey, Ted

    Some of our ancient database files have separate fields for year, month, and day parts of a date. Combining separate fields to form single date fields is manageable but messy. Building logical files to combine the fields is not always practical, although we have done some of that. When digging around on Google one day, I accidentally discovered an SQL function that is well-suited for divided date fields.

    The function I discovered is called DateSerial. It is a part of various software products, including Microsoft Access and various versions of Visual Basic. It requires three arguments: year, month, and day.

    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • 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
  • 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

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