You are on page 1of 3

Data_tech_talk

TUESDAY, JULY 24, 2012

Using DataStage DSjob Commands


We can start and stop jobs, and retrieve information about job runs by using the dsjob command. There is a single command, dsjob, with a large range of options. These options are described in the following topics:

The logon clause Starting a job Stopping a job Listing projects, jobs, stages, links, and parameters Setting an alias for a job Retrieving information Accessing log files

Steps to use Dsjob Command from windows Client Machine.


1. All Program Run-Type cmd , the cmd window pops ups. Type
cd /IBM/InformationServer/Clients/Classic.

2. Type dsjob, you should get the screen below

By default, the InfoSphere DataStage CLI connects to the engine on the local system using the user name and password of the user running the command.

We can specify a different domain, engine, user name, or password using the logon clause,
[-domain domain_name ][ -user username ][-password password ][-server enginename ]

For dsjob command only:


-domain NONE -user username -password password -server enginename

domain_name specifies the domain to log on to. For dsjob, you can set -domain NONE to log on to the engine rather than the domain. In this case the user name and password are for the engine, not for the domain. enginename specifies a different engine to log on to.

username specifies a different user name to use when logging on. password specifies a different password to use when logging on. If you dont give the credentials in the command line or credentials file and specify only the domain & -server options, then system will prompts for the user name and password
Example

1.

Basic Command for starting the Job 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 ] [useid] project job | job_id 2 . Stopping the jobs dsjob -stop [useid] project job|job_id C:\IBM\InformationServer\Clients\Classic>dsjob -domain <domainname> -server <servername> -user <username> -password <password> stop PROJECTNAME JOBNAME Example :-

Listing projects, jobs, stages, links, and parameters


Requirements Listing projects Listing jobs Listing jobs with specific job statuses Listing stages Listing links Listing parameters Listing invocations Command

dsjob -lprojects dsjob -ljobs project dsjob -ljobs [-status status_list] project dsjob -lstages [useid] project job|job_id dsjob -llinks [useid] project job|job_id stage dsjob -lparams [useid] project job|job_id dsjob -linvocations [useid] project job| job_id

** project is the name of the project containing the jobs to list.


status_list is a list of job status values as defined in the dsapi.h file. useid specify this if you intend to use a job alias (jobid) rather than a job name (job) to identify the job. job_id is an alias for the job that has been set using the dsjob -jobid command. job is the name of the job whose parameters are to be listed. To identify a job invocation, use the format job.invocation_id.job_id is an alias for the job that has been set using the dsjob -jobid command.

You might also like