469,945 Members | 1,756 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

batch job to extract data from tables in DB2

I have got a requirement as follows.

I am having a table RCBL_ERROR in a database in DB2.

I need to create a batch file, which has to extract the rows from this table
and write those extracted records to a text file.
And that text file needs to be placed in the folders ORD and BKUP.

The text file name should be "error_report_09302008.txt"
The error report name will be like error_report_<date>.

Since this is a batch job, can we schedule this batch job to run daily at 1
AM PST.

is it possible ?

If so can anyone give me some samples

Thanks in advance.

Krishnakanth
Sep 30 '08 #1
1 2504

"Krishnakanth" <Kr**********@discussions.microsoft.comwrote in message
news:12**********************************@microsof t.com...
>I have got a requirement as follows.

I am having a table RCBL_ERROR in a database in DB2.

I need to create a batch file, which has to extract the rows from this
table
and write those extracted records to a text file.
And that text file needs to be placed in the folders ORD and BKUP.

The text file name should be "error_report_09302008.txt"
The error report name will be like error_report_<date>.

Since this is a batch job, can we schedule this batch job to run daily at
1
AM PST.

is it possible ?
Sure you can do it. You can write a VB.Net or C#.NET Windows desktop
solution that has nothing on the form no Win controls on the Win from,
minimize the form so it's not seen.

You can run the program-name.exe in a batch file. You can even check the
return-code that the program would return to the batch, and process
accordingly based on the return-code.

You can also just make a Console Application that starts and ends itself
with no user interaction and just schedule the exe to run. You can do the
same with the Windows solution up a above there too and not even need a
batch file, just schedule the exe.
Oct 5 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by konsu | last post: by
12 posts views Thread by Selva Chinnasamy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.