View previous topic :: View next topic |
Author |
Message |
TheGodfather Beginner

Joined: 08 Jul 2003 Posts: 10 Topics: 3 Location: Tvm, Keralam, India
|
Posted: Tue Oct 31, 2006 6:01 am Post subject: Can we use a COBOL-DB2 program in exit routine of SORT? |
|
|
I am trying to find out if we can use a COBOL-DB2 program in one of the exit routines available in SORT. If so, how will i give plan details?
I checked in the manuals, but the MODS statement is only mentioning about the loadlib.
My requirement is give below.
1. Get a file using FTP from a shared folder.
2.Validate the records against DB2 table. ==> I am hoping to use the solution here
3. Insert the validated records into a DB2 table.
Cheers,
Raghu. _________________ The Godfather
"I'll make an offer he can't refuse." |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue Oct 31, 2006 8:04 am Post subject: |
|
|
TheGodfather,
I don't see where SORT fits in here. It is a Plain cobol-db2 program.
DO until eof input file
1. read the file.
2. use a select statement to check if the record is valid
3. If valid use an insert statement to insert the record else skip the record
end-do
Why do you need a sort in here ?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
TheGodfather Beginner

Joined: 08 Jul 2003 Posts: 10 Topics: 3 Location: Tvm, Keralam, India
|
Posted: Tue Oct 31, 2006 10:46 am Post subject: |
|
|
Hi Kolusu,
Thanks for the quick response.
I would like to make the validation with a generic program so that it can be reused. So I was hoping for such a solution.
As of now, we are going with a plain COBOL-DB2 program. But I just wanted to think about possible scenarios.
Btw, is it possible to call a COBOL-DB2 program from SORT exit routine? I would like to know if this is possible. (Even if I am not able to use it here.)
Cheers, _________________ The Godfather
"I'll make an offer he can't refuse." |
|
Back to top |
|
 |
|
|