In a crowdy iSeries, it takes just a few e-police patrols to make life easier.|
E-police patrols don't look for fines, they care for solving accidents,
for answering to bothering questions, for making sure that some important shops are working, and ...
they do all that at no charge.
|by Giovanni B. Perotti (Italy)|
E-Police is a collection of iSeries utilities dealing with out-of-line situations:
- Program Error Monitor
gets control over ILE-RPG program errors,
sends an e-mail message to the appropriate application developer
providing complete documentation (error profile, joblog, program source).
- Receive Message Queue
There are installations that are regularly bothered by system messages requiring actions (expecially from message queue QSYSOPR).
In most cases, the causes of the messages are very well known, and the actions are always the same.
Then, why not an automat taking care of these cases and documenting what was done?
- Mandatory activities
Some installations need some subsystems and/or some jobs be always active.
Command epolice/chksbsjob provides a way to implement such a requirement.
- Command EDBG
Boost up your debug.
Note- SendMail functions are included, therefore MMail utility is not required.
- Operating system release V5R2 or subsequent
- ILE-RPG compiler (just for the initial installation)
- Updates to this utility are documented in
- If you want to know the release date of the EPOLICE package installed on your IBM i,
you must run command EPOLICE/RELEASED .
- Signon to the iSeries with a SecurityOfficer-like user profile
- CRTSAVF FILE(QGPL/EPOLICE) AUT(*ALL)
- From the Easy400 download page
download file epolice.zip to your PC and unzip it
- Use FTP to copy PC file epolice.sav to save file QGPL/EPOLICE
- MD DIR('/mmail') DTAAUT(*RWX) OBJAUT(*ALL)
- MD DIR('/mmail/temp') DTAAUT(*RWX) OBJAUT(*ALL)
- RSTLIB SAVLIB(EPOLICE) DEV(*SAVF) SAVF(QGPL/EPOLICE)
- STRREXPRC SRCMBR(INSTALL) SRCFILE(EPOLICE/QREXSRC)
It will perform the following:
- creates a compile program in library EPOLICE
- runs command EPOLICE/COMPILE that creates the necessary modules and programs
- runs command EPOLICE/INSTALL to complete the installation by
During this phase, the installation process will stop two times:
- restoring directory /epolice
- creating directory /epolicedta
- creating and populating library EPOLICEDTA with local files
- creating and populating library MMAILDATA with a few objects, if necessary
Note- The e-mail messages sent by E-Police allow to display error data via HTTP. This is why you need an HTTP instance
containing directives for E-Police.
- The first time it displays the HTTP directives that you must install later on in an
Apache HTTP instance of your choice (See the Note below). These directives are in the IFS stream file
If you like, you may press this
to display them.
- Then it asks you the DNS name (or the IP address) of such an HTTP instance, inclusive of any non-standard port number
(e.g. 192.168.0.2:8020 ).
You may update later on this piece of information by using command EPOLICE/DNSNAME.
|More on the HTTP instance|
If you are not familiar with the Apache HTTP server, you may not be able to add the HHTP directives
to an existing HTTP instance of yours.
In such a case, you may want to install a
pre-configured E-Police HTTP instance already available.
Do the following:
- CPYF FROMFILE(EPOLICE/QATMHINSTC) TOFILE(QUSRSYS/QATMHINSTC) FROMMBR(EPOLICE) TOMBR(EPOLICE) MBROPT(*REPLACE) CRTFILE(*YES)
- STRTCPSVR SERVER(*HTTP) HTTPSVR(EPOLICE)
- WRKACTJOB SBS(QHTTPSVR) JOB(EPOLICE)
and make sure that more than one POLICE job is active
and enter the IP address (or the DNS name) of your AS400, followed by a colon and the port number.
For instance, this is how you display the EPOLICE documentation on your IBM i: