Getting data from a SQL Server through Cobol – AS/400 application

Tags:
AS/400 and SQL
AS/400 V7R1
COBOL/400
IBM iSeries
ODBC
I've seen a lot of questions and answers about accessing data from SQL database but I am still not sure of how to handle what I need to do.  I have a Cobol application on our AS/400 that needs to get data from a SQL server. I have an ODBC connection already configured, but not sure how to actually code it. I know that SQL programming is entirely different to Cobol and I am knowledgeable in Cobol but not SQL. What is needed to make a connection? Is this done only from the "Connect" statement and is there other software that is required? In my ODBC Data Source Admin, my system DSN is "NPL", which points to the Database "EngTest", the table name is dbo.tblNPD.  What would the "CONNECT" statement look like based on the above?


Software/Hardware used:
Cobol/400, Client Access, ODBC, SQL Server
1

Answer Wiki

Thanks. We'll let you know when a new response is added.
Hi CWELLSEATON,
Welcome in ITKE. I have found a helpful article for you. I hope it will assist you in resolving issues.

Thanks & Regards

Clark Kent

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • CWELLSEATON
    Thank you Clark, but that article does not help with what I need.
    I changed my question somewhat to hopefully explain better what I am looking for.  I maybe making something simple difficult and hopefully that is the case.
This is some of the details:
Application resides on: IBM iSeries AS400 V7R1
Written in: Cobol/400, ODBC, NPL Driver used: SQL Server Native& Client 10.0 Driver
Database: EngTest
Table name: dbo.tblNPD
var addthis_config = {"services_compact":"facebook,reddit,stumbleupon,print,google_plusone_share,googleplus", "services_exclude":"blurpalicious"}; I have a Cobol application on our AS/400 that needs to get data from a SQL server.  I have an ODBC connection already configured, but not sure how to actually code it. I know that SQL programming is entirely different to Cobol and I am knowledgeable in Cobol but not SQL. 

What is needed to make a connection and the select statement?  Is there other software that is required besides just embedding the statements and compiling?

 What would the "CONNECT" and Select statement look like based on the above?

30 pointsBadges:
report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: