The COMMAND macro issues a product command and interprets the results. It also lets you specify message text to detect the required response message.
Parameters: COMMAND Macro
Is a mandatory field that specifies the name of the command to be issued by the macro.
This field can contain up to 61 characters.
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.
This field must contain a number from 1 through 9999. The default is 30.
Sets the return code if the expected message does not arrive before the expiry of the time specified in the Wait Time field.
This field must contain a number from 1 through 999. The default is 69.
The following fields specify the rules that apply to response messages. You can specify up to five rules. The action codes enable you to refine the message text definition criteria. More information on the use of action codes is available in the online help.
Specifies the initial part of the expected response message. It can contain up to 45 characters.
Specifies the value returned by the macro when it receives the response message. The return code must be a number from 0 through 9999.
Indicates whether an extended filter has been defined. This field is empty until the Message Text and the Return Code fields are completed. If you want to define an extended filter, enter S beside the rule to access the Extended Message Filtering panel.
Returned Variables: COMMAND Macro
Contains the full text of the message that satisfies the message rules.
Contains the words in the message, where n indicates the position of the word in the message.
Contains any messages received before the required response message, where n is a number indicating the order in which those messages are received.
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: COMMAND Macro
In the following example, the COMMAND macro executes the SHOW ALLOC=RAMLOG01 command and waits for a response message. In this case, that message is N15115 RAMLOG01 ALLOCATED SOLVBSYS hh.mm.
If this message is not received within 30 seconds, the return code is set to 69.
An extended filter checks for the value of hh.mm. More information about the completion of the Extended Message Filtering Panel is available from the online help.
PROD----- Automation Services : COMMAND Macro Parameter Definition ----------- Command ===> Function=UPDATE .- Command Details -----------------------------------------------------------. | | | Command ..... SHOW ALLOC=RAMLOG01 | | | | Wait Time ... 30 Wait Time Expiry Return Code ... 69 | ’-----------------------------------------------------------------------------’ .- Response Message Analysis -------------------------------------------------. | D=Delete Extended Filter S=Extended Filter | | | | Message Text Return Extended | | Code Filter? | | N15115 RAMLOG01 ALLOCATED SOLVBSYS 0 YES |
PROD--------- Automation Services : Extended Message Filtering ---------------- Command ===> Function=UPDATE . Extended Filter Definition -------------------------------------------------. | | | Message Text .......... N15115 RAMLOG01 ALLOCATED SOLVBSYS | | | | Wildcard Character .... * | ’-----------------------------------------------------------------------------’ . Message Text Analysis ------------------------------------------------------. | | | Strt Word Scan | | Pos Num Opr Text | | 1 001 005 LT 07.00 | | 2 | | 3 | | 4 | | 5 | | | | Expression e.g (1 and (2 or 3)) | ’-----------------------------------------------------------------------------’ F1=Help F2=Split F3=OK F9=Swap F12=Cancel
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |