Previous Topic: $RMDBAPI SERVICE=SET

Next Topic: $RMSTSET

$RMEVENT

This API procedure sends a message to a defined resource. The resource definition must interpret the message and control the actual state of the resource. If necessary, relevant actions are invoked as part of this process. This procedure is typically used to control user-defined resources.

Syntax

This API procedure function call has the following format:

$RMEVENT CLASS={USRCLS|class-name}
         NAME=resource-name
         MSG=‘message-text

Operands

This API procedure function call has the following operands:

CLASS={USRCLS|class-name}

Specifies the class of the resource that is the subject of the message.

Default: USRCLS that specifies a user-defined resource class

NAME=resource-name

Specifies the name of the resource that is the subject of the message.

MSG=‘message-text

Specifies the text of the message that is sent to the resource. The message text must be enclosed in quotation marks.

Return Variable

This API procedure function call returns the following variable:

&SYSMSG

Contains the returned message.

Return Codes

Return codes indicate the success or failure of processing. This API procedure function call returns the following return codes in the &RETCODE variable:

0

Indicates that processing was successful.

8

Indicates that processing failed.

16

Indicates that error occurred in the call syntax.

Example: Send Message to a Resource

This example sends a user-defined message (that is, a message defined in the USRCLS class) to the resource named MYRES01:

$RMEVENT NAME=MYRES01 MSG='RECOVER'