GRDSVC_GETINFO Function

Reports information about the grid environment.

Valid in: %SYSFUNC or %QSYSFUNC Macro, DATA step
Category: Grid

Syntax

grdsvc_getinfo(identifier)

Required Argument

identifier

specifies the server session or the SAS Application Server whose details you want to have reported to the SAS log.

The identifier is specified as follows:

server-ID

reports details about the specified server ID. The details that are returned by the GRDSRV_INFO function reflect the arguments that are specified in the GRDSVC_ENABLE function. You can request details about a server-ID that you have used to create a server session or that you will use to create a server session on the grid.

Requirement A server-ID cannot exceed eight characters.

_ALL_

reports details about all server IDs to the SAS log. The details that are returned by the GRDSRV_INFO function reflect the arguments that are specified in the GRDSVC_ENABLE function.

SASAPPSERVER=SAS-application-server

reports information about the specified SAS Application Server to the SAS log.

Alias SERVER=, RESOURCE=

_SHOWID_

lists each server session and its status: enabled for grid execution, enabled for SMP execution, or disabled.

Interaction If the GRDSVC_GETINFO function is used in a DATA step, enclose the identifier in single or double quotation marks. The identifier can be specified as server-ID, _ALL_, SASAPPSERVER=SAS-application-server, or _SHOWID_. If no grid processes were enabled using the GRDSRV_ENABLE function or if all grid processes were disabled using the GRDSVC_ENABLE function with _ALL_ option, this message is displayed:
NOTE: No remote session ID enabled/disabled for the grid service.
Tip You do not have to be signed on to a specific server session in order to get information about it.
Example This log message reports that the SAS Application Server is a required resource.
%put
%sysfunc(grdsvc_getinfo(server=SASApp)); 
NOTE: SAS Application Server Name= SASAPP
            Grid Provider=   Platform
            Grid Workload=   gridwrk
            Grid SAS Command=   gridsasgrid
            Grid Options=   gridopts
            Grid Server Addr=   d15003.na.sas.com
            Grid Server Port=   123
            Grid Module=   gridmod
            Server name is a required grid resource value.
If the SAS Application Server is a disabled required resource, this message is displayed:
Server name is not a required grid resource value.

Optional Arguments

CLIENTAPP=”client_application

returns information about the grid options set associated with the specified application. The information returned includes the grid options, SAS options, and required resources that are specified in the grid options set and are associated with the specified application.

GRIDOPTSET=”grid_options_set_name

returns information about the specified grid options set. A grid options set is a collection of grid options, SAS options, and required resources that are associated with a particular SAS client application. The purpose of a grid options set is to enable a SAS grid administrator to define a collection of options in SAS metadata. These options will map to one or more SAS client applications and will be applied to workload submitted to the grid.

Requirement The grid options set name must be enclosed in quotation marks.
Example This example returns information about the grid options set “OptionsSet1.”
%put %sysfunc(grdsvc_getinfo(server=CNTWin;gridoptset="OptionsSet1"));
NOTE: SAS Application Server Name= CNTWin
      Grid Provider=               Platform
      Grid Workload=               idbvm1, idbvm2, idbvm3
      Grid SAS Command=            gridsas
      Grid Server Addr=            rlsgrid.mycorp.com
      Grid Required Resources=     <none>
      Grid SAS options=            -set GAOvar OptionsSet1

Details

Here are the result codes:
GRDSVC_GETINFO Function Return Codes
Result Code
Explanation
2
Reports that the specified server ID is not enabled for grid execution.
1
Reports that the specified server ID is enabled for SMP execution.
0
Reports that the specified server ID is enabled for a grid execution or that no error occurred.
-1
Reports a syntax error in the function call. An example is that an empty string is specified for the server ID.
-2
Reports a parsing error in the function call. An example is the failure to specify the SAS Application Server using the SASAPPSERVER= option.
-3
Reports an invalid server ID in the function call.
-5
Reports an out-of-memory condition while the function is executing.
-6
Reports that an error occurred when the SAS Metadata Server was accessed or when the information was returned from the SAS Metadata Server.

Example

/*------------------------------------------------------------------------*/
/* Show grid logical server definition for SAS Application Server 'SASApp'*/  
/*------------------------------------------------------------------------*/   
%let rc=%sysfunc(grdsvc_getinfo(sasappserver=SASApp));    
/*------------------------------------------------------------------------*/   
/* Show grid information about server session ID 'task1'                  */   
/*------------------------------------------------------------------------*/   
%let rc=%sysfunc(grdsvc_getinfo(task1));    
/*------------------------------------------------------------------------*/   
/* Show server session information for all server sessions                */   
/*------------------------------------------------------------------------*/   
%let rc=%sysfunc(grdsvc_getinfo(_ALL_));    
/*------------------------------------------------------------------------*/   
/* Show all server session IDs that are either grid-enabled or            */   
/* grid-disabled                                                          */   
/*------------------------------------------------------------------------*/   
%let
rc=%sysfunc(grdsvc_getinfo(_SHOWID_));

See Also

RSUBMIT statement
SAS/CONNECT User's Guide
SIGNON statement
SAS/CONNECT User's Guide
DATA step
SAS Language Reference: Dictionary
%SYSFUNC or %QSYSFUNC
SAS Macro Language: Reference