• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Bypassing a Locked Record, Take Two

    January 7, 2009 Hey, Ted

    I have a slightly different solution to the locked record problem your friends tackled in Bypassing a Locked Record. Like them, I have RPG programs that sequentially read a file and update some of the records. When a program tries to read a record that another job has locked, I sometimes bypass the locked record. Here’s how.

    Notice the READ operation in the second calculation of this example:

    FSomeFile  UF   E           K Disk    Prefix(SR_)
                                                     
    D Forever         S               N   inz(*On)   
    D Open            C                   Const(' ') 
    D Closed          C                   Const('Z') 
                                                     
     /Free                                           
         DoW Forever;                                
             Read(E) SomeRec;                        
             If %Eof(SomeFile);                      
                 Leave;                              
             EndIf;                                  
             If %Error();                            
                 
    …

    Read more
  • Be Specific When Updating With SQL Cursors

    January 7, 2009 Ted Holt

    To update a table (physical file) through an SQL cursor, use the FOR UPDATE OF clause in your UPDATE command. (I have written about FOR UPDATE OF before.) When you update through an SQL cursor, avoid two mistakes that can cause a performance problem.

    First, don’t forget to include FOR UPDATE OF. The SQL preprocessor does not require you to include this clause, and will not generate a message to warn you of its omission. If you do not specify FOR UPDATE OF, SQL assumes that you want to update all columns (fields).

    Second, list only the columns that

    …

    Read more
  • Admin Alert: Looking for i5/OS Trouble, Part I

    January 7, 2009 Joe Hertvik

    I love stories with Cassandra characters, the slightly crazed player who accurately foresees oncoming doom, only to be mocked or ignored. Like Cassandra, i5/OS systems can also see events that portend system problems, clear omens that can easily be missed or ignored. This week and next, I’ll discuss avoiding doom by monitoring several i5/OS situations that should be checked early and often. Ignore these warning at your own peril!!!

    Finding Doom On Your Local i Partition

    Omen hunting on iSeries, System i, and Power i machines is a lot easier if you know where to look. I’ve generally found the

    …

    Read more

Content archive

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

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

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