|
Introduction
PFNDBADLF finds ISeries (AS/400, AS400) database logical files
that are based over ISeries database physical file(s) in a different library.
For example a logical file CUSTL1 in library TESTDB that is based over a
physical file CUSTPF in library LIVEDB. This is one of the commands in our
ISeries
utilities library (click this URL for full contact and pricing
details).
Normally a logical file should reside in the same library as the
physical file/files on which the logical file is based. For example a logical
file CUSTL1 in library TESTDB should be based on physical file(s) only in the
same TESTDB library. If the physical/logical files are in different libraries,
this can cause problems with save/restore operations, so most ISeries users
avoid this situation. If the physical/logical files are in different libraries,
this is most often due to an incorrect library list setting when the logical
file was created (using the CRTLF command) or when objects were duplicated
using the CRTDUPOBJ command.
PFNDBADLF identifies only logical files where this discrepancy
exists. It ignores completely all files where both physical and logical file
are in the same library. It does not adjust or update any files. It simply
reports discrepancies via messages to your user profile message queue. If you
decide the logical file is indeed in error, your typical response is to delete
it and recreate it (DLTF/CRTLF) so that it is based over the correct physical
file(s). |
|
Examples
PFNDBADLF LIB(TESTDB)
Command above tests to see if any physical file in the TESTDB
library has a based-on logical file that exists in any library other than
TESTDB.
PFNDBADLF LIB(*USRLIBL)
Command above tests to see if any physical file in the user
portion of the library list of your current job has a based-on logical file
that exists in a different library to the one where the physical file
exists.
PFNDBADLF LIB(*ALLUSR)
Command above tests to see if any physical file in all 'user'
libraries has a based-on logical file that exists in a different library to the
one where the physical file exists. |
|
Restrictions
| 1) |
The parameter library/libraries are scanned for physical
files that have a based-on logical file in a different library. The logical
files in the parameter library/libraries are *not* checked. So for example if a
logical file TESTDB/CUSTL1 is based on LIVEDB/CUSTPF, then PFNDBADLF
LIB(LIVEDB) will identify the problem logical file, but PFNDBADLF LIB(TESTDB)
will not. To find all possible bad logical files, you need to run PFNDBADLF
over all libraries where you suspect a problem - or run
PFNDBADLF(*ALLUSR). |
| 2) |
Performance for the PFNDBADLF command is good, but it may
still take some time to run if you are testing lots of libraries and/or files.
So you may want to run the command in batch. |
| 3) |
You can see the 'User' libraries for the PFNDBADLF
LIB(*ALLUSR) option by looking at help text for the DSPLIB LIB(*ALLUSR) command
(prompt the command then press F1). If you want to run PFNDBADLF for other
'System' libraries, you need to do this one library at a time. |
| 4) |
If PFNDBADLF reports bad logical files in IBM-supplied
libraries, you should only change them if you know exactly what you are doing
(they are frequently not an error). |
|
IBM rebranded the AS/400 - some users called it AS400 - to
ISeries several years ago. All 3 names - ISeries, AS/400, AS400 - refer to
exactly the same system. |