When calling the CA OPS/MVS function OPSCAWTO, how to use the hostname instead of the IP address of the target system?
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:
220.127.116.11 162 snmpv3 public DEBUG
snmprec.world.com 162 snmpv3 public DEBUG
If a change in the first argument of this code: MSGtext = OPSCAWTO('18.104.22.168',"'"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.
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: 22.214.171.124.4.1.7126.96.36.199
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 188.8.131.52
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 184.108.40.206
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.
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
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.
220.127.116.11 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.
You can find additional information at our website: CA Technologies Documentation