Link to home
Start Free TrialLog in
Avatar of leonardovivarayora
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
Avatar of daveslater
daveslater
Flag of United States of America image

Hi
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
Avatar of leonardovivarayora
leonardovivarayora

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.
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Gary_The_IT_Pro

Gary Patterson, Thanks a lot for you help, very clear explanation.
Happy to help.