How do you capture all the errors?

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
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

How do you capture all the errors?

Post by pradeepleon »

Hi there,
Can anyone suggest me of capturing all runtime errors and logic errors of a job on a flat file?

Thanks
Pradeep
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Welcome Aboard
There are numerous error that you can encounter on a flat file using the sequential file stage. File permissions, metadata problems to name a few. I suggest spending a few hours going through file related problems on this forum.
What do you mean by logical errors though, it passed me.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

Did you mean 'How to capture them in a flat file' ?
Regards,

Nick.
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

Post by pradeepleon »

nick.bond wrote:Did you mean 'How to capture them in a flat file' ?

Yes exactly :)
Thanks,
Pradeep

(Ten Hugs And Nine KisseS - THANKS)......is that true?

In GOD we trust,for all others we take cash.
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

Post by pradeepleon »

DSguru2B wrote:Welcome Aboard
There are numerous error that you can encounter on a flat file using the sequential file stage. File permissions, metadata problems to name a few. I suggest spending a few hours going through file related problems on this forum.
What do you mean by logical errors though, it passed me.
Firstly, Thanks :)

I 'm actually asking for 'how to write all errors to a flat file'

Logic errors :Errors like a mistyped key or other outside influence might cause the application to stop working within expected parameters, or altogether.
Thanks,
Pradeep

(Ten Hugs And Nine KisseS - THANKS)......is that true?

In GOD we trust,for all others we take cash.
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

If you're just talking about getting what is produced in the dirctor log into a flat file, run an 'After Job Subroutine'

Routines\Built-In\Before/After\DSJobReport

It has instructions on how to use it in the routine description section.

If you want to get all errors detected within the job by your code, i.e. data errors, you could write these errors out to separte sequential files whereever needed within the job and then concatenate them all together after the job.
Regards,

Nick.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Whatever goes wrong with the job, it will be logged. You can get the log entries by various options of dsjob command. Namely -logsum, -logdetail, -report etc. Look into them.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

Post by pradeepleon »

nick.bond wrote:If you're just talking about getting what is produced in the dirctor log into a flat file, run an 'After Job Subroutine'

Routines\Built-In\Before/After\DSJobReport

It has instructions on how to use it in the routine description section.


If you want to get all errors detected within the job by your code, i.e. data errors, you could write these errors out to separte sequential files whereever needed within the job and then concatenate them all together after the job.
Thanks Nick !
I know these possible options.
For the latter..
you are asking me to anticipate the errors and write the code accordingly...inside the job and write that to a flat file OR
can you please explain in detail what exactly do you mean?
Thanks,
Pradeep

(Ten Hugs And Nine KisseS - THANKS)......is that true?

In GOD we trust,for all others we take cash.
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

Post by pradeepleon »

DSguru2B wrote:Whatever goes wrong with the job, it will be logged. You can get the log entries by various options of dsjob command. Namely -logsum, -logdetail, -report etc. Look into them.
Thanks!
I'm actually working on the same.
Thanks,
Pradeep

(Ten Hugs And Nine KisseS - THANKS)......is that true?

In GOD we trust,for all others we take cash.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The only tool that can capture logic errors into a text file is a text editor. Logic errors can only be solved by brainpower, perhaps using tools such as the Debugger or active stage tracing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

Post by nick.bond »

Pradeep, The errors I'm talking about capturing inside the jobs would only be data validation types of errors.

Is the field populated,
Did the lookup return a value,
Is the string too long
is the date valid
etc

These sort of errors you can code to capture.

Code: Select all

Can anyone suggest me of capturing all runtime errors and logic errors of a job on a flat file? 
The runtime errors are captured anyway by DS as discussed earlier.

what are the logic errors you are talking about. Can you provide examples?
Regards,

Nick.
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

Post by pradeepleon »

Ray/Nick,

I've figured it out. Thanks though !
Thanks,
Pradeep

(Ten Hugs And Nine KisseS - THANKS)......is that true?

In GOD we trust,for all others we take cash.
Post Reply