Continued from dsjob - Managing Datastage Jobs from Command Line #1
Listing Projects, Jobs, Stages, Links, and Parameters :
We can list projects, jobs, stages, links, and job parameters using the
dsjob command. The different versions of the syntax are described in
the following sections.
The following syntax works for listing information about a Datastage job as below:
- dsjob –lprojects ---List of all projects
- dsjob –ljobs project ---List of all Jobs under a project
- dsjob –lstages [useid] project job|job_id --- List of all stages in a job
2. job name (job) to identify the job.
3. project is the name of the project containing job.
4. job is the name of the job containing the stages to list. To identify a
5. job invocation, use the format job.invocation_id.
6. job_id is an alias for the job that has been set using the dsjob -jobid
7. command
- dsjob –links [useid] project job|job_id stage --- List of the links within a job design
2. job name (job) to identify the job.
3. project is the name of the project containing job.
4. job is the name of the job containing stage. To identify a job
5. invocation, use the format job.invocation_id.
6. job_id is an alias for the job that has been set using the dsjob -jobid
7. stage is the name of the stage containing the links to list.
- dsjob –lparams [useid] project job|job_id ---List of all parameters used within a Job
Setting an Alias for a Job:
The dsjob command can be used to specify own ID for a
DataStage job.Other commands can then use that alias to refer to the
job.
Syntax: dsjob –jobid [my_ID] project job
Explanations of the available options
- my_ID is the alias we want to set for the job. If we omit my_ID, the command will return the current alias for the specified job. An alias must be unique within the project, if the alias already exists an error message is displayed project is the name of the project containing job.
- job is the name of the job. To identify a job invocation, use the format job.invocation_id
Retrieving Information:
The dsjob command can be used to retrieve and display the available information about specific projects, jobs, stages, or links. The different
versions of the syntax are described in the following sections.
Displaying Job Information
Syntax: dsjob –jobinfo [useid] project job|job_id
Explanations of the available options:
- useid specify this if we intend to use a job alias (jobid) rather than a job name (job) to identify the job.
- project is the name of the project containing job.
- job is the name of the job. To identify a job invocation, use the format job.invocation_id.
The following information is displayed:
- The current status of the job
- The name of any controlling job for the job
- The date and time when the job started
- The wave number of the last or current run (internal DataStage reference number)
- User status
Displaying Stage Information:
Syntax: dsjob –stageinfo [useid] project job|job_id stage
Explanations of the available options:
- useid specify this if we intend to use a job alias (jobid) rather than a
- job name (job) to identify the job.
- project is the name of the project containing job.
- job is the name of the job containing stage. 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.
- stage is the name of the stage.
The following information is displayed:
- The last error message reported from any link to or from the stage
- The stage type name, for example, Transformer or Aggregator
- The primary links input row number
Displaying Link Information:
Syntax: dsjob –linkinfo [useid] project job|job_id stage link
Explanations of the available options:
- useid specify this if we intend to use a job alias (jobid) rather than a
- job name (job) to identify the job.
- project is the name of the project containing job.
- job is the name of the job containing stage. 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.
- stage is the name of the stage containing link.
- link is the name of the stage.
The following information is displayed:
- The last error message reported by the link
- The number of rows that have passed down a link
Accessing Log Files:
Adding a Log Entry
Syntax: dsjob –log [–info | –warn] [useid] project job|job_id
Explanations of the available options:
- info specifies an information message. This is the default if no log entry type is specified.
- -warn specifies a warning message.
- useid specify this if we intend to use a job alias (jobid) rather than a
- job name (job) to identify the job.
- project is the name of the project containing job.
- job is the name of the job that the log entry refers to. 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.
Displaying a Short Log Entry
Syntax: dsjob –logsum [–type type] [ –max n ] [useid] project job|job_id
type specifies the type of log entry to retrieve.
If –type is not specified, all the entries are retrieved.
Importing Job Executables:
The dsjob command can be used to import job executables from a
DSX file into a specified project.
Syntax: dsjob –import project DSXfilename [-OVERWRITE] [-JOB[S] jobname …] |[-LIST]
- DSXfilename is the DSX file containing the job executables.
- -OVERWRITE specifies that any existing jobs in the project with the same name will be overwritten.
- -JOB[S] jobname specifies that one or more named job executables should be imported (otherwise all the executable in the DSX file are imported).
- -LIST causes DataStage to list the executables in a DSX file rather than import them.
Generating a Report:
The dsjob command can be used to generate an XML format report
containing job, stage, and link information.
Syntax: dsjob –report [useid] project job|job_id [report_type]
Report_type is one of the following:
BASIC – Text string containing start/end time, time elapsed and status of job.
DETAIL – As basic report, but also contains information about individual stages and links within the job.
LIST – Text string containing
Examples are available HERE
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://groups.google.com/forum/#!forum/datagenx
No comments:
Post a Comment