SoFunction
Updated on 2025-03-10

datastage server job dsjob command

The job of Datastage can use the dsjob command to call the job or obtain the job information, as well as the running reports and logs.
In the directory where DataStage is installed, for example, C:\Ascential\DataStage\Engine\bin>
The syntax of dsjob is as follows:
Command Syntax:
dsjob [-file <file> <server> | [-server <server>][-user <user>][-passwod <password>]]
<primary command> [<arguments>]
Valid primary command options are:
-run run job
-stop stop running job
-lprojects List all projects in the server
-ljobs List all jobs in the specified project
-linvocations lists all invocations in the specified job
-lstages List all stages in the specified job
-links List all links in the specified job
-projectinfo Lists information about the specified project
-jobinfo lists the information of the specified job
-stageinfo lists the information of the specified stage
-linkinfo Lists information about the specified link
-lparams List all parameters of the specified job
-paraminfo Lists information for the specified parameter
-log Get all logs of the job
-logsum Get all logs of the job
-logdetail Get the detailed log of the job
-lognewest
-report Get the detailed log of the job
-jobid
I looked for the parameters of -file, but I couldn't find any good explanation. I hope the expert can explain it.
-server datastage project name
-user User Name
-password Password
-primary command



-run
Invalid arguments: dsjob -run
[-mode <NORMAL | RESET | VALIDATE>]
NORMAL runs normally
RESET reset
VALIDATE Verify whether the job is feasible
[-param <name>=<value>]
Set variable value
[-warn <n>]
warn Warn how many records the job stops running after
[-rows <n>]
rows How many records have been run? job stops running after the job is running
[-wait]
How long does it take to stop running?
[-opmetadata <TRUE | FALSE>]
[-disableprjhandler]
[-disablejobhandler]
[-jobstatus]
Jobstatus running status
[-userstatus]
[-useid]
<project> <job|jobid>
1 dsjob -server 10.240.12.67 -user -password Yanzhang0717 -run -mode NORMAL sysup1_MPHASIS_1 Sequential
The easiest run
2 C:\Ascential\DataStage\Engine\bin>dsjob -server 10.240.12.67 -user -password Yanzhang0717 -run -mode NORMAL -jobstatus sysup1_MPHASIS_1 Sequential
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1
3 C:\Ascential\DataStage\Engine\bin>dsjob -server 10.240.12.67 -user -password Yanzhang0717 -run -mode NORMAL -param input= -param output= -j
obstatus sysup1_MPHASIS_1 Sequential
Waiting for job...
Finished waiting for job
Job Status : (1)
Status code = 1

-stop
Invalid arguments: dsjob -stop [-useid] <project> <job|jobid>
Stop running job
-lprojects
List all jobs in server
C:\Ascential\DataStage\Engine\bin>dsjob -server 10.240.12.67 -user -password Yanzhang0717 -lprojects
Empty
Study
sysup1_MPHASIS
sysup1_MPHASIS_1
sysup1_MPHASIS_2
sysup1_MPHASIS_3
tttt
up_20090204
yes
Status code = 0

-lprojects
-ljobs
-linvocations
-lstages
-llinks
-lparams
Functions and usage are similar to -lprojects
-projectinfo Get project information
C:\Ascential\DataStage\Engine\bin>dsjob -projectinfo sysup1_MPHASIS_1
Host Name : 10.240.12.67
Project Name : sysup1_MPHASIS_1
Status code = 0

-jobinfo
C:\Ascential\DataStage\Engine\bin>dsjob -jobinfo sysup1_MPHASIS_1 Sequential
Job Status : RUN OK (1)
Job Controller : not available
Job Start Time : Mon Jul 06 15:04:33 2009
Job Wave Number : 3
User Status : not available
Job Control : 0
Interim Status : NOT RUNNING (99)
Invocation ID : not available
Last Run Time : Mon Jul 06 15:04:42 2009
Job Process ID : 0
Invocation List : Sequential
Status code = 0

-linkinfo
-paraminfo
Same as getting project and job information
-report
Get a report on the job run
C:\Ascential\DataStage\Engine\bin>dsjob –report
Invalid arguments: dsjob -report [-useid] <project> <job|jobid> [report type>]
report type = BASIC | DETAIL | XML



C:\Ascential\DataStage\Engine\bin>dsjob -report sysup1_MPHASIS_1 Sequential BASIC
**************************************************
ジョブのステータスレポート: Sequential
Date of completion: 2009-07-06 15:26:27
The beginning moment = 2009-07-06 15:04:33
The end of time = 2009-07-06 15:04:42
Time of jiョブmouth = 00:00:09
ジョブスㆼタス = 1 (normal)
Status code = 0

C:\Ascential\DataStage\Engine\bin>dsjob -report sysup1_MPHASIS_1 Sequential DETAIL
**************************************************
ジョブのステータスレポート: Sequential
Date of completion: 2009-07-06 15:27:00
The beginning moment = 2009-07-06 15:04:33
The end of time = 2009-07-06 15:04:42
Time of jiョブmouth = 00:00:09
ジョブスㆼタス = 1 (normal)
スㆼジ: Sequential_File_1.IDENT1, number of action 7768800
ス�ージ The beginning moment = 2009-07-06 15:04:36, the end moment = 2009-07-06 15:04:41, the last moment
Past time = 00:00:05
リンク: DSLink2, number of lines 7768800
リンク: DSLink2, number of lines 7768800
Status code = 0

