5 pts.
 Mainframe access to SQL server data
How can I access SQL server data from a mainframe COBOL program?

Software/Hardware used:
COBOL
ASKED: December 18, 2009  6:35 PM
UPDATED: December 24, 2009  9:50 AM

Answer Wiki:
Not sure if it will work from mainframe COBOL, but from WINTEL COBOL (MicroFocus), this works: EXEC SQL SELECT COLUMN_NAME INTO :VARIABLE_NAME FROM TABLE_NAME WHERE COLUMN 1 = :VARIABLE1 AND COLUMN 2 = 'Hard Coded Value' END-EXEC. ============================================================ Since Microsoft is the DB vendor, all you need to do is obtain the appropriate ODBC or OLE DB or whatever type of driver function from them that they have available. Of course, Microsoft isn't known for supplying drivers for use on other platforms, so you might have to look for other possibilities. Nowadays, the common solution has been to use JDBC with a Type 4 JDBC driver. Your COBOL would access a Java procedure on the mainframe that would use JDBC to interact with SQL Server. AFAIK, Microsoft's current JDBC is a type 4 driver. It requires JRE 5.0 or higher. I don't know how much info is available on installing this on a mainframe. I'm not aware of any other possibilities without installing some intermediate product. Tom
Last Wiki Answer Submitted:  December 24, 2009  9:50 am  by  CO Bill   120 pts.
All Answer Wiki Contributors:  CO Bill   120 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _