#!/bin/ksh # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # # # Licensed Materials - Property of IBM # # (C) COPYRIGHT International Business Machines Corp. 2000,2019 # All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # # IBM_PROLOG_END_TAG # sccsid = "@(#)10 1.19 src/rsct/rm/ER/logevent, ERrm, rsct_rady, rady2035a 11/12/15 16:39:55" ##################################################################### # # Name: logevent # # Purpose: Logs event information generated by Event Response resource # manager to a specified log file. # # Inputs: Name of the file where event information is logged. # An absolute path for the logfile operand should be specified. # ##################################################################### generate_message () { cat <>$mytmpdir/errmlogevent.lck"); flock(ofh,LOCK_EX); $rc = 0; $uname=`uname`; chomp $uname; # alog only exists on aix if ("$uname" eq "AIX") { `echo "\$data" | alog -q -f "\$ofile" -s 65536` ; $rc = $?>>8; } else { open(ofh2,">>$ENV{ofile}"); print ofh2 "$ENV{data}" ; close(ofh2); } close(ofh); exit $rc; ' exit $?