Using COBOL to acess a Oracle databse [message #235908] |
Tue, 08 May 2007 06:50  |
ozstrider
Messages: 3 Registered: May 2007
|
Junior Member |
|
|
Hi there,
I'm a computer science student from Brazil and I just got a project to implement in COBOL from my ass teacher.
The problem is, she did not explain anything on how to do it, and I have no idea about how to do it. I've never even tried to connect to a database... I don't know how it works.
If someone could please give me some direction I would apreciate it
Some stuff that I have no idea:
-I have Oracle 10g installed and a server running in my PC, can I access it with COBOL?
-If yes, where can I find the commands to do this?
-Wich COBOL compiler would be best to do something like this (free)
Thanks in advance
Desperate cobol noob
|
|
|
|
|
Re: Using COBOL to acess a Oracle databse [message #235922 is a reply to message #235916] |
Tue, 08 May 2007 07:29   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
Hmmm.. I seem to remeber that at least an old 7.X DB we used shipped with something called "procobol".
A google for
gave a few hits, but as far as I can tell it seems to be somewhat obsolete.
|
|
|
Re: Using COBOL to acess a Oracle databse [message #236100 is a reply to message #235916] |
Wed, 09 May 2007 00:59   |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
ozstrider wrote on Tue, 08 May 2007 14:12 | You don't understand, she WON'T help. When you ask her she says:
"Do you know something called.. library ? Or maybe... Google?"
she's stupid..
|
Hm. I wonder who is the stupid one here... She DID help.
Maybe this link will help you find what she advised.
1.6 million hits on Google, and you read them all? (googled for oracle cobol)
[Updated on: Wed, 09 May 2007 01:00] Report message to a moderator
|
|
|
Re: Using COBOL to acess a Oracle databse [message #236353 is a reply to message #235908] |
Wed, 09 May 2007 13:01   |
ozstrider
Messages: 3 Registered: May 2007
|
Junior Member |
|
|
Kinda rude you don't you think ?
You did exacly the same thing my teacher did. But you two don't seem to understand that
Quote: | By friendly guy:
There is all sorts of rubbish published on the net, some of it ranked quite highly by Google. Being able to sort the wheat from the chaff requires a minimum level of knowledge
|
the friendly guy there knows that I lack any knowledge to do something like that and select a good material.
He helped me, you didn't, so why did you loose your time here?
Anyway
thanks in advance to anyone who would help
|
|
|
|
Re: Using COBOL to acess a Oracle databse [message #236503 is a reply to message #236489] |
Thu, 10 May 2007 02:13   |
gold_oracl
Messages: 129 Registered: July 2006 Location: Westborough, MA
|
Senior Member |
|
|
I assume that you have little bit exposure in COBOL/Pro COBOL and you know how to compile and execute the pro Cobol program.
If so, please find the list of steps to be included inside the pro Cobol program to connect oracle, execute the query and etc. below.
To connet to Oracle..
MOVE "/" TO USERNAME-ARR
MOVE 1 TO USERNAME-LEN
EXEC SQL
CONNECT :USERNAME
END-EXEC
To declare the cursor..
EXEC SQL DECLARE SYSCUR CURSOR FOR
SELECT SYSDATE, DUMMY
FROM DUAL
END-EXEC
To open the cursor
EXEC SQL OPEN SYSCUR END-EXEC
To load the data into local variables
PERFORM UNTIL SQLCODE NOT = 0
MOVE SPACES TO STATUS-TYPE
EXEC SQL
FETCH SYSCUR INTO
:V-DATE,
:V-DUMMY
END-EXEC
IF SQLCODE = 0
/* DO YOUR STUFF HERE */
END-IF
END-PERFORM
To close the cursor
EXEC SQL CLOSE SYSCUR END-EXEC
Thanks,
Thangam
|
|
|
Re: Using COBOL to acess a Oracle databse [message #236513 is a reply to message #236503] |
Thu, 10 May 2007 02:38  |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
I think you missed the point of my post. If your teacher tells you to go use the library and Google, she will have a good reason for it. She probably wants to see how well you perform when you are 'on your own', a necessary ability for programmers.
|
|
|