Time triggered subroutines (AREV Specific)
At 20 DEC 1997 01:32:44AM Jim Dierking wrote:
Does anyone have some code or suggestions on how to create a routine
that will call an AREV routine at a predetermined time? TIA, Jim Dierking
At 20 DEC 1997 06:53AM Charles Schmidling wrote:
Your question poses an interesting scenario and its answer helped me solve a problem I've been wanting to do for a while: put a real time clock in some of my entry screens. Thank you.
What you need to do is install a pseudo TSR that will montor your conditions and execute stuff when the time is right.
One way is to install your own menu shell at logon that processes everything. However, you would be running at an extra level down and you can lose it on the first error or BREAK that is encountered.
Another way is find a system routine that's called a lot and latch on to it. I've tried this and (wow) it worked. I chose RTP22, the main keyboard input routine. What you do is create a pass through subroutine that captures the passed parameters, processes your monitor, and passes the paramenters to the orignal routine; pseudo interrupt processing.
DISCLAIMER: This patch was designed in, and refers to files and routines for, RevG2b. AREV routines may differs. This is also VERY DANGEROUS and should be approached cautiously. A backup of your system files would be a good idea.
Try this:
Copy SYSOBJ $RTP22 to SYSOBJ $RTP22.SAVE and to VERBS file as $RTP22.SAVE. SYSOBJ is only accessed from SYSPROG account and this copy allows for a quick recovery to the original. The VERBS copy will be catalogued and called.Create a new SYSOBJ RTP22 containing:
SUBROUTINE RTP22 (A1,A2,…A16) 16 parameters are passed
Do whatever you want to do
CALL RTP22.SAVE(A1,A2,…A16) pass all captured paramenters
RETURN
END
Save and compile it. Then Catalog VERBS RTP.SAVE. Now, and this is important, QFILE to the VOC file of ALL of your Rev accounts and copy VOC RTP.SAVE to each VOC file. Without it, you will never be able to sign on to any account other than SYSPROG.
IMPORTANT: Be sure your monitor routine functions properly and the number of captured and passed parameters are correct. If not, and an error occurs, keyboard input may not work right - EVER! When you are certain, Sign off and sign on to load the new routine.
Since RTP22 is a subroutine, no parameter is passed back, like a function. Since your routine does not access any COMMON system variables, and can't, there is no conflict. You can't put a COMMON in there either or you'll mess up the COMMONs table.
You need to find AREV's routine and its number of parameters. It's probably the same, but unsure. There are ways.
Good Luck,
Charles Schmidling
DATASCAN Systems, Inc.
At 20 DEC 1997 03:27PM Aaron Kaplan wrote:
Simplest way would be put a replace index hook into the background indexing time, check for a date/time value (or greater incase the workstation is busy) and do it that way. No shelling system commands, just using standard system functionality.
At 22 DEC 1997 09:37AM Robert Lynch wrote:
There is a company named CCI that specializes in AREV programming. They put out a product called The Process Server which does precisely what your looking for. You install on a dedicated PC and schedule jobs to be run on it. They have a listing here on the Revelation homepage under the vendors listing. They are located in Annapolis, MD.