After our disk crashed and we had to restore all our software from backups, I decided to use the user tools that were shipped with V2R1 of OS/400 to check our system for damaged objects. To my dismay, I had 24 pages of damaged objects listed (the program took about 8 hours to run). After many hours of working on getting a clean report and getting IBM Level 2 help, I discovered the answer was simple. The user tool CHKOBJDMG uses the command SAVOBJ to save the library objects to a save file. An object that has type *DOC, *FLR, *PRDLOD or *PRDDFN will not work with the command SAVOBJ because it will say it's an invalid type.
I easily changed the program TAALIBFC in source member QUSRTOOL/QATTCL to use the command SAVLIB when the object type is one of the above types, instead of SAVOBJ. Also, I added the system libraries QDOC, QRECOVERY, QRPLOBJ, QSPL, QSRV and QTEMP to the libraries that it can't check (it already skips QSYS). Now I have a clean report. 1 shows TAALIBFC with my additions highlighted.
I easily changed the program TAALIBFC in source member QUSRTOOL/QATTCL to use the command SAVLIB when the object type is one of the above types, instead of SAVOBJ. Also, I added the system libraries QDOC, QRECOVERY, QRPLOBJ, QSPL, QSRV and QTEMP to the libraries that it can't check (it already skips QSYS). Now I have a clean report. Figure 1 shows TAALIBFC with my additions highlighted.
Editor's Note: We like to test what we publish, but this contribution presented a problem. Our system has no damaged objects, and we don't know of a way to damage an object intentionally. Therefore we trust the author's word that the technique presented here works.
TechTalk: Quick Fix for CHKOBJDMG
Figure 1 Fragment of program TAALIBFC
Figure 1: Fragment of Program TAALIBFC LOOP: RCVF MONMSG MSGID(CPF0864) EXEC(GOTO EOF) /* CAN'T CHECK SYSTEM LIBRARIES QDOC, QRECOVERY, + QRPLOBJ, QSPL, QSRV AND QTEMP */ IF COND(&ODLBNM *EQ 'QDOC' *OR + &ODLBNM *EQ 'QRECOVERY' *OR + &ODLBNM *EQ 'QRPLOBJ' *OR + &ODLBNM *EQ 'QSPL' *OR + &ODLBNM *EQ 'QSRV' *OR + &ODLBNM *EQ 'QSYS' *OR + &ODLBNM *EQ 'QTEMP') THEN(GOTO LOOP) /* Check Phy file for bypass condition */ IF COND(&ODOBAT *EQ 'PF') GOTO PFCHECK IF COND(&ODOBAT *EQ 'PF38') GOTO PFCHECK GOTO COUNT PFCHECK: IF (&CHKPF *EQ '*NO') GOTO LOOP COUNT: CHGVAR &OBJCNT (&OBJCNT + 1) /* Check for detected damage */ IF (&ODOBDM *EQ '1') DO /* Detected damage */ CHGVAR &ERRCNT (&ERRCNT + 1) CHGVAR &MSG 'Object is marked as damaged' GOTO PRINT ENDDO /* Detected damage */ SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) TOPGMQ(*EXT) + MSGDTA('Saving ' *CAT &ODOBNM *TCAT + ' of type ' *CAT &ODOBTP *TCAT + ' in library ' *CAT &ODLBNM) + MSGTYPE(*STATUS) /* Status message */ /* Save to save file */ /* CAN'T CHECK SYSTEM LIBRARIES QDOC, QRECOVERY, + QRPLOBJ, QSPL, QSRV, QSYS OR QTEMP */ IF COND(&ODLBNM *EQ 'QDOC' *OR + &ODLBNM *EQ 'QRECOVERY' *OR + &ODLBNM *EQ 'QRPLOBJ' *OR + &ODLBNM *EQ 'QSPL' *OR + &ODLBNM *EQ 'QSRV' *OR + &ODLBNM *EQ 'QSYS' *OR + &ODLBNM *EQ 'QTEMP') THEN(GOTO LOOP) IF COND(&ODOBTP *EQ '*DOC' *OR + &ODOBTP *EQ '*FLR' *OR +
LATEST COMMENTS
MC Press Online