|
 |
 |
 |
Welcome to Code400.com
|
Okay...We all like to get free stuff..Right?!?
Well thats what we are offering here....Free Stuff
- Free storage for your source code.
- Free access to code
samples. (site search)
- Free place to ask questions or just say what you want.
We are interested in what you have to say.
If you can’t find what your’e looking for on this site....
We will add it.
The small print says: We provide the source code on this site as only
a guide. We do not recommend that anyone run any of the code provided
on this site without first testing it.
If you choose to download source from this site directly onto
your production box without testing....Well, YOU are completely to
blame and we don’t want to hear about it.
Random QuoteConquer thyself, till thou has done this, thou art but a slave; for it is almost as well to be subjected to another's appetite as to thine own.
Sir Richard Francis Burton
| |
 |
 |
|
Monitor WRKACTJOB for jobs in Message Wait (*MSGW)
This example creates a list of all jobs on the system by getting a list
from the WRKACTJOB command. It should be submitted thru the job scheduler
to run. It currently starts at 0500 and ends at 1800. This can be changed
by modifiying the variables starttime & endtime. When it finds an error it
loops thru a list of userid's and sends a break message to every device that
the user is signed on. It will then wait five (5) minutes before resending
this message. (give you some time to fix the error)
Once again modifications are encouraged and Please send back new version
and I will place your modification mark on the source and the website.
OBJECTS
MSC50 RPGLE Monitor program
API’s USED
QUSLJOB - List jobs
QUSCRTUS - Create user space
QUSCUSAT - Change userspace
QCMDEXC - Run CLP commands in RPG
DOWNLOAD
Download text files
Replace these userid's with yours
*
c do 2 x
*
c select
c When X = 1.
c Eval OutUSer = 'FLANARY'
c When X = 2.
c Eval OutUSer = 'SOMEUSER'
c endsl
You may also ignor jobs that are always in *MSGW by placing them here
in the code
*
* Get the device (*ACTIVE) for the userid and send break message
*
c if %subst(XTEMP:4:10) <> 'MSC18#3' and
c %subst(XTEMP:4:10) <> 'MSC18#4'
*
|
| |