PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Retrieving objects after an abnormal termination

View previous topic View next topic Go down

Retrieving objects after an abnormal termination

Post  maran on Sun Jun 30, 2013 12:26 am

How to recover damaged objects or error after an abnormal shutdown of an IBM i (AS/400)?

On IBM i (AS/400), as on all computers, a crash (due to a power failure, for example) can cause problems.

First, the consistency of the database can be corrupted. Information in main memory (modified, eg recordings) are permanently lost.  Only data verification during treatment with applications and / or a detailed analysis of files to verify this consistency.
Then, at the system level, some objects may be unusable or in poor condition. The purpose of this article is to give you some avenues to explore to find these objects and possibly fix the problems.

How to find out the damaged items

The list of damaged items can be generated using the command DSPOBJD (See the description of one or more objects). The result should be returned to a file (OUTFILE parameter).

For example to find the damaged objects in the library PMS, the following command will do:

DSPOBJD OBJ(PMS/*ALL) OBJTYPE(*ALL) OUTPUT(*OUTFILE) OUTFILE(PMS/BADOBJ)

In the above  example shown , all objects in the library PMS are analyzed. The result is returned in the BADOBJ file in the library PMS.  If you do not know where the objects are in error, you can run the command on all objects in all libraries. The processing time can be quite long, it might be interesting to run in batch.
In the SQL command line then type the following SQL statement to list the damaged objects.

A value of 0 means that all is well, otherwise there is a problem with this item. To identify only the damaged type objects:
SELECT ODLBNM, ODOBNM, ODOBDM FROM PMS/ BADOBJ  WHERE ODOBDM <> 0

Note that this method is not foolproof, and it can happen, for complex objects, as they appear healthy in DSPOBJD and when they get a message indicating that they are damaged!

What to do with the objects identified as damaged?
It depends on the damage to the object. In some cases, you can try to save it, to destroy it and restore it. Or recreate it if possible (for a program, for example) ... In any case, read the error messages that provide valuable information.
If you are unable to destroy, you have the RCLSTG command. This command acts on all objects in the ASP. It ca,t be launched in restricted mode.

After an abnormal termination, some paths must be rebuilt. The EDTRBDAP command lists the files involved and the reconstruction time estimated for each file (if the list is empty is that there are no problems with the paths). * The value in the OPEN option column indicates that the path should be rebuilt at the beginning of the file. We need to force this condition by putting a value between 1 and 99 in the option column. Confirm twice paths will then be reconstructed directly based on the priorities you have set (one higher priority than 99).
By running this command you will see progress.
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum