Previous Topic: PINGCD Macro

Next Topic: RUNPRCSS Macro

REPLY Macro

The REPLY macro replies to an outstanding write-to-operator with reply (WTOR) message. The reply can be to one of the following:

The REPLY macro lets you specify message rules to detect any expected response messages.

Parameters: REPLY Macro

Last WTOR?

Enter YES in the Last WTOR? field to indicate that the message in the Reply Text field is in response to the last WTOR message seen by this process (for example, a WTOR message sent by a previous step). If the message is not intended as a reply to the last WTOR, leave the field blank.

Note: If your reply is intended for the last WTOR message, complete the Last WTOR field only. Do not complete either the Jobname or WTOR Message Text fields.

Jobname

If the message in the Reply Text field is intended as a reply to a WTOR message from a particular job, enter the name of the job in the Jobname field.

If you also complete the WTOR Message Text field, your reply is to that message received from the named job. If you do not complete the WTOR Message text field, your reply is to the first WTOR message received from the named job.

Note: If you complete this field, you cannot also complete the Last WTOR? field.

WTOR Message Text

Specifies the text of the message to which you want to reply. It need not contain the complete message, but must contain sufficient text to adequately identify the message.

If you also complete the Jobname field, your reply is to the WTOR message from the named job only.

If you complete this field, you cannot also complete the Last WTOR? field.

Reply

Specifies your reply.

Limits: 1 through 65 characters in length.

Message Text

Specifies the initial part of the expected response message.

Limits: Up to 45 characters.

R/Code

Specifies the value to be returned by the macro when it receives the response message.

Limits: A number from 0 through 999.

E/Filter

Displays YES or NO indicating whether an extended filter has been defined. This field is completed automatically when a rule is defined. It cannot be modified.

Wait Time

Specifies the maximum time, in seconds, that the region waits for a response message. The time is reset each time a response is received. The macro waits until a message that matches a rule in the Message Text fields is received or until the time expires without receiving any more responses.

Limits: A number from 1 through 9999.

Default: 30

Wait Time Expiry Return Code

Sets the return code if the expected message does not arrive before the expiry of the time specified in the Wait Time field.

Limits: A number from 1 through 999.

Default: 69

Returned Variables: REPLY Macro

&$RMMCMSGTEXT

Contains the full text of the message that satisfies the message rules.

&$RMMCWORDn

Contain the words in the message, where n indicates the position of the word in the message.

&ZRMMSGn

Contain any messages received before the required response message, where n is a number indicating the order in which those messages are received.

&$RMMCWTORID

Contains the ID of the last encountered WTOR message if the macro encounters any WTOR messages before it encounters an expected message.

For example, if the response to a command consists of three messages A, B, and C, and message B satisfies the message rules, then:

Example: REPLY Macro

In the following example, the REPLY macro is used to reply to the WTOR message identified by the following text string:

T00IJ013R CONFIRM REQUEST TO STOP A/S

PROD------ Automation Services : REPLY Macro Parameter Definition ------------- Command ===> Function=UPDATE .- WTOR Identification -------------------------------------------------------. | Last WTOR? Or Jobname And/Or WTOR Message Text | | ___ (Yes) ________ T00IJ013R CONFIRM REQUEST TO STOP A/S_________ | ’-----------------------------------------------------------------------------’ .- Reply Text ----------------------------------------------------------------. | | | Reply.... Y________________________________________________________________ | ’-----------------------------------------------------------------------------’ .- Response Message Analysis -------------------------------------------------. | D=Delete Extended Filter S=Extended Filter | | Message Text R/Code E/Filter | | ___ T00IJ014I____________________________________ _0_ | | ___ _____________________________________________ ___ | | ___ _____________________________________________ ___ | | ___ _____________________________________________ ___ | | ___ _____________________________________________ ___ | | | | Wait Time 30__ Wait Time Expiry Return Code 69_ |