ENFSNMP and OPS MVS OPSCAWTO function

book

Article ID: 129837

calendar_today

Updated On:

Products

CA OPS/MVS Event Management & Automation

Issue/Introduction

 The OPSCAWTO function is getting a return code 0 even when the ENFSNMPM task is down. It was expected to get a RC=4.

Cause

https://docops.ca.com/ca-opsmvs/13-5/en/reference-information/command-and-function-reference/ops-rexx-built-in-functions/opscawto-function

CA Common Services Reference:

https://docops.ca.com/ca-common-services-for-z-os/15-0/en/installing/configure-caienf/customize-the-enfsnmpm-procedure

Environment

Using the OPSCAWTO function to send SNMP traps out of the mainframe. This function requires the ENF started task to be active and also the spawned task ENFSNMPM.

Resolution

The function OPSCAWTO returns a 4 when the ENF started task itself is inactive. There is no check to confirm if the ENFSNMPM is active.
A work around is to use the OPSTATUS function to check the status the ENFSNMP task before calling the OPSCAWTO function.