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.
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.