Defining and Specifying Resources

Overview

Defining resources enables you to specify where jobs are run on the grid. You can define resource names on grid nodes, and then specify those same resource names on jobs that are sent to the grid. The resource names that are specified on grid machines indicate a specific program or resource that the grid job might need (for example, a machine that has SAS/STAT installed on it or a machine that has access to a Teradata machine), so you can direct specific types of work to the nodes that are most appropriate for processing them.
By default, when a job is sent to the grid, the name of the SAS Application Server is sent as a resource name along with the job. You can further specify the type of machine used to run a job by specifying the WORKLOAD= parameter on the GRDSVC_ENABLE call.
For example, assume that you have installed and configured a grid that uses the application server name of SASApp. You now want to specify that SAS Data Integration Studio jobs should run on certain machines in the grid. To make this happen, follow these steps:
  1. Create a resource name of DI for SAS Data Integration Studio jobs. (DI is only an example; you can use any user-defined string.)
  2. Assign the resource names DI and SASApp to the machines that you want to use for processing SAS Data Integration Studio jobs.
  3. Add the value DI to the Required Resources field for a grid options set definition that also specifies SAS Data Integration Studio in the SAS Application field.
  4. When you send a job to the grid using SAS Data Integration Studio, the job is automatically sent to the DI workload, which sends the job to one of the machines with SASApp as a resource name and DI as a resource name. If there are no grid servers with resource names that match the value on the job, the job is not processed.
    If you did not use a grid options set, you would have to manually choose the workload named DI in the Loop Properties window in SAS Data Integration Studio.

Defining Resource Names Using Addresource

SAS Grid Manager provides the addresource command to define hosts and resources. To use this command to specify resource names, follow these steps:
  1. Log on to the grid control machine as the LSF administrator.
  2. If you are on UNIX, source the LSF profile file and verify that the PATH is correct.
  3. Issue the command addresource -r <resource_name> -m <machine_name>. If the machine_name contains spaces, you must change the spaces to underscores.
    For example, the command addresource -r DI -m D1234 assigns the resource name DI to the machine D1234.
  4. Run the LSF commands to reconfigure the grid to recognize the new resources.

Specifying Resource Names Using GRDSVC_ENABLE

You can use the GRDSVC_ENABLE function to specify resource names for jobs that run on the grid. Use the SERVER= option to specify a resource to use if the specified grid server has specified a required resource. For more information, see GRDSVC_ENABLE Function.

Specifying Resource Names Using the SAS Grid Manager Client Utility

If you specify required resources in the metadata definition for a SAS Application Server, you can use the SAS Grid Manager Client Utility to specify that those resources are used. Specify the -GRIDAPPSERVER option to specify the SAS Application server to use. For more information, see SASGSUB Syntax: Submitting a SAS Program in Batch Mode.

Specifying Resource Names in SAS Data Integration Studio

In order to specify the resource name for SAS Data Integration Studio jobs, you must complete these tasks:
  • Add the resource name as an allowed value for the logical grid server to which you send jobs.
  • Specify the workload that corresponds to the resource name in the loop transformation properties.
To add the resource name to the logical grid server metadata's Workload values, see Modifying SAS Logical Grid Server Definitions.
To specify the workload value in SAS Data Integration Studio, follow these steps:
  1. On the SAS Data Integration Studio menu bar, select Toolsthen selectOptions, and then select the SAS Server tab on the Options dialog box.
  2. Select the SAS grid server in the Server field.
  3. Select the workload to use for the submitted jobs in the Grid workload specification field.
You can also specify the resource name through a grid options set, either on GRDSVC_ENABLE or by using the GRIDOPTSET parameter on the SAS Grid Manager Client Utility.