• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • bsearch: Partial Key Searches and More

    February 22, 2012 Jon Paris

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

    In bsearch: A Better %LOOKUP, I mentioned that bsearch permits us to do a partial key lookup (i.e., a lookup that is based on just a portion of the search field). Since bsearch performs a binary search, it will not necessarily return the first matching element in the array. If we need to handle all matching elements then we have to be able to locate the first match in the array, and then process subsequent matching elements.

    Before we jump into the mechanics of how to do

    …

    Read more
  • Prompt Control Controls Parsimonious Command Prompting

    February 22, 2012 Ted Holt

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

    I like everything to be as simple as possible. Call me parsimonious, but I agree with my friend Cletus the Codeslinger, who says, “When something’s complicated, somebody’s trying to get your money.” One way to simplify CL command prompting is to show relevant parameters only. Here’s how that’s done.

    By default, prompting a CL command shows all parameters, even though some of them may not be applicable to what the user is trying to accomplish. The Prompt Control Definition (PMTCTL) keyword allows you to prompt for a parameter

    …

    Read more
  • Why Can’t I Access My Remote System’s AS/400 IFS?

    February 22, 2012 Hey, Joe

    I’m trying to create a QFileSvr.400 link between two of my IBM i machines. I created the link on my local machine just like I’m supposed to. But when I open the link to access AS/400 Integrated File System (AS/400 IFS) objects on my remote machine, it gives me a Not Authorized To Object error. What’s going on here?

    –Wil

    Background on QFileSvr.400

    Before I answer Wil’s question, here’s some background information on the QFileSvr.400 file system. If you’re already familiar with QFileSvr.400, skip ahead to the answers section.

    The QFileSvr.400 file system is a unique IBM i machine construct.

    …

    Read more
  • bsearch: A Better %LOOKUP

    February 8, 2012 Jon Paris

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

    In qsort: A Better SORTA, I described the use of the qsort API. This time, we’ll be looking at its companion API–bsearch–which, as its name suggests, is used to perform searches.

    Recent changes in array support in RPG, including V6.1’s abilities to define large arrays, means that I use bsearch less frequently than I used to. Nevertheless, the fact that I write the code that controls the matching still makes it useful. For example, I can code bsearch to search for a partial string, which is something

    …

    Read more
  • Using JSON and RPG To Create Interactive Web 2.0 Applications

    February 8, 2012 Alex Roytman

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

    In my last article, Meet JSON, I introduced you to the concept of JavaScript Object Notation and how it’s changing the way Web applications are being built. Let’s explore JSON syntax a little further by building a really simple customer inquiry Web application. The code can be downloaded here.

    This application consists of three simple parts:

    • CustInq.html–Simple HTML page to ask for customer number and present customer information
    • CUSTINQ.rpgle–RPG/CGI program to output customer information in JSON format
    • CustInq.js–JavaScript code to facilitate the communication between the RPG
    …

    Read more
  • Admin Alert: QSECOFR Security Problems I Have Known

    February 8, 2012 Joe Hertvik

    Handling the QSECOFR user profile is always problematic. On one hand, it’s essential for the smooth operation of your system. Conversely, it can be a major issue if someone discovers its password. This week, I’ll review some real-life QSECOFR security breaches I’ve encountered and what can be done if you encounter these situations in your shop.

    Real-Life QSECOFR Security Situations

    A lot of strange things can occur with QSECOFR usage. Here are some common situations I’ve run into over the years and what can be done, if you encounter them.

    1. Situation: Your IBM i administrator doesn’t change the QSECOFR

    …

    Read more
  • Limited Capabilities Workaround

    January 25, 2012 Patrick Botz

    Limited capabilities is a widely used security function of IBM i. User profiles have an attribute named limited capabilities or LMTCPB. CL commands have an attribute named allow limited capabilities users or ALWLMTUSR). CL commands set to ALWLMTUSR(*NO) cannot be run from a command line by user profiles set to LMTCPB(*YES). To be more precise, these commands cannot be run from a command line, the command-entry display, FTP, REXEC, the QCAPCMD API, or as an option from a command grouping menu.

    This is all well and good. Sometimes, however, you run into situations where a few user profiles, that should

    …

    Read more
  • qsort: A Better SORTA

    January 25, 2012 Jon Paris

    Over the past few years I’ve done quite a lot of PHP coding alongside my RPG work, and PHP’s extensive use of arrays has furthered my conviction that we RPGers just don’t use arrays nearly enough. There are many reasons for this, of course, one of which is RPG’s limited ability to sort and search arrays.

    Admittedly in recent releases the restrictions have been somewhat alleviated, but there are still many limitations. For example, take a look at the DS below:

    d customerData    ds                  Dim(1000) Qualified
    d  name                         30a
    d  address1                     40a
    d  address2                     40a
    d  city                         30a
    d  state                         
    …

    Read more
  • How Do I Export an iSeries Certificate File?

    January 25, 2012 Hey, Joe

    I’m trying to export one of my i5/OS digital certificates into a PC file for server installation. Every time I try the export function, I get the message: An error occurred while opening files to write. What’s going on and how can I export the certificate to a file? I’m running i5/OS V5R4M5.

    –Abe

    It could be the way you’re trying to export the file. Here’s how I’ve successfully downloaded digital certificates in the past, and where I’ve hit that particular message. Maybe this technique will help you export your certificate.

    1. Start the IBM Web Administration for i

    …

    Read more
  • New in DB2 for i 7.1: Use Global Variables to Track Environment Settings

    January 11, 2012 Michael Sansoterra

    The concept of having a locally maintained application “scratch pad” to keep track of session specific information has been around for quite awhile. RPG applications have long used the LDA (Local Data Area) to track common information meant to be shared between programs within a job. (This saves developers the trouble of passing around all of this common information as parameters.)

    Likewise, many operating systems have the concept of an environment variable, which is similarly used to maintain and publish many OS-defined and user-defined values. Under IBM i 7.1, SQL offers something called a global variable, which can be

    …

    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