SASGSUB Syntax: Submitting a Job
The following is the complete syntax for submitting
a SAS program to a grid. Enter the command on a Windows or UNIX command
line. Argument values that contain spaces must be contained in quotes.
Syntax
SASGSUB
-GRIDAPPSERVER sas-application-server
-GRIDSUBMITPGM sas-program-file -GRIDWORK work-directory
-JREOPTIONS java-runtime-options -METASERVER server -METAUSER user-ID
-METAPORT port-METAPASS password -METAPROFILE profile-name
-METACONNECT connection-name <-GRIDCONFIG grid-option-file>
< -GRIDLICENSEFILE grid-enabled-license-file>
<-GRIDFILESIN grid-file-list> <-GRIDJOBNAME grid-program-name>
<-GRIDJOBOPTS grid-provider-options>
<-GRIDPASSWORD grid-logon-password>
<-GRIDPLUGINPATH grid-jar-file-path> <-GRIDRESTARTOK | -GRIDLRESTARTOK>
<-GRIDSTAGECMDcommand><-GRIDSTAGEFILEHOSThostname>
<-GRIDSASOPTS grid-sas-options><-GRIDWAIT> <-GRIDUSER grid-logon-username>
<-GRIDWORKLOAD grid-resource-names>
<-GRIDWORKREM shared-file-system-path>
<-LOGCONFIGLOC logging-option-file><-GRIDLIBPATH path> <-VERBOSE>
Required Arguments
- -GRIDAPPSERVER sas-application-server
-
specifies the name
of the SAS Application Server that contains the grid's logical grid
server definition. This option is stored in the configuration file
that is automatically created by the SAS Deployment Wizard.
- -GRIDSUBMITPGM sas-program-file
-
specifies the path
and filename of the SAS program that you want to run on the grid.
- -GRIDWORK work-directory
-
specifies the path
for the shared directory that the job uses to store the program, output,
and job information. On Windows, the path can contain spaces, but
must be in quotes. On UNIX, the path cannot contain spaces. This option
is stored in the configuration file that is automatically created
by the SAS Deployment Wizard.
- -JREOPTIONS java-runtime-options
-
specifies any Java
run-time options that are passed to the Java Virtual Machine. This
argument is required if you are using a grid provider other than Platform
Suite for SAS. This option is stored in the configuration file that
is automatically created by the SAS Deployment Wizard.
- -METASERVER server
-
specifies the name
or IP address of the SAS Metadata Server. You must specify either -METASERVER, -METAPORT, -METAUSER,
and -METAPASS or -METAPROFILE and -METACONNECT.
You cannot specify both groups of options. This option is stored in
the configuration file that is automatically created by the SAS
Deployment Wizard.
- -METAPORT port
-
specifies the port
to use to connect to the SAS Metadata Server specified by the -METASERVER argument. This option
is stored in the configuration file that is automatically created
by the SAS Deployment Wizard.
- -METAUSER user-ID
-
specifies the user
ID to use to connect to the SAS Metadata Server specified by the -METASERVER argument. This option
is stored in the configuration file that is automatically created
by the SAS Deployment Wizard.
- -METAPASS password |
_PROMPT_
-
specifies the password
of the user specified in the -METAUSER
argument. If the value of the argument is set to _PROMPT_, the user
is prompted for a password. This option is stored in the configuration
file that is automatically created by the SAS Deployment
Wizard.
- -METAPROFILE profile_pathname
-
specifies the pathname
of the connection profile for the SAS Metadata Server. You must specify
either -METASERVER, -METAPORT, -METAUSER, and -METAPASS
or -METAPROFILE and -METACONNECT. You cannot specify
both groups of options. This option is stored in the configuration
file that is automatically created by the SAS Deployment
Wizard.
- -METACONNECT connection-name
-
specifies the name
of the connection to use when connecting to the SAS Metadata Server.
The connection must be defined in the metadata profile specified in
the -METAPROFILE argument.
This option is stored in the configuration file that is automatically
created by the SAS Deployment Wizard.
Optional Arguments
- -GRIDCONFIG grid-option-file
-
specifies the path
and filename of a file containing other SASGSUB options. The default
value is sasgsub.cfg.
- -GRIDLICENSEFILE grid-enabled-license-file
-
specifies the path
and filename of a SAS license file that contains the SAS Grid Manager
license. The default value is to retrieve the license file information
from metadata. If specified, the location must point to a valid SID
file that contains a SAS Grid Manager license. Do not use this option
unless instructed by SAS Technical Support.
- -GRIDFILESIN grid-file-list
-
specifies a comma-separated
list of files that need to be moved to the grid work directory before
the job starts running.
- -GRIDJOBNAME grid-program-name
-
specifies the name
of the grid job as it appears on the grid. If this argument is not
specified, the SAS program name is used.
- -GRIDJOBOPTS grid-provider-options
-
specifies any options
that are passed to the grid provider when the job is submitted. You
can separate multiple options with spaces or with semicolons. If you
use spaces, you must enclose the option string in quotes.
See Supported Job Options.
- -GRIDUSER grid-logon-username
-
specifies the user
name to be used to log on to the grid, if required by the grid provider.
This option is not required if the grid uses Platform Suite for SAS.
- -GRIDPASSWORD grid-logon-password
-
specifies the password
to log on to the grid, if required by the grid provider. This option
is not required if the grid uses Platform Suite for SAS.
- -GRIDPLUGINPATH grid-jar-file-path1 ... grid-jar-file-pathN
-
specifies a list of
paths to search for additional grid provider JAR files. Paths are
separated by semicolons and cannot contain spaces. This option is
not required if the grid uses Platform Suite for SAS.
- -GRIDRESTARTOK | -GRIDLRESTARTOK
-
specifies that the
job can be restarted at a checkpoint or a label.
- -GRIDSTAGECMD command
-
specifies the remote
copy command used to stage files to the grid. Valid values are LSRCP,
RCP, SCP, or SMBCLIENT. This option is used when the grid client machines
and the grid machines do not share a common directory structure.
- -GRIDSTAGEFILEHOST hostname
-
specifies the name
of the host that stores files that are staged into the grid. This
option is used when a machine submits files to the grid and then shuts
down.
- -GRIDSASOPTS grid-sas-options
-
specifies any SAS options
that are applied to the SAS session started on the grid.
- -GRIDWAIT
-
specifies that the
SAS Grid Manager Client Utility waits until the job has completed
running, either successfully or with an error. If the job does not
complete, it must be ended manually.
- -GRIDWORKLOAD grid-resource-name
-
specifies a resource
name to use when submitting the job to the grid.
- -GRIDWORKREM shared-file-system-path
-
when using a shared
file system, specifies the pathname of the GRIDWORK directory in the
shared file system relative to a grid node. Use this argument when
the machine used to submit the job is on a different platform than
the grid. The path cannot contain spaces.
when using file staging,
specifies the location of the GRIDWORK directory as passed to the
GRIDSTAGECMD parameter. For example, Windows clients could have GRIDWORK
set to
\\myServer\myShare\SharedPath
with
the grid using LSRCP to stage files with GRIDSTAGEFILEHOST set to
myServer.mydomain.com
.
If you set Windows to map
C:\myShare
on
myServer to the Windows share
\\myServer\myShare
,
you would set GRIDWORKREM to
C:\myShare\SharedPath
.
- -LOGCONFIGLOC logging-option-file
-
specifies the path
and name of a file containing any options for the SAS logging facility.
SASGSUB uses the App.Grid logger name with these keys:
App.Grid.JobID |
specifies the job ID as returned by Platform Suite
for SAS.
|
App.Grid.JobName |
specifies the job name. |
App.Grid.JobStatus |
specifies the job status. Possible values are Submitted,
Running, or Finished.
|
App.Grid.JobDir |
specifies the job directory name. |
App.Grid.JobDirPath |
specifies the full path of job directory. |
App.Grid.JobSubmitTime |
specifies the time that the job was submitted. |
App.Grid.JobStartTime |
specifies the time that the job started running. |
App.Grid.JobEndTime |
specifies the time that the job completed. |
App.Grid.JobHost |
specifies the host that ran the job. |
- -GRIDLIBPATH path
-
the path to the shared
libraries used by the utility. This value is set in the configuration
file and should not be altered. The path cannot contain spaces.
- -VERBOSE
-
specifies that extra
debugging information is printed. If this argument is not specified,
only warning and error messages are printed.
Example: Submitting a Job to the Grid
The following is an
example of a SASGSUB statement used to submit the SAS job Lab_report.sas
in the directory
C:\SAS_programs
to
the grid. The job has been enabled for restarting, and it needs to
run in the overnight queue. The grid uses a shared file system.
SASGSUB -GRIDSUBMITPGM C:\SAS_programs\Lab_report.sas -GRIDRESTARTOK
-GRIDJOBOPTS queue=overnight