C:\Ascential\DataStage\Engine\bin>dsjob -report sysup1_MPHASIS_1 Sequential XML
<?xml version="1.0" encoding="UTF-8"?>
<Job Name="Sequential"
Desc=""
Status="1"
WaveNo="3"
StartDateTime="2009-07-06T15:04:33"
EndDateTime="2009-07-06T15:04:42"
ElapsedTime="00:00:09"
ElapsedSecs="9">
<ParamSet>
<Param Name="input"
Type="0"
Desc=""
Value=""/>
<Param Name="output"
Type="0"
Desc=""
Value=""/>
</ParamSet>
<ComponentSet>
<Stage Name="Sequential_File_1.IDENT1"
StageStatus="2"
StageType="CTransformerStage"
Desc=""
StartDateTime="2009-07-06T15:04:36"
EndDateTime="2009-07-06T15:04:41"
ElapsedTime="00:00:05"
ElapsedSecs="5">
<InputLinks>
<Link Name="DSLink2"
LinkType="1"
Desc=""
Stage="Sequential_File_0"/>
</InputLinks>
<OutputLinks>
<Link Name="DSLink2"
LinkType="3"
Desc=""
Stage="Sequential_File_0"/>
</OutputLinks>
<InstanceSet>
<Instance Id=""
CPU="3.25"
PID="6008">
<Link Name="DSLink2"
RowCount="7768800"/>
<Link Name="DSLink2"
RowCount="7768800"/>
</Instance>
</InstanceSet>
</Stage>
</ComponentSet>
</Job>
Status code = 0
Log operations
-log Write logs to the specified job
C:\Ascential\DataStage\Engine\bin>dsjob -log
Invalid arguments: dsjob -log
[-info | -warn]
<project> <job>
Log message is read from stdin.

-logsum
Invalid arguments: dsjob -logsum
[-type <INFO | WARNING | FATAL | REJECT | STARTED | RESET | BATCH>]
[-max <n>]
[-useid]
<project> <job|jobid>
Get information about the runtime job
Max gets the most recent record
C:\Ascential\DataStage\Engine\bin>dsjob -logsum -type INFO -max 10 sysup1_MPHAS
IS_1 Sequential
40 INFO Mon Jul 06 15:01:34 2009
Sequential..Sequential_File_1: プロジェクト デフォルト NLS マップ JPN-SJ
IS uses
41 INFO Mon Jul 06 15:01:34 2009
ステージ Sequential..Sequential_File_1.IDENT1 のConciseをIt's overしました。
44 INFO Mon Jul 06 15:04:33 2009
Settings of the environment: (...)
45 INFO Mon Jul 06 15:04:33 2009
Sequential: NLS National Security News JP-JAPANESE, JP-JAPANESE, JP-JAPANESE, JP-JAPANESE, JP-JAPANE
SE,JP-JAPANESEへ Settings
46 INFO Mon Jul 06 15:04:34 2009
Sequential..Sequential_File_1.IDENT1: アクティブ ステージを
Start 〗ています. トレースモード = 0.
47 INFO Mon Jul 06 15:04:34 2009
Sequential..Sequential_File_1.IDENT1: NLS National Security Newsletter JP-JAPANESE,JP-JAPA
NESE, JP-JAPANESE, JP-JAPANESE, JP-JAPANESEへ Settings
48 INFO Mon Jul 06 15:04:34 2009
Sequential..Sequential_File_0: プロジェクト デフォルト NLS マップ JPN-SJ
IS uses
49 INFO Mon Jul 06 15:04:34 2009
Sequential..Sequential_File_1: プロジェクト デフォルト NLS マップ JPN-SJ
IS uses
50 INFO Mon Jul 06 15:04:41 2009
Sequential..Sequential_File_1.IDENT1: アクティブ ステージを
Finally. (...)
52 INFO Mon Jul 06 15:32:32 2009
dd (...)
Status code = 0
-logdetail
C:\Ascential\DataStage\Engine\bin>dsjob -logdetail
Invalid arguments: dsjob -logdetail [-useid] <project> <job|jobid> <first event
id> [<last event id>]
first event id first log id
last event id Last log id
If the last event id is empty, the default is the first event id details
C:\Ascential\DataStage\Engine\bin>dsjob -logdetail sysup1_MPHASIS_1 Sequential 1
0 11
Event Id: 10
Time : Mon Jul 06 14:38:07 2009
Type : STARTED
User : MPHASISORTC\
Message :
ジョブ Sequential をリセットしています。
Event Id: 11
Time : Mon Jul 06 14:38:07 2009
Type : INFO
User : MPHASISORTC\
Message :
ステージ Sequential..Sequential_File_1.IDENT1 をリセットしています。
-lognewest Get the last log id of the specified log type
C:\Ascential\DataStage\Engine\bin>dsjob -lognewest
Invalid arguments: dsjob -lognewest [-useid] <project> <job|jobid> [<event type>
]
event type = INFO | WARNING | FATAL | REJECT | STARTED | RESET | BATCH

C:\Ascential\DataStage\Engine\bin>dsjob -lognewest sysup1_MPHASIS_1 Sequential
INFO
Newest id = 52
Status code = 0