Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i access oracle database from COBOL

Status
Not open for further replies.

sjangala

Programmer
Jan 7, 2002
3
US
Hi Guys,

1)how do I access ORACLE from COBOL. I know they have some embedded sql statements but I never used.can anyone give a sample code how this code looks like
And are there any system settings for this.... to work

2)and also how do I load data into Oracle from COBOL?

Thanks
 
Hi sjangala!

This is no easy question to answer with an example or two. You need to have at least same basic understanding of SQL but when you have you shuld be able to SELECT(read)and INSERT(load,write). Performace in SQL is also to be considerd since there are many ways to do it, not all so good.

1. Use embeded SQL

2. Pre-compile with ProCobol precompiler (from Oracel)

3. Make sure you can reach the database from application and that you are connected(logged on)

//Renaldini
 
Thanks Renaldini!
I do have strong SQL skills.
But I am just wondering if u can give me a sample code.
like should I start the embedded SQL code with any
special key words like..... START SQL, END SQL etc.... while coding COBOL....
U help in this regard is greatly appreciated....
 
Pre-compilers are triggered by the word

EXEC

So:

EXEC SQL
INCLUDE SQLCA
END-EXEC.

etcetera.

Regards,

Crox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top