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.

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

Example 1:

/*------------------------------------------------------------------------*/
/* 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