Capturing detail information of job in other category

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Capturing detail information of job in other category

Post by 47shailesh »

In many cases jobs are called by Batch, sometimes jobs(in other category) get aborted due to many reasons like locks on some table, some ORA error.. etc

Is there some way to get exact reason of job failure how that can be implement in the Batch.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It usually gets logged, so you can include calls to DSGetLogSummary, DSGetNewestLogId and DSGetLogEntry to retrieve the same.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

Being in Batch how could i use DSGetLogSummary as i do not know the eventid of job(in some other category) that has failed.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You know the job name. You can attach that job and use the requisite functions to interrogate its log. Don't forget to detach the job before exiting from your routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Capturing detail information of job in other category

Post by sachin1 »

hello i am new to datastage, but below process is followed by department.

for batch file you may be using DSExecute.exe with parameter as job name.

in this job, go to job-properties-->job-control. in job-control write your code which will use following routines like

DSAttachJob
DSRunJob
DSGetLogSummary
DSDetachJob

you can find help and code for above routines in built-in help of datastage.

then you can execute this job and catch a log. you can get all types of error logged.
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

Thankx Ray, Your suggestion sovled my problem :P , but know there is new problem, whatever error reason is stored in a variable and passed to the a job that insert it (error) in a table.

Obstacle comes when job pass the parameter(which have stored error message) throgh the transformer job get aborted as the "identifier becomes too long" becuase the error message is in detail(paragraph),
Do you have any suggestion to resolve this problem.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a bigger data type - maybe VarChar(4096)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
47shailesh
Participant
Posts: 60
Joined: Tue Aug 29, 2006 11:14 pm

Post by 47shailesh »

How to use datatype other(bigger) than that in DataStage's Varchar becuause in the source stage itself when i click on "view data" i encounter "identifier too long error".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Identifier" is usually the column or table name, not the text value itself. In DataStage you can set VarChar up to 65535. The restriction, however, may be in the data browser itself rather than in the database connection - post the full error message, which should indicate its source.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply