Page 1 of 1

How do you capture all the errors?

Posted: Fri Apr 27, 2007 12:06 pm
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

Posted: Fri Apr 27, 2007 12:33 pm
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.

Posted: Fri Apr 27, 2007 1:32 pm
by nick.bond
Did you mean 'How to capture them in a flat file' ?

Posted: Fri Apr 27, 2007 1:36 pm
by pradeepleon
nick.bond wrote:Did you mean 'How to capture them in a flat file' ?

Yes exactly :)

Posted: Fri Apr 27, 2007 1:44 pm
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.

Posted: Fri Apr 27, 2007 1:46 pm
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.

Posted: Fri Apr 27, 2007 1:59 pm
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.

Posted: Fri Apr 27, 2007 2:34 pm
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?

Posted: Fri Apr 27, 2007 2:52 pm
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.

Posted: Fri Apr 27, 2007 6:23 pm
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.

Posted: Sat Apr 28, 2007 3:58 am
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?

Posted: Sat Apr 28, 2007 10:50 am
by pradeepleon
Ray/Nick,

I've figured it out. Thanks though !