When calling the CA OPS/MVS function OPSCAWTO, how to use the hostname instead of the IP address of the target system?
search cancel

When calling the CA OPS/MVS function OPSCAWTO, how to use the hostname instead of the IP address of the target system?

book

Article ID: 44196

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

Question:

When calling the CA OPS/MVS function OPSCAWTO, how to use the hostname instead of the IP address of the target system?

Introduction:

When a change in the first argument of the CA OPS/MVS OPSCAWTO function is implemented to use a hostname instead of an IP address, invalid results may occur. Messages indicating that SNMP traps have been sent successfully can be seeing but they never arrive to its final intended destination.

To better explain this situation suppose you already have configured the CA Common Services ENFSNMP startup member SNMPCNFG with the IP address and hostname of the target system using the DEBUG option:

123.123.1.123          162 snmpv3 public DEBUG
snmprec.world.com  162 snmpv3 public DEBUG

If a change in the first argument of this code: MSGtext = OPSCAWTO('123.123.1.123',"'"MSGtxt"'",'D')

Is implemented as: MSGtext = OPSCAWTO('snmprec.world.com',"'"MSGtxt"'",'D') 

Then messages like this will indicate that the SNMP traps, in form of an alert, were successfully sent. 

IP address:

21:44:31 do_snmp: found matching configuration entry, statement number 142
21:44:31 do_snmp: using SNMPv1
21:44:31 snmpv1: routine entered
21:44:31 vb_list: OID string: 1.3.6.1.4.1.791.2.4.2
21:44:31 vb_list: OID value type: OCTETSTRINGEBCDIC
21:44:31 vb_list: OID value > NORMAL PROBLEM MISMATCH Task=QUERYMON Current State=USING Desired State=IPADDR <
21:44:31 do_snmp: do_snmpv1 returned rc=0
21:44:31 do_send: socket(1) port(162) opened to sendto 123.123.1.123

hostname:

21:47:30 Arg 001-->OCTETSTRINGEBCDIC<--
21:47:30 arg 8 is < NORMAL PROBLEM MISMATCH Task=QUERYMON Current State=USING Desired State=HOSTNAME
21:47:30 Arg 002--> NORMAL PROBLEM MISMATCH Task=QUERYMON Current State=USING Desired State=HOSTNAME
21:47:30 arg 9 is <>
21:47:30 do_snmp: no matching configuration entry, using default entry
21:47:30 name2ip: cache timeout for snmprec.world.com 
21:47:30 name2ip: snmprec.world.com converted to 123.123.1.123 
21:47:30 do_send: sent 139 bytes of data, node=snmprec.world.com 

The call to the CA OPS/MVS OPSCAWTO function that is using the hostname never reach its final intended destination.

Environment:

z/OS (all IBM supported releases)
CA OPS/MVS and CA Common Services (all CA Technologies supported releases)
For support information consider visit our IBM zEnterprise Compatibility Matrix

Answer:

To circumvent this situation consider modifying the CA Common Services ENFSNMP configuration startup member SNMPCNFG. This member is located in the CA Common Services library CAW0OPTV. It contains the nodes definitions for the SNMP traps. The nodes are entered either as IPv4 or IPv6 addresses and a hostname can also be used.

123.123.1.123          162 snmpv3 public
snmprec.world.com  162 snmpv3 public

The CA Common Services ENFSNMP task uses the contents of the SNMPCNFG member to compare against the node specified in the ENFSNMP Event to select the SNMP protocol and other necessary parameters. However, no attempts are made to convert from a hostname to an IP address or vice versa.

Additional Information:

You can find additional information at our website: CA Technologies Documentation

Environment

Release: PVLA2.00200-12.2-OPS/MVS-Event Management & Automation-for JES2
Component: