I want to get the datastage job log. Then reformat it and write to another log file. I have tried to use dsjob -logsum -fatal but it returns not only the last job run result. How can I get only the last job run log?
Identifying the Newest Entry The following syntax displays the ID of the newest log entry of the
specified type:
dsjob –lognewest [useid] project job|job_id type
useid specify this if you intend to use a job alias (jobid) rather than a job name (job) to identify the job.
project is the project containing job.
job is the job whose log entries are to be retrieved. 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
type can be one of the following options:
INFO Information
WARNING Warning
FATAL Fatal error
REJECT Rejected rows from a Transformer stage
STARTED Job started
RESET Job reset
BATCH Batch
This syntax is equivalent to the DSGetNewestLogId function.
1. get the last fatal event id before the job run
2. get the last fatal event id after the job run
3. use logdetail to get all the job logs between these 2 event ids ?
but logdetail can't control the message type I get, i.e. only fatal error message