Start a job

You can start, stop, validate, and reset jobs by using the -run option.

dsjob -run
[ -mode [ NORMAL | RESET | VALIDATE | RESTART ] ]
[ -param name=value ]
[ -paramfile filename ]
[ -warn n ]
[ -rows n ]
[ -wait ]
[ -stop ]
[ -jobstatus ]
[ -userstatus ]
[ -local ]
[ -opmetadata [ TRUE | FALSE ] ]
[ -disableprjhandler ]
[ -disablejobhandler ]
[ -queue ]
[ -useid ] project job | job_id
-mode
Specifies the type of job run. NORMAL starts a job run. RESET resets the job. VALIDATE validates the job. RESTART resumes a restartable job sequence from the last checkpoint by using the original job parameter values. If -mode is not specified, a normal job run is started.
-param
Specifies a parameter value to pass to the job. The value is in the format name=value, where name is the parameter name and value is the value to be set. If you use this to pass a value of an environment variable for a job (as you might do for parallel jobs), you need to use sing quotation marks with the environment variable and its value. For example, -param '$APT_CONFIG_FILE=test.apt'. Otherwise, the current value of the environment variable is used.
-paramfile
Specifies a file that contains the parameter values to pass to the job. The parameter values can be in the same format as -param, or values can be encrypted and stored in a parameter file as described in Securing credentials and parameter values in dsjob commands.
-warn n
Sets warning limits to the value specified by n (equivalent to the DSSetJobLimit function used with DSJ_LIMITWARN specified as the LimitType parameter).
-rows n
Sets row limits to the value specified by n (equivalent to the DSSetJobLimit function used with DSJ_LIMITROWS specified as the LimitType parameter).
-wait
Waits for the job to complete (equivalent to the DSWaitForJob function).
-stop
Stops a running job (equivalent to the DSStopJob function).
-jobstatus
Waits for the job to complete, then returns an exit code that is derived from the job status.
-userstatus
Waits for the job to complete, then returns an exit code that is derived from the user status if that status is defined. The user status is a string, and it is converted to an integer exit code. The exit code 0 indicates that the job completed without an error, but that the user status string was not converted. If a job returns a negative user status value, it is interpreted as an error.
-local
Use this when you are running a job from within a shell script on a UNIX system. Provided the script is run in the project directory, the job picks up the settings for any environment variables that are set in the script and any setting specific to the user environment.
-opmetadata
Use this to have the job generate operational metadata as it runs. If you specify TRUE, operational metadata is generated, whatever the default setting for the project. If you specify FALSE, the job does not generate operational metadata, whatever the default setting for the project.
-disableprjhandler
Use this to disable any error message handler that was set on a project-wide basis.
-disablejobhandler
Use this to disable any error message handler that was set for this job.
-useid
Specify this if you intend to use a job alias (jobid) rather than a job name (job) to identify the job.
-queue
The name of the workload management queue that the job is submitted to. If you do not specify a queue, the project default queue is used. If the job is a sequence job, all jobs in the sequence job are submitted to this queue.
project
The name of the project that contains the job.
job
The name of the job. To run a job invocation, use the format job.invocation_id.
job_id
An alias for the job that was set by using the dsjob -jobid command.