MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can we use a COBOL-DB2 program in exit routine of SORT?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
TheGodfather
Beginner


Joined: 08 Jul 2003
Posts: 10
Topics: 3
Location: Tvm, Keralam, India

PostPosted: Tue Oct 31, 2006 6:01 am    Post subject: Can we use a COBOL-DB2 program in exit routine of SORT? Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Oct 31, 2006 8:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TheGodfather
Beginner


Joined: 08 Jul 2003
Posts: 10
Topics: 3
Location: Tvm, Keralam, India

PostPosted: Tue Oct 31, 2006 10:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group