Enables or disables one or all SAS sessions on a grid.
Valid in: | %SYSFUNC or %QSYSFUNC Macro, DATA step |
Category: | Grid |
specifies one or all server sessions to be enabled or disabled for grid execution. The identifier is specified as follows:
specifies the name of a SAS/CONNECT server session to be enabled or disabled for grid execution.
Requirement | If the function is used in a DATA step, enclose server-ID in double or single quotation marks. A server-ID cannot exceed eight characters. |
specifies that all SAS sessions are enabled or disabled for grid execution.
See | SIGNON statement and RSUBMIT statement in SAS/CONNECT User's Guide |
Example | %let rc=%sysfunc(grdsvc_enable(grdnode1,server=SASApp)); %let rc=%sysfunc(grdsvc_enable(_all_,server=SASApp)); %let rc=%sysfunc(grdsvc_enable(notgrid1,"")); |
specifies the name of a SAS Application Server that has been defined in the SAS Metadata Repository. The SAS Application Server contains the definition for the logical grid server that defines the grid environment.
Alias | SERVER=, RESOURCE= |
Restriction | Although a SAS Application Server is configured as a required grid resource in most environments, some grids are not partitioned by resource names. In these environments, passing the SAS Application Server name as a required resource causes the job to fail. To find out whether the SAS Application Server is designated as a required resource value or not in the SAS Metadata Repository, use the GRDSVC_GETINFO function call. |
Interaction | The name of the SAS Application Server is passed to Platform Suite for SAS as a resource value. When the job is executed, Platform Suite for SAS selects a grid node that meets the requirements that are specified by this value. If SAS-application-server contains one or more spaces, the spaces are converted to underscores before the name is passed to Platform Suite for SAS as a resource value. |
Tip | For Platform Suite for SAS, this server-value corresponds with the value of a resource that the LSF administrator has configured in the lsf.cluster.cluster-name file and the lsf.shared file on the grid-control server. |
See | GRDSVC_GETINFO Function to find out whether the SAS Application Server is designated as a required resource value in the SAS Metadata Repository. To remove the SAS Application Server name as a required resource, see Modifying SAS Logical Grid Server Definitions. |
Example | %let rc=%sysfunc(grdsvc_enable(_all_, server=SASApp)); |
specifies the grid options set to be used when running jobs on the grid. 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.
Requirements | A grid options set must be defined in SAS Management Console before it can be used in the GRDSVC_ENABLE function. |
The grid options set name must be enclosed in quotation marks. |
identifies the resource for the job to be executed on the grid. This value specifies an additional resource requirement for which Platform Suite for SAS selects the appropriate grid nodes.
Requirement | Workload values are case sensitive. |
Interaction | If workload-value contains
one or more spaces, the spaces are converted to underscores before
the value is passed to the grid provider. If workload-value is
not located in the SAS Application Server definition and no other
errors occur, a 0 result code is returned, and this note is displayed:
NOTE: Workload value "gridResource" does not exist in the SAS Metadata Repository. |
Tip | For Platform Suite for SAS, this workload-value corresponds with the resource that the LSF administrator has configured in the lsf.cluster.cluster-name file and the lsf.shared file on the grid-control computer. |
Example | %let rc=%sysfunc(grdsvc_enable(grdnode1, server=SASApp; workload=EM));The workload value EM specifies the resource name. EM must be assigned to a grid node in order to process this job. An example is assigning EM to machines that can process SAS Enterprise Miner jobs. |
specifies the macro variable that contains the name that is assigned to the job that is executed on the grid.
Example | %let hrjob=MyJobName; %let rc=%sysfunc(grdsvc_enable(grdnode1, server=SASApp; jobname=hrjob)); signon grdnode1;In this example, hrjob is the name of the macro variable to which the job name is assigned. The actual job name is MyJobName. The status of the job can be tracked using the SAS Grid Manager Plug-in for SAS Management Console. In this example, you track the status of the job named MyJobName. |
specifies the macro variable that contains the job options. The job option name/value pairs are assigned to job-opts-macro-variable.
option-1=value-1;option-2=“value-2 with spaces"; ... option-n='value-n with spaces';
Requirement | Use a semicolon to separate job option and value pairs. For multiple values, use a macro quoting function for the semicolon or use single or double quotation marks to enclose all job options. If the value contains one or more spaces, tabs, semicolons, or quotation marks, enclose the value in single or double quotation marks. |
Example | %let rc=%sysfunc(grdsvc_enable(all, server=SASApp; jobopts=hrqueue)); %let hrqueue=queue=priority%str(;)project="HR Monthly"; signon grdnode1; %let hrqueue='queue=priority;project="HR Yearly"'; signon grdnode2Both jobs are sent to the priority queue. The first job is associated with the project named “HR Monthly” and the second job is associated with the project named “HR Yearly.” |
disables grid execution for the specified server ID or all server sessions.
Requirement | Double or single quotation marks can be used. Do not insert a space between the double or single quotation marks. |
Interaction | When quotation marks are used with _ALL_, it clears all previous grid settings that were specified using the GRDSVC_ENABLE function. |
Example | %let rc=%sysfunc(grdsvc_enable(grdnode1,"")); %let rc=%sysfunc(grdsvc_enable(_all_,'')); |