IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Please how do i proceed on this requiremnt?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
babu_hi

New User


Joined: 11 Apr 2006
Posts: 93

PostPosted: Fri Jun 20, 2008 1:36 pm
Reply with quote

In the source programs(COBOL-DB2 Batch progrmas) we have different types database enquiries.Each type enquiry is declared in cursor and get the reight data from the database.All enquiries use only one table but in where cluse we are mention different fields in all enquiries.

Insted of doing enquiries in source programs,we are going to design a subroutine for all types of enquiries placed in this routine and return the right date in to commom output area in this subroutine.Then the source progrms use this common output area and do rest of logic in existing program.

For this we have use dynemic sql in the subroutine.

How do proceed for this kind of requirement.Please let me know the approach on this?
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Jun 20, 2008 2:53 pm
Reply with quote

You mean to say that your cursor is going to be different of different inputs to the subprogram ...

If so for a particular input, construct the required cursor in your subprogram ... prepare, open and fetch the particular cursor only and return the result set ...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Check if it is certain hour, then pro... JCL & VSAM 25
No new posts Need a cursor to achieve the below re... DB2 10
This topic is locked: you cannot edit posts or make replies. URGENT REQUIREMNT FOR Senior Software... Mainframe Jobs 0
Search our Forums:

Back to Top