Here's a little program I've made that checks my licensed programs. The Check Product Option (CHKPRDOPT) command is used in the program. The command reports the differences between the correct structure and the actual structure of a software product. (For example, if an object is deleted from an installed product.) I run this program every night along with several other checks.
I like automating checks like this one. It takes some time to create and test them, but once finished you'll never have to worry about it again because you know you will be notified if something is wrong on your system.
The CL-program: ==================================== PGM DCLF FILE(QTEMP/CHKLICPGM) WRKLICINF OUTPUT(*PRINT) CRTPF FILE(QTEMP/SPLFPF) RCDLEN(132) CPYSPLF FILE(QSYSPRT) TOFILE(QTEMP/SPLFPF) DLTSPLF FILE(QSYSPRT) SPLNBR(*LAST) SELECT(*CURRENT *ALL *ALL WRKLICINF) RUNQRY QRY(CHKLICPGM) LOOP: RCVF MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(ALLRIGHT)) CHKPRDOPT PRDID(&PRDID) MONMSG MSGID(CPD0C21 CPF0C20) EXEC(SNDMSG MSG('Errors encountered during OS/400 and related product checking') TOUSR(*SYSOPR)) GOTO LOOP ALLRIGHT: SNDMSG MSG('OS/400 and related products check completed succesfully!') TOUSR(*SYSOPR) ENDPGM ==================================== The Query: ==================================== Query name: CHKLICPGM File selection: QTEMP/SPLFPF Result Fields: PRDID = substr(SPLFPF,2,7) VERSION = substr(SPLFPF,14,4) FEATURE = substr(SPLFPF,27,4) DESCR = substr(SPLFPF,38,50) Select Records: PRDID LIKE '5%' Output: OUTFILE(QTEMP/CHKLICPGM) ====================================
MORE INFORMATION ON THIS TOPIC
The Best Web Links: Tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Read this Search400.com Featured Topic: Managing your iSeries.
Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.