SASGSUB Syntax: Retrieving Job Output

The following is the syntax for using SASGSUB to retrieve the output of a job that has completed processing on a SAS grid. Enter the command on a Windows or UNIX command line.

Syntax

SASGSUB
-GRIDGETRESULTS job-id | ALL
common_arguments batch_arguments
<-GRIDRESULTSDIR directory>
<-GRIDFORCECLEAN> <-VERBOSE>

Required Arguments

-GRIDGETRESULTS job-id | ALL

Copies the job information from the work directory to the directory specified by -GRIDRESULTSDIR for the specified job-id or for all jobs. If you do not specify a value for -GRIDRESULTSDIR, the job information is copied to the current directory. An error results if the current directory cannot be written to.

common_arguments

specifies any of the arguments that are common to all uses of the SASGSUB command. Some arguments are required and some 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

-GRIDRESULTSDIR directory

specifies the directory to which the job results are moved. If you do not specify a value for this argument, the default value is used, which is the current directory.

-GRIDFORCECLEAN

specifies that the job directory on the grid is deleted, regardless of whether the job was successful or not.

Examples

Example 1: Retrieving the Output of a Job

The following is an example of a SASGSUB statement used to view the output of job 61361 that is running on the grid:
SASGSUB -GRIDGETRESULTS 61361
The output from the command looks like this:
Output of a Single Job
Current Job Information
  Job 61361 (testPgm) is Finished:  Submitted: 06Jan2011:10:53:33, Started: 06Jan2011:10:53:33 on Host d15003, Ended: 06Jan2011:10:53:33
    Moved job information to .\SASGSUB-2011-01-06_21.52.57.130_testPgm

Example 2: Retrieving the Output of All Jobs

The following is an example of a SASGSUB statement used to view the output of all jobs on the grid:
SASGSUB -GRIDGETRESULTS ALL
The output from the command looks like this:
Output of All Jobs
Current Job Information
  Job 1917 (Pgm1) is Finished:  Submitted: 08Dec2008:10:53:33, Started: 08May2011:10:53:33 on Host d15003, Ended: 08May2011:10:53:33
    Moved job information to .\SASGSUB-2011-05-06_21.52.57.130_Pgm1

  Job 1918 (Pgm2) is Finished:  Submitted: 08May2011:10:53:33, Started: 08May2011:10:53:33 on Host d15003, Ended: 08May2011:10:53:33
    Moved job information to .\SASGSUB-2011-05-06_13.13.39.167_Pgm2

  Job 1919 (Pgm3) is Finished:  Submitted: 08May2011:10:53:34, Started: 08May2011:10:53:34 on Host d15003, Ended: 08May2011:10:53:34
    Moved job information to .\SASGSUB-2011-05-06_13.16.06.060_Pgm3

  Job information in directory U:\jobs\GridSub\GridWork\user1\SASGSUB-2011-05-06_13.17.17.327_testPgm is invalid.
    Moved job information to .\SASGSUB-2011-05-06_13.17.17.327_Pgm4

  Job 1925 (Pgm4) is Submitted: Submitted: 08May2011:10:53:34