leonardovivarayora
asked on
Broken logical files
I need to get a report of all logical files in my database db2 dds 400 version 5.4 that have broken the link with physical files. That is, a report of all logical files that are not synchronized with any physical file.
My server is a P525 with OS version 5.4. The database I use is the native DB2/400 DDS
My server is a P525 with OS version 5.4. The database I use is the native DB2/400 DDS
ASKER
Hi Davd
We did a migration from a as400 (810 V5R2) to another as400 (525 V5R4), and as we passed the physical and logical files, many of the logical files lost sync with your physical files, or broken the timing of certain logical files with their respective physical files. Currently I need to know what are the logical files that are not its link to physical files in a single library or in various libraries, because the files are storing logical and physical data are outdated.
We did a migration from a as400 (810 V5R2) to another as400 (525 V5R4), and as we passed the physical and logical files, many of the logical files lost sync with your physical files, or broken the timing of certain logical files with their respective physical files. Currently I need to know what are the logical files that are not its link to physical files in a single library or in various libraries, because the files are storing logical and physical data are outdated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Currently I need to know what are the logical files that are not its link to physical files in a single library or in various libraries, because the files are storing logical and physical data are outdated.
It's not clear what you actually need.
Dave's suggestions are a good start. The DSPFD command will build a database file that shows the relationship between all logical files and the physical files that they point to. And the SQL SELECT will give you a list of all of the logical files that point to physical files in other libraries.
Now, if that covers your problem, it should be everything you asked for. But if you need more than that, we might need more information.
One kind of information could be a description of one logical file that suffers from the problem. If you told us about one of the files that is wrong, we might be able to tell you how to fix it.
Tom
It's not clear what you actually need.
Dave's suggestions are a good start. The DSPFD command will build a database file that shows the relationship between all logical files and the physical files that they point to. And the SQL SELECT will give you a list of all of the logical files that point to physical files in other libraries.
Now, if that covers your problem, it should be everything you asked for. But if you need more than that, we might need more information.
One kind of information could be a description of one logical file that suffers from the problem. If you told us about one of the files that is wrong, we might be able to tell you how to fix it.
Tom
ASKER
Gary_The_IT_Pro
Gary Patterson, Thanks a lot for you help, very clear explanation.
Gary Patterson, Thanks a lot for you help, very clear explanation.
Happy to help.
Be definition a logical file has an attached physical file.
I am bussing that what you are after is a list of logical files where the library is different from the physical file
You cal list files by
DSPFD FILE(*ALLUSR/*ALL) TYPE(*ACCPTH) OUTPUT(*OUTFILE) OUTFILE(QTEMP/DBR)
The start sql
Strsql
SELECT * FROM QTEMP/DBR WHERE APBOF <> ' ' and APLIB <> APBOL
Davd