evel1959
asked on
How do I find all files locked in a specified set of libraries, to ensure my backups run?
I am trying to determine how I can obtain a quick report of all files locked in a specific set of libraries. The reason I need this is that I never know util after my backup runs whether or not there is a lock on a file. Once the backup is complete, then it's a major issue in some cases to backup only the files that were missed because of file locks. I have been supporting this AS400 for 6 years and I know enough to keep it running, but am in no way a guru and have not had any significant training on all the commands and how to use them. It just seems to me that there should be a way to do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Tom is right, of course:
ALCOBJ is a better solution than CHKOBJ in many cases:
CHKOBJ checks to see if RIGHT AT THAT SECOND a lock exists.
ALCOBJ actually grabs a lock of the type that you specify on an object, and holds it until you either explicitly release the lock using the DLCOBJ command, or until the job allocating the object ends.
- Gary Patterson
ALCOBJ is a better solution than CHKOBJ in many cases:
CHKOBJ checks to see if RIGHT AT THAT SECOND a lock exists.
ALCOBJ actually grabs a lock of the type that you specify on an object, and holds it until you either explicitly release the lock using the DLCOBJ command, or until the job allocating the object ends.
- Gary Patterson
ALCOBJ also nowadays has the CONFLICT() parameter which can be of real use in situations like this thread.
Tom
Tom
ASKER