Page 1 of 1

Capture Fatal error message

Posted: Sun Jan 04, 2015 5:09 pm
by ADIRBK2010
Hi,

I am looking for a better approach to solve this.


my job needs to test connectivity of databases . We have designed a job which would connect to a single database and runs a small query.
When our the parallel jobs completes we are writing the status a success to a report file and if the job Parallel job aborts we are writing status as failure. This runs in a loop for all databases.

My sequencer is restartable .

now my requirement is to add the fatal error message as part of the report file when ever the parallel job aborts.

what could be a best approach.




Thanks
RP

Posted: Mon Jan 05, 2015 1:57 am
by ArndW
The reject link coming out of your database connector can have the SQL code as a field, which you can then use to write to an error table.

Re: Capture Fatal error message

Posted: Mon Jan 05, 2015 10:26 am
by vibwipro
Hi

You Can Write a Small Server routine using "DSRunJob" command which will fetch last run Job Status and based on status you can write Message in Status Report. This routine will be embeded in Loop it self only.

Posted: Mon Jan 05, 2015 12:30 pm
by ADIRBK2010
I cannot use a Reject link for a source connector . It throws a compile time error.

IBM documentations says that its known issue that it allows to create a reject link in designer but cannot compile the same.

Posted: Mon Jan 05, 2015 2:25 pm
by chulett
You probably need to look at pulling it from the job's log using the API (the various DSGetLog* functions) depending on exactly what 'fatal error message' you are looking for.

Posted: Wed Jan 14, 2015 10:39 pm
by ADIRBK2010
I am new to Datastage and unable to write a routine in simple steps.

None of the links are giving a valid response on google.

I am not sure in which language/script the DS routines are written atleast to refer sample routines.

Someone gave a link to regularly used routines and the link is already expired.


I am not able to move ahead. Need some help

Posted: Thu Jan 15, 2015 12:20 am
by chulett
DataStage routines are written in BASIC. From what I recall, all of the routines that ship with the product include their source code which you can examine as a great learning tool. Can you clarify for us exactly what 'fatal error message' you are after, is it in fact any from the job's log that you are after, the one you've said is to test connectivity?

If so, here's a couple of posts that may help:

viewtopic.php?t=151401

viewtopic.php?t=148423

There should be plenty of others, all I did to find these was an exact search here for "dsgetlog".

Posted: Mon Mar 02, 2015 6:53 pm
by ADIRBK2010
Thank you very much guys