This is quite a common architecture, often used to give a more "modern" frontend to legacy mainframe "green-screen" applications, with improved validation, appearance etc.
If the VB5 programs are just running DB2 queries then see solution 1.
However, you have mentioned
Quote:
Lot of Business logic is added in MainFrame programs. This will communicate with DB2. Lots of batches are also present.
In which case you may need to instigate the running of those programs (from VB) rather than just connecting to DB2 (or you may need both).
This now depends on how you are (currently) connecting to the mainframe, which emulator or other communication protocol you are currently using or intend to use. That will also depend on what kind of mainframe it is, whether you are using IMS, CICS, etc etc etc. Here is a
starter[
^] search
In the past I've used direct communication, emulators and screen-scraping.
If you are intending to replace the mainframe business logic (in which instance I would ask "why?") then be sure to put in place a test region ... first. And make sure that you have production-strength data in it.