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
The CL Reference Guide (SC21-9778-2) states on page V4-343 the following about the OVRDBF command:
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.