[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

1087.0. "Problem in MCC_ALARMS_MAIL_ALARM.COM" by NETCUR::WADE (Bill Wade T&N Course Development) Mon Jun 03 1991 15:16

    
    
    I cann't think of a good reason to alarm on a reference attribute but
    I came across a problem in MCC_ALARMS_MAIL_ALARM.COM while  testing to 
    determine if I could quote the statement, "You can monitor on any 
    attribute belonging to an entity ..." (Alarms FM Use, pg2-4). 
     
    
    The rule is -
    

MCC 0 ALARMS RULE REF-TEST
AT  3-JUN-1991 11:48:57 Characteristics

Examination of attributes shows:
                              Procedure = DKB100:[MCC]MCC_ALARMS_MAIL_ALARM.COM;
                                          7
                      Exception Handler = DKB100:[MCC]MCC_ALARMS_MAIL_EXCEPTION.
                                          COM;4
                            Description = "reference entity"
                                  Queue = "mcc_alarms"
                              Parameter = "wade"
                             Expression = (CHANGE_OF (Node4 comms  location, 
                                          LAB-2,LAB-1), at  every=00:01)
                     Perceived Severity = indeterminate

    
    Mail is not sent and I include the log file MCC_ALARMS_MAIL_ALARM.LOG
    
    
    
    
$!
$! This command procedure is always run when anybody on the entire system
$! logs in. It is equivalent to LOGIN.COM except that the instructions
$! contained herein are executed everytime anyone on the VMS system
$! logs in to their account.
$!
$! For interactive processes, turn on Control T, and set the terminal type
$!
$ IF (F$MODE() .EQS. "INTERACTIVE") THEN SET CONTROL=T
$ IF (F$MODE() .EQS. "INTERACTIVE") THEN SET TERMINAL/INQUIRE
$!
$! For MicroVAX systems only, use the command MOUNT/NOASSIST.
$!
$ IF (.NOT. F$TRNLNM("SYS$MICROVAX")) THEN GOTO SKIP_MICROVAX_COMMANDS
$ MOU*NT :== MOUNT/NOASSIST
$SKIP_MICROVAX_COMMANDS:
$!
$! Place your site-specific LOGIN commands below
$!
$! SET VER
$! SET PROC/PRIV=ALL
$ on control_y then continue
$ ON ERROR THEN CONTINUE
$ ON WARNING THEN CONTINUE
$!
$! define DRAFT_MODE yes
$!
$ IF F$MODE() .EQS. "BATCH" then exit
$! FILE: MCC_ALARMS_SECURITY.COM
$!
$!  **************************************************************
$!  * ********************************************************** *
$!  * *                                                        * *
$!  * *  Copyright (c) Digital Equipment Corporation, 1990     * *
$!  * *  All Rights Reserved.  Unpublished rights reserved     * *
$!  * *  under the copyright laws of the United States.        * *
$!  * *                                                        * *
$!  * *  The software contained on this media is proprietary   * *
$!  * *  to and embodies the confidential technology of        * *
$!  * *  Digital Equipment Corporation.  Possession, use,      * *
$!  * *  duplication or dissemination of the software and      * *
$!  * *  media is authorized only pursuant to a valid written  * *
$!  * *  license from Digital Equipment Corporation.           * *
$!  * *                                                        * *
$!  * *  RESTRICTED RIGHTS LEGEND   Use, duplication, or       * *
$!  * *  disclosure by the U.S. Government is subject to       * *
$!  * *  restrictions as set forth in Subparagraph (c)(1)(ii)  * *
$!  * *  of DFARS 252.227-7013, or in FAR 52.227-19, as        * *
$!  * *  applicable.                                           * *
$!  * *                                                        * *
$!  * ********************************************************** *
$!  **************************************************************
$!
$! FACILITY:
$!     MCC -- Management Control Center
$!
$! ABSTRACT:
$!
$! This purpose of this command file is to normalize DCL symbols, set
$! user's privileges to NOALL, restrict logical trasnlation to searching
$! on the system logical translation table, all as a security measure.
$!
$! When a RULE fires, this command file will be queued to the SYS$BATCH
$! or user specifed execution queue.  This file will call the user's
$! specified command file after taking the above security precautions.
$! It will then set the user's environment back to its original state.
$!
$! The LOGFILE for the execution of the batch job is written to the
$! directory where the user specified command procedure is located.
$!
$!
$! 24-AUG-1990   ALO - P8 has datafile name concatenated
$! 30-AUG-1990   AVN   Deleted the data file:
$! 05-SEP-1990   ALO   Set ON for error handling
$! ========================================================================
$!
$!
$!
$!++
$! If the MCC_ALARMS_FM_LOG set to ALARMS$M_LOG_SECURITY_WRITELNS then write
$! the values of P1 through P8
$!--
$
$ ALARMS$M_LOG_SECURITY_WRITELNS = %X08
$
$ ALARMS$STR_MASK = f$trnlnm ("MCC_ALARMS_FM_LOG")
$ ALARMS$INT_MASK = f$integer ("%x"+ ALARMS$STR_MASK)
$ ALARMS$BIT = ALARMS$INT_MASK .and. ALARMS$M_LOG_SECURITY_WRITELNS
$
$    queue = f$getqui ("DISPLAY_JOB", "QUEUE_NAME",, "THIS_JOB")
$    write sys$output "Current queue:     ",queue
Current queue:     MCC_ALARMS
$
$ if ALARMS$BIT .gt. 0
$ endif
$
$!++
$! Delete all the users symbols.  This is done to NORMALIZE the DCL symbols
$!--
$
$ D == "DELETE"
$ D/SYMBOL/GLOBAL/ALL
$
$!++
$! DELETE user defined logicals in PROCESS and JOB tables
$! Restrict logical translation to the PROCESS, JOB and SYSTEM logical
$! translation tables.  GROUP is not used.
$!--
$
$ if ALARMS$BIT .gt. 0 then SHOW LOG

$
$ DEASSIGN/PROCESS/ALL
$ DEASSIGN/JOB/ALL
$ DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$FILE_DEV LNM$PROCESS,-
               LNM$JOB, LNM$SYSTEM
$
$ if ALARMS$BIT .gt. 0 then SHOW LOG
$
$!++
$! Save all users privileges and turn them off
$!--
$
$ SAVEPRIVS = F$SETPRV ("NOALL,TMPMBX, NETMBX")
$
$!++
$! Split the DATA filename off from the User's Procudure name
$!--
$
$ COMMAND_PROCEDURE = F$ELEMENT(0, "/", P8)
$ DATA_FILE         = F$ELEMENT(1, "/", P8)
$
$!++
$! Set ON incase user's command procedure returns error
$!--
$ on sever_error then continue
$ on error then continue
$ on warning then continue
$
$!++
$! Run the User's Command Procedure
$!--
$ @DKB100:[MCC]MCC_ALARMS_MAIL_ALARM.COM;7 "MCC 0 ALARMS RULE aa"-          !rulename
                      "reference entity"-          !category
                      ""-          !description
                      "(CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)"-          !expression
                      " 3-JUN-1991 11:33:58.65"-          !time
                      "Node4 comms Location = "LAB-2"  3-JUN-1991 11:32:57.70<EOS>Node4 comms Location = "LAB-1"  3-JUN-1991 11:33:57.54"-          !dtcrtf or error
                      "wade"-         !notification params
                      "SYS$SCRATCH:MCC_ALARMS_DATA_11335865.DAT"    !file that contains more info about the rule
$ !
$ !	MCC_ALARMS_MAIL_ALARM.COM
$ !
$ !  **************************************************************
$ !  * ********************************************************** *
$ !  * *                                                        * *
$ !  * *  Copyright (c) Digital Equipment Corporation, 1990     * *
$ !  * *  All Rights Reserved.  Unpublished rights reserved     * *
$ !  * *  under the copyright laws of the United States.        * *
$ !  * *                                                        * *
$ !  * *  The software contained on this media is proprietary   * *
$ !  * *  to and embodies the confidential technology of        * *
$ !  * *  Digital Equipment Corporation.  Possession, use,      * *
$ !  * *  duplication or dissemination of the software and      * *
$ !  * *  media is authorized only pursuant to a valid written  * *
$ !  * *  license from Digital Equipment Corporation.           * *
$ !  * *                                                        * *
$ !  * *  RESTRICTED RIGHTS LEGEND   Use, duplication, or       * *
$ !  * *  disclosure by the U.S. Government is subject to       * *
$ !  * *  restrictions as set forth in Subparagraph (c)(1)(ii)  * *
$ !  * *  of DFARS 252.227-7013, or in FAR 52.227-19, as        * *
$ !  * *  applicable.                                           * *
$ !  * *                                                        * *
$ !  * ********************************************************** *
$ !  **************************************************************
$ !
$ !
$ !	This command procedure mails an alarm to a user or distribution
$ !	list.  The rule name and time of detection appear in the
$ !	mail header.  A temporary mail file is created consisting of
$ !     a formatted representation of all of the parameters, and is
$ !	mailed as the body of the message.
$ !
$ !	Parameters:
$ !	    p1: Rule name
$ !	    p2: Description of rule
$ !	    p3: Category
$ !	    p4: Rule Expression
$ !	    p5: Time of Detection
$ !	    p6: Values that caused the rule to fire
$ !	    p7: Distribution
$ !		If distribution is a mailing list, p7 must be preceded by
$ !		a "@" character.  Otherwise, it is a list of usernames
$ !		separated by commas.
$ !	    p8: Data file containing information as passed in p1 through p7
$ !	        and the Domain and Severity
$ !
$ ! ----------------------------------------------------------------------
$ !
$ !			EDIT HISTORY:
$ !
$ !	17-SEP-1990	ALO	Read data file and use this to form output
$ !                             PURGE SYS$LOGIN
$ !	11-OCT-1990	ALO	The word EVIDENCE should be used instead of DATA
$ !
$ !     07-DEC-1990	ALO	Use the Domain
$ !
$ !	Open up the unique data file for read access
$ !
$	open data_file SYS$SCRATCH:MCC_ALARMS_DATA_11335865.DAT
$ !
$ !	Read each line and assign the line to one of the following symbols:
$ !     RULENAME, DESCRIPTION, CATEGORY, EXPRESSION, TIMESTAMP, DTCRTF, 
$ !     PARAMETER, SEVERITY, DOMAIN
$ !
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$ 	string = f$element (0, " ",line)
$
$ 	if string .eqs. "RULE:" then -
    	   RULE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DESCRIPTION:" then -
    	   DESCRIPTION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "CATEGORY:" then -
    	   CATEGORY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EXPRESSION:" then -
    	   EXPRESSION = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "TIME:" then -
    	   TIME = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "EVIDENCE:" then -
    	   EVIDENCE = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "PARAMETER:" then -
    	   PARAMETER = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "SEVERITY:" then -
    	   SEVERITY = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ 	if string .eqs. "DOMAIN:" then -
    	   DOMAIN = f$extract (f$locate (" ",line), f$length (line) +1, line)
$
$ goto READ_LOOP
$   READ_LOOP:
$ !
$ 	read/end_of_file=endit  data_file line
$   ENDIT:
$	close data_file
$ !
$ ! 	Make sure there's someone to send the message to.
$ !
$  	IF " wade" .eqs. ""
$	ENDIF
$
$ !     Create and open the temporary mail file.
$ !     Use the PID for a unique file name.
$       pid = f$getjpi ("", "PID")
$       fn = "mail_alarm_" + "0000011C" + ".tmp"
$	create mail_alarm_0000011C.tmp
$	open/append/error=write_error a$log mail_alarm_0000011C.tmp
$
$ !	Write the rule name line(s)
$ 	max_line_len = 132
$ 	header = "    Rule name:    "
$	total_line = F$EDIT (" MCC 0 ALARMS RULE aa ", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "    Rule name:     MCC 0 ALARMS RULE aa"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$
$ !	Write the domain name line(s)
$ 	header = "    Domain:       "
$	total_line = F$EDIT (" Domain ", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "    Domain:        Domain"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$
$ !	Write the time of detection line(s)
$ 	header = "  Detected at:    "
$	total_line = F$EDIT (" 3-JUN-1991 11:33:58.65", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "  Detected at:     3-JUN-1991 11:33:58.65"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$
$ !	Write the category line(s)
$	header = "     Category:    "
$	total_line = F$EDIT (" ", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$
$ !	Write the description field line(s)
$	header = "  Description:    "
$	total_line = F$EDIT (" reference entity", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "  Description:     reference entity"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$
$ !	Write the severity field line(s)
$	header = "     Severity:    "
$	total_line = F$EDIT (" indeterminate", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "     Severity:     indeterminate"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$
$ ! 	Write a blank line, then the expression and data lines.
$	write a$log " "
$	header = "   Expression:    "
$	total_line = F$EDIT (" (CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)", "TRIM")
$	call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "   Expression:     (CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$ !
$ !
$ !  Process DRF - multiple DRF's are seperated by the string <EOS>.
$ !  Each DRF-string is printed on a seperate line.
$ !
$       DRF = " Node4 comms Location = "LAB-2"  3-JUN-1991 11:32:57.70<EOS>Node4 comms Location = "LAB-1"  3-JUN-1991 11:33:57.54"
%DCL-W-IVCHAR, invalid numeric value - check for invalid digits
 \2  3-JUN-1991 11:32:57.70<EOS>NODE4 COMMS LOCATION = LAB\
$       Gosub Print_DRF
$  Print_DRF:
$ !
$    header       = "         Data:    "
$ !
$  Print_DRF_loop:
$    DRF_length   = f$length( DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$    EOS_position = f$locate( "<EOS>", DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$ !
$    If (DRF_length .EQ. 0) then Return
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF_LENGTH\
$ !
$ ! Extract 'first'DRF string and print
$ !
$    temp_DRF = f$extract( 0, EOS_position, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$    total_line = F$EDIT (temp_DRF, "TRIM")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \TEMP_DRF\
$    call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "         Data:     (CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$    header = "                  "
$ !
$ ! Extract 'first'DRF from string, leaving remainder of string
$ !
$    DRF = f$extract( EOS_position+5, DRF_length, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$ !
$    Goto Print_DRF_loop
$  Print_DRF_loop:
$    DRF_length   = f$length( DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$    EOS_position = f$locate( "<EOS>", DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$ !
$    If (DRF_length .EQ. 0) then Return
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF_LENGTH\
$ !
$ ! Extract 'first'DRF string and print
$ !
$    temp_DRF = f$extract( 0, EOS_position, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$    total_line = F$EDIT (temp_DRF, "TRIM")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \TEMP_DRF\
$    call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "                   (CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$    header = "                  "
$ !
$ ! Extract 'first'DRF from string, leaving remainder of string
$ !
$    DRF = f$extract( EOS_position+5, DRF_length, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$ !
$    Goto Print_DRF_loop
$  Print_DRF_loop:
$    DRF_length   = f$length( DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$    EOS_position = f$locate( "<EOS>", DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$ !
$    If (DRF_length .EQ. 0) then Return
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF_LENGTH\
$ !
$ ! Extract 'first'DRF string and print
$ !
$    temp_DRF = f$extract( 0, EOS_position, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$    total_line = F$EDIT (temp_DRF, "TRIM")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \TEMP_DRF\
$    call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "                   (CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$   end_write_lines:
$ ENDSUBROUTINE
$    header = "                  "
$ !
$ ! Extract 'first'DRF from string, leaving remainder of string
$ !
$    DRF = f$extract( EOS_position+5, DRF_length, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$ !
$    Goto Print_DRF_loop
$  Print_DRF_loop:
$    DRF_length   = f$length( DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$    EOS_position = f$locate( "<EOS>", DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF\
$ !
$    If (DRF_length .EQ. 0) then Return
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \DRF_LENGTH\
$ !
$ ! Extract 'first'DRF string and print
$ !
$    temp_DRF = f$extract( 0, EOS_position, DRF )
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \EOS_POSITION\
$    total_line = F$EDIT (temp_DRF, "TRIM")
%DCL-W-UNDSYM, undefined symbol - check validity and spelling
 \TEMP_DRF\
$    call write_lines
$ write_lines: SUBROUTINE
$
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
$	IF total_len .LE. max_line_len
$	THEN
$	    line_len = total_len
$	    GOTO write_a_line
$   write_a_line:
$ ! 	Write the header and the line.
$	IF line_len .EQ. 0 THEN GOTO end_write_lines
$	line_out = f$extract (0, line_len, total_line)
$       WRITE a$log  "                   (CHANGE_OF (Node4 comms  location, LAB-2,LAB-1), at  every=00:01)"
$
$ !	Remove the current line's text from the string, reset the header,
$ !	and go through the whole process again.
$	total_line = F$EDIT (f$extract (line_len+1, total_len-line_len+1, total_line), "TRIM")
$ 	header = "                  "
$	GOTO next_line
$   next_line:
$ ! 	Get the next line.  If its shorter than the max line length, just
$ ! 	print it, and don't bother parsing it.
$ 	total_len = F$LEN (total_line)
.
.
.
.
.
.
.
.
    
    
T.RTitleUserPersonal
Name
DateLines
1087.1Refence Attributes Work -- Bug found in DCL proceduresTOOK::ORENSTEINMon Jun 03 1991 17:0041
    Hi Bill,
    
    	The good news is that this problem has Nothing to do with reference
    attributes.  The bad news is that you have indeed found a problem with
    the Alarms sample command procedures.  And back to the good news, there
    is one work-around that I can think of.
    
    	The problem you have found is that the "Alarms/Command Procedure"
    interface does not handle quoted values very well.  If you use a quoted
    value in an expression, the string for the evidence that gets passed to the
    sample command procedure looks like this:
    
    "Node4 comms Location = "LAB-2"  3-JUN-1991 11:32:57.70<EOS>
     Node4 comms Location = "LAB-1"  3-JUN-1991 11:33:57.54"-   !dtcrtf or error
    
     (Note this is a long string and I broke it at the <EOS> to fit it here)
     
    See the imbedded quotes around LAB-2 and LAB-1.  This unfortunately wreaks 
    havoc and causes an infinite loop in the sample command procedures.  
    
    One work-around is to NOT QUOTE single word Latin1strings.  As an
    example if you want to ALARM on the reference attribute NODE4 LOCATION:
    
    MCC> SET NODE4 FOO LOCATION LAB-1   !This will not created any problems
    
    MCC> SET NODE4 FOO LOCATION "LAB-1" !This will cause the infinite loop
    
    This work-around is only applicable to single work Latin1string.
    
    PS.  It is still OK to quote the RULE arguments : Description,
    		Category, Parameter, Queue, etc.
    
         These are not embedded strings, but rather stand on their own,
    	 so no problems occur.
    	
    --------------------------------------------------------------------------
    
    I will QAR this against the ALARMS_FM.  Thank you for noting the
    problem.
    				     
    aud...
1087.2WORK AROUND DOSEN'T WORKNETCUR::WADEBill Wade T&amp;N Course DevelopmentMon Jun 03 1991 19:28207
    
    > MCC> SET NODE4 FOO LOCATION LAB-1   !This will not created any problems
    >
    > MCC> SET NODE4 FOO LOCATION "LAB-1" !This will cause the infinite loop
    >
    >
    
    As I said in .0 this doesn't look like a high priority problem but
    just to keep things straight.  Even though I knew I didn't use quotes
    the first time, I tried again and had the same results.  
    
    
    Also, I tried this -
    
    MCC> SET NODE4 comms LOCATION "LAB 1" 
   
    then created a rule using the change of rule expression with *,*
    
    then
    
    MCC> SET NODE4 comms LOCATION "LAB 2" 
    
 		NOTE -
    		   It looks like 1.1 cann't alarm (use the default command 
    		   procedures) on reference attributes.  They all have 
    		   imbedded quotes.  I tried alarming on "resp person" with 
    		   the same results.  Notification is passed to the IMPM
    		   but the command procedure crashes.
    
    The log file follows -
    
$!
$! This command procedure is always run when anybody on the entire system
$! logs in. It is equivalent to LOGIN.COM except that the instructions
$! contained herein are executed everytime anyone on the VMS system
$! logs in to their account.
$!
$! For interactive processes, turn on Control T, and set the terminal type
$!
$ IF (F$MODE() .EQS. "INTERACTIVE") THEN SET CONTROL=T
$ IF (F$MODE() .EQS. "INTERACTIVE") THEN SET TERMINAL/INQUIRE
$!
$! For MicroVAX systems only, use the command MOUNT/NOASSIST.
$!
$ IF (.NOT. F$TRNLNM("SYS$MICROVAX")) THEN GOTO SKIP_MICROVAX_COMMANDS
$ MOU*NT :== MOUNT/NOASSIST
$SKIP_MICROVAX_COMMANDS:
$!
$! Place your site-specific LOGIN commands below
$!
$! SET VER
$! SET PROC/PRIV=ALL
$ on control_y then continue
$ ON ERROR THEN CONTINUE
$ ON WARNING THEN CONTINUE
$!
$! define DRAFT_MODE yes
$!
$ IF F$MODE() .EQS. "BATCH" then exit
$! FILE: MCC_ALARMS_SECURITY.COM
$!
$!  **************************************************************
$!  * ********************************************************** *
$!  * *                                                        * *
$!  * *  Copyright (c) Digital Equipment Corporation, 1990     * *
$!  * *  All Rights Reserved.  Unpublished rights reserved     * *
$!  * *  under the copyright laws of the United States.        * *
$!  * *                                                        * *
$!  * *  The software contained on this media is proprietary   * *
$!  * *  to and embodies the confidential technology of        * *
$!  * *  Digital Equipment Corporation.  Possession, use,      * *
$!  * *  duplication or dissemination of the software and      * *
$!  * *  media is authorized only pursuant to a valid written  * *
$!  * *  license from Digital Equipment Corporation.           * *
$!  * *                                                        * *
$!  * *  RESTRICTED RIGHTS LEGEND   Use, duplication, or       * *
$!  * *  disclosure by the U.S. Government is subject to       * *
$!  * *  restrictions as set forth in Subparagraph (c)(1)(ii)  * *
$!  * *  of DFARS 252.227-7013, or in FAR 52.227-19, as        * *
$!  * *  applicable.                                           * *
$!  * *                                                        * *
$!  * ********************************************************** *
$!  **************************************************************
$!
$! FACILITY:
$!     MCC -- Management Control Center
$!
$! ABSTRACT:
$!
$! This purpose of this command file is to normalize DCL symbols, set
$! user's privileges to NOALL, restrict logical trasnlation to searching
$! on the system logical translation table, all as a security measure.
$!
$! When a RULE fires, this command file will be queued to the SYS$BATCH
$! or user specifed execution queue.  This file will call the user's
$! specified command file after taking the above security precautions.
$! It will then set the user's environment back to its original state.
$!
$! The LOGFILE for the execution of the batch job is written to the
$! directory where the user specified command procedure is located.
$!
$!
$! 24-AUG-1990   ALO - P8 has datafile name concatenated
$! 30-AUG-1990   AVN   Deleted the data file:
$! 05-SEP-1990   ALO   Set ON for error handling
$! ========================================================================
$!
$!
$!
$!++
$! If the MCC_ALARMS_FM_LOG set to ALARMS$M_LOG_SECURITY_WRITELNS then write
$! the values of P1 through P8
$!--
$
$ ALARMS$M_LOG_SECURITY_WRITELNS = %X08
$
$ ALARMS$STR_MASK = f$trnlnm ("MCC_ALARMS_FM_LOG")
$ ALARMS$INT_MASK = f$integer ("%x"+ ALARMS$STR_MASK)
$ ALARMS$BIT = ALARMS$INT_MASK .and. ALARMS$M_LOG_SECURITY_WRITELNS
$
$    queue = f$getqui ("DISPLAY_JOB", "QUEUE_NAME",, "THIS_JOB")
$    write sys$output "Current queue:     ",queue
Current queue:     MCC_ALARMS
$
$ if ALARMS$BIT .gt. 0
$ endif
$
$!++
$! Delete all the users symbols.  This is done to NORMALIZE the DCL symbols
$!--
$
$ D == "DELETE"
$ D/SYMBOL/GLOBAL/ALL
$
$!++
$! DELETE user defined logicals in PROCESS and JOB tables
$! Restrict logical translation to the PROCESS, JOB and SYSTEM logical
$! translation tables.  GROUP is not used.
$!--
$
$ if ALARMS$BIT .gt. 0 then SHOW LOG

$
$ DEASSIGN/PROCESS/ALL
$ DEASSIGN/JOB/ALL
$ DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$FILE_DEV LNM$PROCESS,-
               LNM$JOB, LNM$SYSTEM
$
$ if ALARMS$BIT .gt. 0 then SHOW LOG
$
$!++
$! Save all users privileges and turn them off
$!--
$
$ SAVEPRIVS = F$SETPRV ("NOALL,TMPMBX, NETMBX")
$
$!++
$! Split the DATA filename off from the User's Procudure name
$!--
$
$ COMMAND_PROCEDURE = F$ELEMENT(0, "/", P8)
$ DATA_FILE         = F$ELEMENT(1, "/", P8)
$
$!++
$! Set ON incase user's command procedure returns error
$!--
$ on sever_error then continue
$ on error then continue
$ on warning then continue
$
$!++
$! Run the User's Command Procedure
$!--
$ @DKB100:[MCC]MCC_ALARMS_MAIL_ALARM.COM;7 "MCC 0 ALARMS RULE TEST"-          !rulename
                      ""-          !category
                      ""-          !description
                      "(CHANGE_OF (Node4 COMMS  LOCATION, *,*), at  every=00:01)"-          !expression
                      " 3-JUN-1991 15:54:27.96"-          !time
                      "Node4 COMMS Location = "lab 2"  3-JUN-1991 15:53:26.73<EOS>Node4 COMMS Location = "lab 1"  3-JUN-1991 15:54:26.73"-          !dtcrtf or error
                      "WADE"-         !notification params
                      "SYS$SCRATCH:MCC_ALARMS_DATA_15542796.DAT"    !file that contains more info about the rule
%DCL-W-DEFOVF, too many command procedure parameters - limit to eight
$ !++
$ !     Delete the data file
$ !--
$ !
$       DELETE SYS$SCRATCH:MCC_ALARMS_DATA_15542796.DAT;
$ !++
$ ! clean exit point
$ !--
$ clean_exit:
$ !
$ !----------------------------------------------------------------------------
$               		exit
  WADE         job terminated at  3-JUN-1991 15:54:31.67

  Accounting information:
  Buffered I/O count:              40         Peak working set size:     404
  Direct I/O count:                47         Peak page file size:      2324
  Page faults:                    462         Mounted volumes:             0
  Charged CPU time:           0 00:00:00.89   Elapsed time:     0 00:00:02.94