• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Remove Blank Lines from a Stream File

    October 4, 2006 Hey, Ted

    Working with IFS files, especially those we get from other systems, greatly increases my appreciation of physical files. Opening a stream file is like opening a Christmas present–we never know what we’ll get. Anyway, one source typically sends us stream files that often have blank lines in them, which messes up our process. Is there any way to delete those blank lines?

    –Ray

    Well, Ray, I don’t know of a way to delete them, but if you’re willing to copy the stream file to another stream file and omit the blank lines in the process, you can take advantage of

    …

    Read more
  • Admin Alert: Changing Physical File Characteristics on the Fly

    October 4, 2006 Joe Hertvik

    Many people don’t realize that they can use the Change Physical File command to alter the field and key definitions of a physical file without having to recompile that file or to save and restore their data. This command can enlarge or shrink existing file fields, add new fields, delete old fields, or change file keys. This week, I’ll explore this hidden feature of CHGPF, and discuss its advantages and its disadvantages.

    Why We CHGPF

    The Change Physical File (CHGPF) command’s life purpose is to change the attributes of a physical file and all its members. The Change Physical File

    …

    Read more
  • Copy a Subset of Records from One System to Another

    September 27, 2006 Ted Holt

    Recently, I needed an easy way to refresh a development system with a subset of records from a file on a production system. I needed a method that I could run unattended, during off hours. FTP, the Save-Restore commands, and the third-party file transfer utilities available to me are good tools, but they have their drawbacks. All of them require me to transfer complete files, even if I only want to transfer a subset of records. And it is difficult to determine whether FTP succeeds or fails in a batch job. I found an easy way to accomplish my

    …

    Read more
  • Stuffing Five Digits Into Four

    September 27, 2006 Ted Holt

    How do you stuff five digits into a four-digit database field? I found out recently that it can be done. Suppose you have a database file with a four-digit binary field.

    A          R REC                
    A            FIELD4         4B  
    

    If you use the Display File Field Description (DSPFFD) command to view the record layout of the file, you will find that FIELD4 occupies two bytes of storage. Two bytes can hold values from -32,768 to 32,767. (For more about why this is so, see When a 10-Digit Variable Won’t Hold a 10-Digit Number.

    If you use traditional I/O to try to

    …

    Read more
  • Admin Alert: Setting the Record Straight on iSeries Access and ODBC Freeware

    September 27, 2006 Joe Hertvik

    In a weekly column, important points can easily get muddied in the writing, which sometimes leads to incorrect information. This week, I am going to correct some previous mistakes I made while writing about IBM‘s iSeries Access for Windows product and about an ODBC freeware product. Mistakes can become opportunities when they help you question conventional wisdom, and a mistake can also highlight a better way of doing things.

    So please join me while I eat some crow washed down by a nice bottle of Chianti and some fava beans, as I tell you where I went wrong and

    …

    Read more
  • Redirecting a List of Qshell Commands

    September 20, 2006 Hey, Ted

    I need a little help with a Qshell script. I retrieve a list of IFS files that have a certain extension (a suffix precede by a period) and pipe the list into another process. Now I have to also include other files that have a completely different extension. I do not want to run the command twice, processing each type of file in turn. How do I redirect the output of more than one command into one output stream?

    –Brad

    OK, let’s set up the problem for the benefit of the readers. Suppose Brad’s script currently processes files with the

    …

    Read more
  • Include Comments in Query/400 Queries

    September 20, 2006 Hey, Ted

    OK, I’ll bite. In your article Query/400 Handles Zero Dates (Sort Of), from Four Hundred Guru Volume 6, Number 25, you said, “This is one way to include comments in a query.” Does that mean there are other ways I can include comments in queries?

    –Paul

    I know of one other way to comment result fields other than the one I used in that example. First, let’s review that method. Here’s the first result field in that article.

    Field       Expression                 Column Heading        Len   Dec
    SDNOT0      shipdt/(shipdt-0.0000001)  0=Ship date is zero     1     0
                                           1=ship date is not             
                                           zero                           
    

    In this

    …

    Read more
  • Admin Alert: Dissecting the Unusual QLGPGCMA.LOCALE Error

    September 20, 2006 Joe Hertvik

    One of my i5/OS partitions went haywire recently. Suddenly, some users couldn’t run Infor‘s SSA ERP LX package, an i5 Domino server wouldn’t reboot, and some users couldn’t sign on. These problems occurred because of an authority problem involving an i5 object named QLGPGCMA. This situation is commonly referenced on the Internet, but there isn’t much information about its cause. The good news is that once the problem is diagnosed, it’s fairly easy to cure.

    Diagnosing the Problem

    The QLGPGCMA.LOCALE problem is very simple. When it occurs, some of your once reliable applications and i5/OS features may simply stop

    …

    Read more
  • Developers Don’t Despair: Virtualize Your PC

    September 13, 2006 Michael Sansoterra

    Today’s developers often wear many hats: programmer, operator, help desk, and database administrator. Furthermore, they often support software on many operating systems (various versions of Windows, Linux, Unix, and so forth) with various versions of application software (Microsoft Office 97 or 2003, ERP clients, and so on) using a variety of developer tools (Visual Studio, Visual Studio .NET, Websphere Development Studio Client, Delphi, and others).

    It can be quite overwhelming for companies with small budgets to create testing and development environments for such a wide array of software. Fortunately, there is a way to deal with this type of

    …

    Read more
  • Unusual But Logical SQL Sorting

    September 13, 2006 Hey, Ted

    A physical file that I’ve loaded with data from another system has a department field that I would like to use for sorting. The department field contains a description, rather than a code. I need to sort the data on the description, but not in alphabetical order. That is, I want a certain department to appear first, then a certain department to appear next, and so on. The only way I know to pull this off is to create a little table that lists the departments and the order each one appears in the sort, but I do not like

    …

    Read more

Previous Articles Next Articles

Content archive

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

Recent Posts

  • Power11 Entry Machines: The Power S1124 And Power L1124
  • BRMS Isn’t The Only Backup Product With A Security Problem
  • Guru: A Faster Way To Sign A JWT
  • Maxis Adds IBM i Support To Database Modernization Tool
  • IBM i PTF Guide, Volume 27, Number 28
  • To Comfort The Afflicted And Afflict The Comfortable
  • How FalconStor Is Reinventing Itself, And Why IBM Noticed
  • Guru: When Procedure Driven RPG Really Works
  • Vendors Fill In The Gaps With IBM’s New MFA Solution
  • IBM i PTF Guide, Volume 27, Number 27

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