• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Releasing File Member Locks With QSH

    April 22, 2009 Tom Van Looy

    Sometimes our users just keep their sessions open when they go home. At times, such as when we need to install software updates, this is a problem.

    It is possible to write a CL that cleans up the file/member locks without getting too complicated? You’ll be happy to know it is. Unix to the rescue! All you need is to quickly hack together a small nine-line QSH shell script to do the job.

    See this example file named unlock that lives in my /home/tvl directory on the IFS:

    for file in $@; do
    system "WRKOBJLCK OBJ($file) OBJTYPE(*FILE) 
    MBR(*ALL)" 2>/dev/null | 
    …

    Read more
  • Trouble-Shooting i5/OS Printer Problems in a Warehouse Environment

    April 22, 2009 Hey, Joe

    We have four IBM 6400 printers that produce pick tickets and labels. The printers are connected via SNA to a Perle 594e controller attached to our i5/OS box. Today, all the printers are freaking out. They start printing a pick ticket and then print garbage. Then they disconnect and I have to restart their printer devices. I have 1,000 tickets to print for tomorrow’s production. What’s happening?

    –Jim

    I contacted Jim and he gave me a few additional pieces of information that weren’t included in his original email. There had been a power brownout during the afternoon before the problem

    …

    Read more
  • A Bevy of BIFs: Dealing with a Bad Date

    April 15, 2009 Susan Gantner

    In an earlier tip, I talked about how %Date simplifies our logic by converting our “date” values stored in numeric or character fields into true dates. In that tip, I mentioned that using %Date could potentially result in an error message in the event your “date-like” fields contain an invalid date value, such as zero or blank or a month value of 25.

    Here I’ll cover how to avoid getting run time errors due to bad date values. Since many of the “date-like” fields we deal with in our applications come from screens, database fields, HTML or XML documents,

    …

    Read more
  • A Bevy of BIFs: %CHAR, %EDITC and %EDITW

    April 15, 2009 Jon Paris

    “I need to convert a numeric value into a character string. How do I . . . ?”

    This type of question is often asked by RPGers in these days of comma separated value files, XML documents, and Web pages (HTML). Generating such files has become a common requirement in the lives of RPGers. If they aren’t yet commonplace in your corner of the world, then they soon will be; if that doesn’t happen soon, maybe you should be concerned about the future of your favorite platform in your organization!

    So let’s start by taking a quick look at one

    …

    Read more
  • Admin Alert: And /QOpenSys and /QOpenSys and /QOpenSys and. . .

    April 15, 2009 Joe Hertvik

    Last month, I wrote about an i5/OS issue involving the AS/400 Integrated File System. When opening the /QOpenSys folder inside the AS/400 IFS, I found a second /QOpenSys entry. Opening that entry revealed another /QOpenSys folder, and then another, and another, until the trail ended 15 /QOpenSys entries later. I passed the problem on to the Admin Alert readership for research. This week I explain what they found.

    Reopening the Matryoshka Doll

    The issue, where one /QOpenSys entry is nested inside another like a Power i Matryoshka doll, is simple to explain. When opening the /QOpenSys file system

    …

    Read more
  • A Sleepy RPG Program

    April 1, 2009 Hey, Ted

    Does RPG have anything equivalent to CL’s Delay Job (DLYJOB) command? I am working on an RF application, and I need to code a delay of a few seconds into my program. Besides using a do loop with a final value of 1,000,000,000,000, how can I cause a timed interval within an RPG program?

    –David

    Thanks to the wonders of the Integrated Language Environment, RPG has a way to delay a job a specific number of seconds. It’s called sleep. Sleep requires one 4-byte unsigned integer parameter–the number of seconds to delay–which must be passed by value.

    Here’s an example:

    …

    Read more
  • Treasury of new DB2 6.1 (V6R1) Features, Part 5: New Functions and Change Stamp Columns

    April 1, 2009 Michael Sansoterra

    Today’s tip addresses the new built-in functions available in DB2 for i (a.k.a. DB2 for i5/OS, SQL/400, and DB2 UDB for iSeries), change stamp columns and row change expressions.

    ASCII and CHR Functions

    The ASCII and CHR functions are great additions to DB2 for i. The ASCII function will take the left most character of a string expression and return the ASCII character code equivalent. Take the following example:

    Select ASCII(' ') From SysIBM/SysDummy1
    

    This command will return a value of 32 (ASCII code for space) instead of the expected EBCDIC value of 64.

    The CHR (character) function behaves the

    …

    Read more
  • Admin Alert: Change Your Tape Drives, Change Your Tape Management Costs

    April 1, 2009 Joe Hertvik

    One shop I work with went through a tape drive revolution with two recent hardware purchases. They went from using several different tape drive formats to using one higher speed backup format for all locations. Here’s what they found out from the experience, and how a simple tape drive upgrade helped them lower their operational tape management costs.

    Before the Upgrade

    In late 2007, a mishmash of tape drive styles dominated this shop’s backup capabilities in the company’s data center. One System i 520 machine with two partitions (production and development) used two Ultrium LTO tape drives to back up

    …

    Read more
  • Treasury of new DB2 6.1 (V6R1) Features, Part 4: Index and Data Type Enhancements

    March 25, 2009 Michael Sansoterra

    So far in this series, we’ve covered how IBM has made life easier for DB2 for i (formerly called DB2/400 or DB2 UDB for iSeries) developers by:

    • Part 1: Cramming greater query functionality and operations into a single statement
    • Part 2: Providing an easy way to summarize data with super groups and grouping sets
    • Part 3: Giving developers options to implement audit tracking and other features useful in a client/server environment by implementing several new client special registers

    This tip will cover yet another valuable subset of features: new indexing and data type features.

    Building an Index

    …

    Read more
  • Looking for Commitment, Part 3

    March 25, 2009 Paul Tuohy

    In this article I will take a closer look at how commitment control works by looking at the journal entries for commitment control. I will also discuss the LCKLVL and CMTSCOPE parameters on the STRCMTCTL command.

    Commitment Control and Journals

    Commitment control is dependant upon the use of a journal. A journal is used in conjunction with commitment control as follows:

    • When you start commitment control (using the STRCMTCTL command), a commitment boundary entry is placed in the journal.
    • As a program inserts, updates, and deletes rows in a table, the rows are actually inserted, updated, and deleted, and the
    …

    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