Capture Fatal error message

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ADIRBK2010
Participant
Posts: 6
Joined: Sun Jan 04, 2015 4:55 pm

Capture Fatal error message

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
vibwipro
Participant
Posts: 40
Joined: Thu Jan 24, 2013 7:34 am

Re: Capture Fatal error message

Post 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.
ADIRBK2010
Participant
Posts: 6
Joined: Sun Jan 04, 2015 4:55 pm

Post 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.
Thanks
RP
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ADIRBK2010
Participant
Posts: 6
Joined: Sun Jan 04, 2015 4:55 pm

Post 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
Thanks
RP
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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".
-craig

"You can never have too many knives" -- Logan Nine Fingers
ADIRBK2010
Participant
Posts: 6
Joined: Sun Jan 04, 2015 4:55 pm

Post by ADIRBK2010 »

Thank you very much guys
Thanks
RP
Post Reply