Gotcha: Overriding Database Files

CL
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Overriding Database Files

I miscoded an OVRDBF command attempting to read four members in one file and consolidate them into a new file for purposes beyond the scope of this discussion. I botched the file name by reversing two characters. This caused the override to be for a nonexistent file. No warning! The system just defaulted to the first member in the file coded in my program and read that member for as many times as the program was called. In my case, four times with the four OVRDBFs with typos (coded the first one and duplicated it, of course). So we got to read the first member four times without any clue from the system until we examined the output. Seems like there should be some sort of warning?

- Bill Tooker

Editor's Note:

The CL Reference Guide (SC21-9778-2) states on page V4-343 the following about the OVRDBF command:

Required Parameters

FILE

Specifies the name of the file in the using program to which this override command is applied. The specified file must be a database file when *FILE is specified on the TOFILE parameter our italics . Otherwise, any device file or database file name can be specified.

Notice that if TOFILE(*FILE) is specified, the name entered in the FILE parameter must be a database file. We tested the matter and repeated Bill Tooker's experience: the system allows overrides on nonexistent files where, according to the manual, it should not.

And if you think this is of no consequence, imagine a corporation having the Accounts Payable file broken up in members, one member per division. All is well until they decide to print vendor checks. The vendors of the first division receive their checks (or possibly repeated checks) with no problem, but the vendors for all other divisions receive nothing. Vendors will then call when their invoices are not paid, which may jeopardize the credit standing of the corporation and its divisions. All that because of a typographical error that anyone could make, which could have been spotted by the system in a fraction of a second.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: