Re: Alerting tool for INFORMIX-4GL Applications
Posted in 1995
I suggest you investigate the UNIX background processing and redirection capabilities. At our site, we run a crontab task every 10 minutes that checks our database for certain conditions. If these conditions are found, it fixes them and then sends mail to the support group to let them know it happened. (The mail is more for tracking the occurance than for action.) The ksh script goes something like this -- ---------------------------------------------------------- #!/bin/ksh # Clear out the file that holds the result of the 4gl program cp /dev/null results # Clear out the errlog file cp /dev/null errlog # Run the 4gl program redirecting all error messages and displays anypgm.4ge >results 2>&1 # Copy the errlog file onto the end of the results file cat errlog >>results # If the results file is not empty, do something with it if [ -s results ] then # This would mail the message mailx -s "Alert from $0" user1 user2 user3 <results # This would display it on a specific terminal cat /dev/tty01 <results fi ---------------------------------------------------------- If you wish, feel free to e-mail me or post here with more details of what you are trying to do and I will try to help. ############################################################################# In article <4ao025$ou0@cssun.mathcs.emory.edu>, m.mejia@server1.codetel.net.do (Melvin Perez Cedano) wrote: >Hi Informixers! > >I'm looking for a tool, or any help in build one, for alerting messages in >my Informix Applications. > >I would like to build alert messaging in my applications; for example: alert >users when a product has reached the reorder level, alert user requiring for >a transaction authorization, and so on... > >I would like that these messages appear on the terminal indicated no matter >what this is running on. > >Do you know something that helps me? > >Let me know as soon as posible!! > >--> I'm in unix environment > >TIA > ////// >+------------------------------ooo-O-O-ooo--------------------------------+ >| U | >| Melvin Perez Cedano Santo Domingo, Dom. Rep.| >| Vice-President m.mejia@codetel.net.do | >| Systems Development Phone (809) 686-5574 | >| CAM Informatica, S. A. Fax (809) 686-5467 | >+-------------------------------------------------------------------------+ >