Datastage jobs can use dsjob commands to call jobs or obtain job information, as well as running reports and logs.
Under the directory where DataStage is installed, for example, C: \ Ascential \ DataStage \ Engine \ bin>
The dsjob syntax is as follows:
Command Syntax:
Dsjob [-file <file> <server> | [-server <server>] [-user <user>] [-passwod <password>]
<Primary command> [<arguments>]
Valid primary command options are:
-Run the job
-Stop: stop a running job.
-Lprojects: list all projects on the server
-Ljobs: list all jobs in a specified project
-Linvocations: list all invocations in a specified job
-Lstages: list all stages in a specified job
-Llinks: list all links in a specified job
-Projectinfo: lists information about a specified project.
-Jobinfo: lists information about a specified job.
-Stageinfo: lists information about a specified stage.
-Linkinfo: lists information about a specified link.
-Lparams: Lists All parameter values of a specified job.
-Paraminfo: lists information about a specified parameter.
-Log: obtain all logs of a job.
-Logsum: obtain all logs of a job.
-Logdetail: Obtain the detailed logs of the job.
-Lognewest
-Report: Obtain the detailed logs of the job.
-Jobid
-I have searched for the file parameter and have not found any good explanation. Hope you can explain it.
-Server datastage project name
-User Name
-Password
-Primary command
-Run
Invalid arguments: dsjob-run
[-Mode <NORMAL | RESET | VALIDATE>]
NORMAL operation
RESET
VALIDATE whether the job is feasible
[-Param <name >=< value>]
Set variable value
[-Warn <n>]
After the number of logs warned by warn, the job stops running.
[-Rows <n>]
After the number of records that rows have run, the job stops running.
[-Wait]
How long does wait to stop running?
[-Opmetadata <TRUE | FALSE>]
[-Disableprjhandler]
[-Disablejobhandler]
[-Jobstatus]
Jobstatus status
[-Userstatus]
[-Useid]
<Project> <job | jobid>
1 dsjob-server 10.240.12.67-user peace. zhao-password Yanzhang0717-run-mode NORMAL sysup1_MPHASIS_1 Sequential
Simplest operation
2 C: \ Ascential \ DataStage \ Engine \ bin> dsjob-server 10.240.12.67-user peace. zhao-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 peace. zhao-password Yanzhang0717-run-mode NORMAL-param input00007.txt-param output00008.txt-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 a running job
-Lprojects
List all the jobs in the server
C: \ Ascential \ DataStage \ Engine \ bin> dsjob-server 10.240.12.67-user peace. zhao-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
Features and usage are similar to-lprojects
-Projectinfo: obtain 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 obtaining project and job information
-Report
Obtain the job running report
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
**************************************** **********
When there are too many other than just two seconds before there are too many other than: Sequential
Creation date: 15:26:27
Starting time = 15:04:33
When the time has elapsed = 15:04:42
Too many bytes elapsed time = 00:00:09
Too many bytes have been transferred too many = 1 (normal crashes)
Status code = 0
C: \ Ascential \ DataStage \ Engine \ bin> dsjob-report sysup1_MPHASIS_1 Sequential DETAIL
**************************************** **********
When there are too many other than just two seconds before there are too many other than: Sequential
Creation date: 15:27:00
Starting time = 15:04:33
When the time has elapsed = 15:04:42
Too many bytes elapsed time = 00:00:09
Too many bytes have been transferred too many = 1 (normal crashes)
Sequential_File_1.IDENT1. The number of inputs is 7768800.
Starting time = 15:04:36, starting time = 15:04:41, loading
Time = 00:00:05
Too many rows: DSLink2, and 7768800 rows
Too many rows: DSLink2, and 7768800 rows
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 = "7.txt"/>
<Param Name = "output"
Type = "0"
Desc = ""
Value = "8.txt"/>
</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 = "1, 3.25"
PID = "6008">
<Link Name = "DSLink2"
RowCount = "7768800" type = "codeph" text = "codeph"/>
<Link Name = "DSLink2"
RowCount = "7768800" type = "codeph" text = "codeph"/>
</Instance>
</InstanceSet>
</Stage>
</ComponentSet>
</Job>
Status code = 0
Log operations
-Log: writes logs to a 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>
Obtain the job information during running.
Max gets the latest 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
IS using zookeeper
41 INFO Mon Jul 06 15:01:34 2009
Sequential_File_1.IDENT1 has been completed successfully.
44 INFO Mon Jul 06 15:04:33 2009
Preset number of regions :(...)
45 INFO Mon Jul 06 15:04:33 2009
Sequential: NLS country sensitive region JP-Japan, JP-Japan, JP-JAPANE
SE, JP-japan ese Parameters
46 INFO Mon Jul 06 15:04:34 2009
Sequential... Sequential_File_1.IDENT1
Start to renew your subscription. There are too many other than 0.
47 INFO Mon Jul 06 15:04:34 2009
Sequential... Sequential_File_1.IDENT1: NLS country case when JP-Japan, JP-JAPA
NESE, JP-Japan
48 INFO Mon Jul 06 15:04:34 2009
Sequential... Sequential_File_0
IS using zookeeper
49 INFO Mon Jul 06 15:04:34 2009
Sequential... Sequential_File_1
IS using zookeeper
50 INFO Mon Jul 06 15:04:41 2009
Sequential... Sequential_File_1.IDENT1
Has been removed. (...)
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 the first log id
Last event id the last log id
If the last event id is null, the first event id is used by default.
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 \ peace. zhao
Message:
When there are already Sequential commandid there are too many commandid too many requests.
Event Id: 11
Time: Mon Jul 06 14:38:07 2009
Type: INFO
User: MPHASISORTC \ peace. zhao
Message:
Sequential_File_1.IDENT1 has already been used.
-Lognewest: Obtain 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