Best way to do batch processing

G

George

I have a new VB.Net application that needs some nightly batch
processing. I thought it might be good to write the batch programs in
..Net using a console application. I am finding it is impossible to trap
for program errors. When the program errors off the error messages do
not get captured in the job log file.

Is there a better way to do this?
 
C

Cor

Hi George,

Show two "pieces" of code not more a whole program will not be investigated
in this newsgroup.

One from the way you do your errortrapping

The other how you write your error log

Maybe than somebody can help youl

Cor
 
G

George

My first question is : Is a console application the best way to go in
writing batch jobs? If not then what would be a better vehicle?

If a console application is a good way to approach this, then how can I
trap errors? Console.WriteLine only works when there is no error. I have
been reading about the three standard I/O channels, in, out and errors,
and that they can be re-directed. I imigine if I can re-direct the
errors output to a file instead of a DOS window, then this might work.

Veeves
 
A

Ayaz Ahmed

Hello,

which type of batch processing you want , either record update in batch
format aur any progress bar shown when record update in batch format.


Thanks,

Warm Regards,

Ayaz Ahmed
Software Engineer & Web Developer
Creative Chaos (Pvt.) Ltd.
"Managing Your Digital Risk"
http://www.csquareonline.com
Karachi, Pakistan
Mobile +92 300 2280950
Office +92 21 455 2414
 
G

George

Your English is difficult to understand. Batch jobs do not have progress
bars. They run from a batch scheduler not a window. There is usually no
way to measure progress anyway.

I am trying to find out if a batch job can be written in VB.Net and if
so how?
 
A

Alexandre Moura

A console app should be fine for batch processing - that said, I'm not sure
what is it that you're having problems with, but here goes anyway:
Console.Writeline should work fine if you're handling exceptions correctly
- I'm not sure if you're familiar with the concept or not, but an unhandled
exception is the only reason I can see as to why Writeline would not work
for you - I would look into structured exception handling (try statement).
As an alternative to the Console output methods, you can look into logging
into a file - in any case, any sort of logging will only work if no
exception goes unhandled - otherwise your program will just stop right
there.

Hope that helps,
Alex


--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top