Previous Topic: Values OPSCA7 ReturnsNext Topic: Installation Considerations


OPSCAWTO Function

The OPSCAWTO function sends a message to the CA Event Manager in the form of an SNMP trap. Using Event Manager message rules, CA NSM can take an action. OPSCAWTO uses the CAIENF component of CCS for z/OS to send the SNMP trap asynchronously. CA NSM does not return a response.

Note: Use the OPSCAWTO function in any OPS/REXX program or AOF rules. For a list of the CCS for z/OS components you require to run OPSCAWTO, see the appendix “CCS for z/OS Component Requirements” in the Installation Guide.

OPSCAWTO has the following format:

var = OPSCAWTO('ipaddress','message text',['DE'],OID modifier')
ipaddress

The TCP/IP address (ipaddress) or host name defines the destination node of the TCP/IP network to which OPSCAWTO sends the SNMP trap. The OPSCAWTO function receives no notification that the SNMP trap arrives at the specified node successfully. To obtain the correct IP address or host name of the desired destination, consult your network communication personnel.

message text

The message text argument is the text of the message that the OPSCAWTO function sends as an SNMP trap to the desired TCP/IP address. The argument cannot contain the quotation mark (“) character as part of the sent message data.

Message buffer space must be allocated for fixed-length protocol overhead elements, and variable length fields which contain the IP address and the OID structure. If the IP address is coded in the basic 15-byte dotted notation format, and the default OID is adequate, the available text length allows up to 432 characters. If OPSCAWTO is running as a rule, the available text length reduces to 284 characters. If either the IP address or OID string changes, the available text length may fluctuate. If this limit is exceeded, the message text automatically truncates itself by the amount necessary to stay within the limit. The function returns a return code of 1 to indicate that truncation has occurred.

options

(Optional) The options characters can be used to request special handling features of the function. You can specify the following options separately or together in any order as a string:

D (Debug)

The debug option causes the CA Common Services for z/OS ENFSNMPM task to produce detailed trace messages about sending the SNMP trap to the target destination. The trace messages should be your main source of information about problem resolution.

To view the trace messages:

  • Display the JESMSGLG ddname or SYSPRINT ddname of the ENFSNMPM started task using CA SYSVIEW or SDSF.
  • Verify that the trap message was received, processed, and sent by ENFSNMPM.

Note: If the target host is running the Event Manager component of CA NSM, the CATRAPD service must be running for the trap to appear as a message in the Event Manager GUI console.

E (Enterprise)

The enterprise option inserts the CA OPS/MVS OID (1.3.6.1.4.1.791.2.4.2) into the enterprise ID portion of SNMP trap. If not specified, the default enterprise ID specified for the ENFSNMPM task is used. Specify this option when the receiving SNMP manager uses the enterprise ID of the trap to uniquely identify the sender. An extra 19 characters of the maximum message space are used for this option.

OID modifier

SNMP uses the OID (Object Identifier) to identify the origin and type of information in a message. The default OID in OPSCAWTO is '1.3.6.1.4.1.791.2.4.2'. This OID indicates to OPSCAWTO that the SNMP trap comes from CA OPS/MVS. Other software products that receive and interpret SNMP traps require different or extra identifiers to use the information in a message. The OID modifier argument lets you add on to the '2.4.2' portion of the default OID in OPSCAWTO. The '1.3.6.1.4.1.791.2.4.2' portion of the default OID remains fixed.

Example:

To add on to the '1.3.6.1.4.1.791.2.4.2' portion of the OID, the identifier added requires a starting period. For example, '1.3.6.1.4.1.791.2.4.2' can be changed to '1.3.6.1.4.1.791.2.4.2.3.2.1' by adding '.3.2.1'. We recommend that you create your own OIDs starting with '1.3.6.1.4.1.791.2.4.2.999’ to avoid the possibility of future conflicts with CA OPS/MVS OIDs.

Note: When the OID modifier argument causes the length of the OID to increase, the space available for the IP address and message text reduces.