$RMCALL ACTION=COMMAND

Syntax

$RMCALL
OPT=SERVICE
SERVICE=ACTION
ACTION=COMMAND
[NAME=resource-name]
[CLASS=cc]
[SYSNAME=system-name]
[VERSION=version]
COMMAND=command-name
SYNC={YES | NO | NOTIFY}
[NCLID=ncl-id]
[PARMS={'parm1=value1 parm2=value2 parm3=value3...'}]

Use

Use this call to execute Automation Services commands.

Operands

Operand

Description

OPT=SERVICE

Indicates that an API service is to be performed.

SERVICE=ACTION

Indicates that an ACTION service is to be performed.

ACTION=COMMAND

Indicates that a command is to be processed.

Note: The following four operands (NAME, CLASS, SYSNAME, and VERSION) are included as operands in the API for the purpose of backward compatibility. Commands usually set these values, or prompt users for the values, depending on how the command is defined. If you do need to set these values (for example, you want to execute the command programmatically) set them through the PARMS operand. The values specified in the PARMS operand override the default values supplied by other operands.

Operand

Description

NAME=resource-name

Specifies the name of the resource to which the command applies.

CLASS=cc

Specifies the two-digit identifier of the ResourceView definition class to which the resource belongs.

SYSNAME=system-name

Specifies the name of the system image where the command is executed.

VERSION=version

Specifies the version of the system image where the command is executed.

COMMAND=
commandname

Specifies the name of the command to be executed.

SYNC={YES|NO|NOTIFY}

Specifies how the command is to be executed. The following values can be specified:

YES

The command will be executed synchronously: &RETCODE and &SYSMSG values are returned to the calling procedure.

NO

The command is executed asynchronously: results are not returned to the caller.

NOTIFY

The command is executed as for SYNC=NO but &SYSMSG values are returned to the caller's request queue in the form of $$$MSG$$$ message-text, where message-text is the contents of &SYSMSG.

NCLID=ncl-id

When SYNC=NOTIFY is specified you need to specify an NCLID so that the value of &SYSMSG can be returned to the appropriate request queue.

PARMS={'parm1=value1 parm2=value2 parm3=value3 ...'}

Use this operand to specify parameters for the command. Delimit the parameters with spaces. If you specify more than one parameter you need to enclose the parameter list in quotation marks. The following parameters can be set when executing a command (see the previous note):

 

NAME=
resource-name

The name of the resource to which the command applies.

 

CLASS=cc

The two-digit identifier of the class to which the resource belongs.

 

SYSNAME=
system-name

The name of the system image where the command is executed.

 

VERSION=version

The version of the system image where the command is executed.

 

Some commands require other parameters.

Returned Variable

Variable

Description

&SYSMSG

Contains the message returned by $RMCALL.

Return Codes

The following return codes indicate the success or failure of command processing:

&RETCODE

Meaning

0

Processing was successful.

8

Processing failed.

16

Error occurred in call syntax.

Examples

The following example shows how to execute the CHECKALL command on the local system:

&CALL   PROC=$RMCALL +
        PARMS=(OPT=SERVICE,+
               SERVICE=ACTION,+
               ACTION=COMMAND,+
               COMMAND=CHECKALL)

The following example shows how to execute the ASA command against the printer (class 11) named RES001, located on version 0001 of the EASTPRD system:

&CALL   PROC=$RMCALL +
        PARMS=(OPT=SERVICE,+
               SERVICE=ACTION,+
               ACTION=COMMAND,+
               COMMAND=ASA,+
               PARMS='SYSNAME=EASTPRD VERSION=0001 CLASS=11 NAME=RES001')


Copyright © 2010 CA. All rights reserved.