• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Alternate SQL Row-Selection Criteria, Take 3

    January 11, 2006 Ted Holt

    Two previous issues of this newsletter have presented ways to put two or more record-selection alternatives into one SQL query. I use these techniques often because they reduce or eliminate the need to clone programs. I recently learned another way to implement alternate record-selection criteria and would like to share it with you today.

    Let’s begin with an example table of people.

    create table mylib/people
      ( FirstName char(12),
        LastName  char(12),
        Street    char(20),
        City      char(16))
    

    Here’s the data I placed into my copy of the PEOPLE table.

    FIRSTNAME LASTNAME    STREET            CITY
    ========= =========== ================= ============
    Smith     Whiteside   451 Elom Street   Lost 
    …

    Read more
  • Indicate Negative Numbers with Parentheses

    January 11, 2006 Hey, Ted

    Thank you for a newsletter with information that is always interesting and useful. I enjoyed reading about your IIF function. Here is a function I wrote a few years back on V5R1. It returns a numeric value edited for displaying or printing that includes parenthesis when the value is negative. Our accountants prefer that negative numbers appear within parenthesis. The value returned contains two decimals, as this function is primarily used for monetary amounts.

    –Glenn T. Berg, programmer/analyst

    It was good of Glenn to share his EditParens function with the rest of us. I don’t blame the bean counters

    …

    Read more
  • Admin Alert: Limiting *PUBLIC Access to i5/OS Objects, Part 2

    January 11, 2006 Joe Hertvik

    In last week’s column, I discussed how the default security settings in i5/OS allow *PUBLIC users to automatically modify data and run programs on an i5, iSeries, or AS/400 machine. Left unchanged, these settings can undermine system security and expose sensitive data and programs to unwanted access. This week, I’ll look at some of the cures for this problem and their potential pitfalls.

    Recapping the problem, the i5/OS operating system–by default–automatically sets *PUBLIC authority for new libraries and most objects created in them to *CHANGE, according to the following sequence.

    1. i5/OS comes shipped with a Create default public authority system
    …

    Read more
  • Properly Placed Procedures

    January 4, 2006 Hey, Ted

    I like your IIF function. As you stated, it would be nice to replace five lines of code with one. However, I don’t want to include all the subprocedure code in every program that uses IIF. Can you give instructions on how to make this a real function or service program?

    –Armando

    There’s nothing unfair about Armando’s request. When I wrote the article to which he refers, I focused on the function itself rather than how to implement it. I hear quite often from readers who want to use subprocedures, but they aren’t sure how to get started. Since

    …

    Read more
  • V5R3 SQL Insert Improvement

    January 4, 2006 Ted Holt

    SQL’s INSERT command adds records to a table (physical file) or view (logical file). There are three forms of INSERT. The VALUES form allows you to create a record from constants. For example, assume a table PLANT with two columns (fields)–ID and NAME.

    create table qtemp/Plants
      (ID   char(4),         
       Name char(12))
    

    To create rows (records) for two factories, you could use two insert commands.

    insert into qtemp/plants values('1492', 'Lost Angeles')
    insert into qtemp/plants values('2001', 'New Yolk')
    

    In V5R3, IBM enhanced the VALUES form of INSERT to permit you to insert more than one row at a time. The following INSERT command

    …

    Read more
  • Admin Alert: Limiting *PUBLIC Access to i5/OS Objects, Part 1

    January 4, 2006 Joe Hertvik

    i5, iSeries, and AS/400 machines have always featured best-in-class security. But that security doesn’t mean much if users can add, update, and delete records at will or if a user can execute a program he should be restricted from running. To prevent these kinds of security violations, it’s worth examining how i5/OS provides default library and object access to public users (*PUBLIC) and the problems those defaults present. These problems include undermining system security and the risk of exposing sensitive data and programs to unwanted access.

    Note: This article is the first in a two-part series describing how i5/OS and

    …

    Read more

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