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 User Name
-Password
-Primary command
-Run
Invalid arguments: dsjob-run
[-Mode <normal | reset | validate>]
Normal 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