SASGSUB Syntax: Running a Command
The following is the complete syntax for submitting
a grid job to run a command.
Syntax
SASGSUB
-GRIDAPPSERVER sas-application-server
-GRIDRUNCMD command -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>
<-GRIDWAIT><-GRIDPASSWORD grid-logon-password>
<-GRIDPLUGINPATH grid-jar-file-path> <-GRIDRESTARTOK | -GRIDLRESTARTOK>
<-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.
- -GRIDRUNCMD command
-
specifies a command
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
it 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 GRIDWORK directory before
the job starts.
- -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.
See Supported Job Options.
- -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.
- -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 semi-colons 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.
- -GRIDWORKLOAD grid-resource-name
-
specifies a resource
name to use when submitting the job to the grid.
- -GRIDWORKREM shared-file-system-path
-
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.
- -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 the 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. |
- -VERBOSE
-
specifies that extra
debugging information is printed. If this argument is not specified,
only warning and error messages are printed.
Example: Submitting a Command
The following is an
example of a SASGSUB statement used to submit a command to the grid
to copy a set of files from the
prod
directory
to the
backup
directory:
SASGSUB -GRIDRUNCMD "cp /prod/file1.* /backup/file1.*"