Previous Topic: $REDBAPI API

Next Topic: Supplied Commands That Require Parameters

$RMCALL ACTION=COMMAND

This API procedure function call executes Automation Services commands.

Syntax

This API procedure function call has the following format:

$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...’}]

Operands

This API procedure function call has the following operands:

OPT=SERVICE

Specifies that an API service is to be performed.

SERVICE=ACTION

Specifies that an ACTION service is to be performed.

ACTION=COMMAND

Specifies that a command is to be processed.

Note: The 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.

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

Specifies that the command is executed synchronously. &RETCODE and &SYSMSG values are returned to the calling procedure.

NO

Specifies that the command is executed asynchronously. Results are not returned to the caller.

NOTIFY

Specifies that 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

(SYNC=NOTIFY) Specifies an NCL ID so that the value of &SYSMSG can be returned to the appropriate request queue.

PARMS={‘parm1=value1 parm2=value2 parm3=value3 ...’}

Specifies 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

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

CLASS=cc

Specifies the two-digit identifier of the 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.

Some commands require other parameters.

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: Execute the CHECKALL Command

This example executes the CHECKALL command on the local system:

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

Example: Execute the ASA Command

This example executes 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')