This is an alternate method using a LINUX_JOB with the grep command with the -E option. I took a shortcut and just used SEND statements since email is specific to your environment. With this solution there are no failed jobs. Depending on the Completion Code of the grep command the next job will be run or bypassed.
Command syntax:
grep -E 'Add User|Delete User|Error' <file>
ESP PROC
PROCEDURE_SECTION:
LinuxFile = "<file>" /* Enter file name */
S1 = "Add User"
S2 = "Delete User"
S3 = "Error"
APPL TEXTGREP
LINUX_JOB TEXTGREP
AGENT LJ_LINUX64
CMDNAME /bin/bash
USER compops
ARGS -c "grep -E '%S1|%S2|%S3' %LinuxFile"
EXITCODE 0-1 SUCCESS
RUN ANYDAY
RELEASE ADD(FOUND) COND(RC(0))
RELEASE ADD(NOTFOUND) COND(RC(1))
ENDJOB
JOB FOUND TASK SELFCOMPLETING
SEND 'STRING FOUND' U(*)
RUN ANYDAY
ENDJOB
JOB NOTFOUND TASK SELFCOMPLETING
SEND 'STRING NOT FOUND' USER(*)
RUN ANYDAY
ENDJOB