SASGSUB Syntax: Submitting a SAS Program in Batch Mode

The following is the complete syntax for submitting a SAS program to a grid in batch mode. Enter the command on a Windows or UNIX command line.

Syntax

SASGSUB
-GRIDSUBMITPGM sas-program-file
common_arguments batch_arguments
<-GRIDRESTARTOK | -GRIDLRESTARTOK>
<-GRIDSASOPTS grid-sas-options>
<grid_job_arguments>

Required Arguments

-GRIDSUBMITPGM sas-program-file

specifies the path and filename of the SAS program that you want to run on the grid.

common_arguments

specifies any of the arguments that are common to all uses of the SASGSUB command. Some arguments are required and some arguments are optional. See SASGSUB Syntax: Common Arguments for the syntax for each argument.

batch_arguments

specifies any of the arguments that are common to all SASGSUB commands that run in batch mode. Some arguments are required and some are optional. See SASGSUB Syntax: Batch Options for the syntax for each argument.

Optional Arguments

-GRIDRESTARTOK | -GRIDLRESTARTOK

specifies that the job can be restarted at a checkpoint or a label.

-GRIDSASOPTS grid-sas-options

specifies any SAS options that are applied to the SAS session started on the grid. Multiple options can be enclosed in quotation marks. If you are specifying options that contain quotation marks, you can enclose all of the options in parentheses before enclosing them in quotation marks. Each of these forms is valid:

GRIDSASOPTS option
GRIDSASOPTS “option1 option2
GRIDSASOPTS “(option1 option2 option3)”
GRIDSASOPTS “(option1 option2option3’)”
When SASGSUB runs, the outer set of quotation marks is removed.

grid_job_arguments

specifies any of the arguments valid when submitting jobs or commands to the grid. See SASGSUB Syntax: Grid Job Arguments for the syntax for each of these arguments.

Example: Submitting a SAS Program to the Grid in Batch Mode

The following is an example of a SASGSUB statement used to submit the SAS program Lab_report.sas in the directory C:\SAS_programs to the grid in batch mode. 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