How to get RC back from CALL NMFIND.REX within an AP REXX
search cancel

How to get RC back from CALL NMFIND.REX within an AP REXX

book

Article ID: 188334

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

Attempt to get a programmatic response (RC) from a Call NMFIND.REX within an Automation Point (AP) REXX, but cannot get a RC back nor see any failure msg in any log.

Environment

Component : Automation Point

Resolution

This is how it works: the Automation Point (AP) rexx calls NMFIND.  NMFIND then delivers the email message to the Email server, and the email server sends it out. When the message(s) is successfully placed at the email server the NMFIND finishes the task and gives control back to the AP rexx that called it. If NMFIND runs successfully, the RESULT returned by NMFIND is 0. 

AP cannot check on the email addresses that are stored in the NM database and entered by the user. If the email address then seems to be wrong, that is only seen by the email server if there is an undelivered message returning. 

There is NO possibility to get an invalid RC/result when there is an invalid email address delivered.
The only thing that can be done is to create an email server rule that forwards these undelivered messages to an existing email address, e.g., someone as an administrator. If there is Windows email server capability to log the failure in the Windows Application Event log, it's possible to monitor that log and trigger a rule in AP, or possibly the email server could issue a restful api call. Otherwise AP is not aware of any failure of the email delivery.