Previous Topic: $RMCALL ACTION=PURGE

Next Topic: $RMDBAPI SERVICE=CREATE

$RMCALL ACTION=STGET

This API procedure function call retrieves information about the current status of a resource.

If you make this call from an NCL procedure, ensure that you share the &ZRMST-prefixed variables, for example, by adding the following statement before the call:

&CONTROL SHRVARS=(ZRMST)

Syntax

This API procedure function call has the following format:

$RMCALL OPT=SERVICE
        SERVICE=ACTION
        ACTION=STGET
        NAME=resource-name
        CLASS=cc
        SYSNAME=system-name
        VERSION=version

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=STGET

Specifies that status information about a resource is to be retrieved.

NAME=resource-name

Specifies the name of the resource for which status information is to be retrieved.

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 resource is defined.

VERSION=version

Specifies the version of the system image where the resource is defined.

Return Variables

This API procedure function call returns the following variables:

&SYSMSG

Contains the returned message.

&ZRMST*

Contain the returned status information about the specified resource.

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: Retrieve Status of an Internal Resource

This example retrieves status information about the internal resource (class 21) named RES001, located on version 0001 of the EASTPRD1 system:

&CALL PROC=$RMCALL +
      SHARE=(ZRMST>) +
      PARMS=(OPT=SERVICE,+
             SERVICE=ACTION,+
             ACTION=STGET,+
             NAME=RES001,+
             CLASS=21,+
             SYSNAME=EASTPRD1,+
             VERSION=0001)