For Programmers: Free Programming Magazines  


Home > Archive > Cobol > July 2006 > How to ... Part 2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to ... Part 2
Daniele F.

2006-07-13, 6:55 pm

Hi to everybody,
very very thank's for your reply about this problem!!!!!

Two words about me.... i'm not a professional programmer, i'm programming
just for my need and for fun (as a hobby); i learned pascal, and now under
windows i'm using delphi 6.0 a good tool (to do something under windows)
with a tons of utilities, source code and much more on the net.
So, the question is simple .... why i need to move to cobol ???
The big, big, big pitty of delphi is the DB managment; In the specific
metter ther is a program (written in acucobol) that work with a big (for me
is big) database with more than 700.000 records, i need to access to this
database (index field too) get some information (like new price, remove from
the market ecc...) and store that in a new file; The main problem is the
record structure, an acucobol programmer told me that with this language
(and generally speaking with cobol) when open the db files (or index file),
acucobol is able to detect the correct structure (it is true????).
Here the problem, we (me and the delphi guru) don't know how to connect the
delphi core program with this database.
For this reason i thought to learn cobol, and the best way to learn is try
to do something (hello world, display one form or screen ecc..) ....... but
is not so easy as seem.

I need to study more about this language, before post another question (i
did not understand any source code !!!!!).
I'm very sorry for this.

Thank's for your help, Ciao, Daniele


HeyBub

2006-07-13, 6:55 pm

Daniele F. wrote:
> Hi to everybody,
> very very thank's for your reply about this problem!!!!!
>
> Two words about me.... i'm not a professional programmer, i'm
> programming just for my need and for fun (as a hobby); i learned
> pascal, and now under windows i'm using delphi 6.0 a good tool (to do
> something under windows) with a tons of utilities, source code and
> much more on the net. So, the question is simple .... why i need to move
> to cobol ???
> The big, big, big pitty of delphi is the DB managment; In the specific
> metter ther is a program (written in acucobol) that work with a big
> (for me is big) database with more than 700.000 records, i need to
> access to this database (index field too) get some information (like
> new price, remove from the market ecc...) and store that in a new
> file; The main problem is the record structure, an acucobol
> programmer told me that with this language (and generally speaking
> with cobol) when open the db files (or index file), acucobol is able
> to detect the correct structure (it is true????). Here the problem, we (me
> and the delphi guru) don't know how to
> connect the delphi core program with this database.
> For this reason i thought to learn cobol, and the best way to learn
> is try to do something (hello world, display one form or screen
> ecc..) ....... but is not so easy as seem.
>
> I need to study more about this language, before post another
> question (i did not understand any source code !!!!!).
> I'm very sorry for this.
>
> Thank's for your help, Ciao, Daniele


Nah, you're doing swell.

Just like most things in life, the hard part is getting started. After you
get your COBOL compiler running in your environment, things get easier. Then
you have only the language itself to perplex you.


Alistair

2006-07-13, 6:55 pm


Daniele F. wrote:
> Hi to everybody,
> very very thank's for your reply about this problem!!!!!
>
> For this reason i thought to learn cobol, and the best way to learn is try
> to do something (hello world, display one form or screen ecc..) ....... but
> is not so easy as seem.
>
> I need to study more about this language, before post another question (i
> did not understand any source code !!!!!).
> I'm very sorry for this.
>
> Thank's for your help, Ciao, Daniele


A "Hello World" program can be found at:

http://www.automatedsoftwaretools.com/MFATC

Alistair

2006-07-13, 6:55 pm


Daniele F. wrote:
> Hi to everybody,
> very very thank's for your reply about this problem!!!!!
>
> The big, big, big pitty of delphi is the DB managment; In the specific
> metter ther is a program (written in acucobol) that work with a big (for me
> is big) database with more than 700.000 records, i need to access to this
> database (index field too) get some information (like new price, remove from
> the market ecc...) and store that in a new file; The main problem is the
> record structure, an acucobol programmer told me that with this language
> (and generally speaking with cobol) when open the db files (or index file),
> acucobol is able to detect the correct structure (it is true????).
> Here the problem, we (me and the delphi guru) don't know how to connect the
> delphi core program with this database.


I presume that Delphi would use SQL CONNECT to link to the database. I
am not an expert in SQL so can not help you any further.

Oliver Wong

2006-07-13, 6:55 pm


"Daniele F." <daniele.fare@libero.it> wrote in message
news:44b66910$0$32148$4fafbaef@reader1.news.tin.it...
> In the specific metter ther is a program (written in acucobol) that work
> with a big (for me is big) database with more than 700.000 records, i need
> to access to this database (index field too) get some information (like
> new price, remove from the market ecc...) and store that in a new file;
> The main problem is the record structure, an acucobol programmer told me
> that with this language (and generally speaking with cobol) when open the
> db files (or index file), acucobol is able to detect the correct structure
> (it is true????).
> Here the problem, we (me and the delphi guru) don't know how to connect
> the delphi core program with this database.


Is "the database" a file sitting on your haddrive, or a server? Usually
when someone talks about databases, they mean the latter: there's a server
running on the computer (e.g. MySQL) which accepts connections (perhaps via
sockets). Your program would connect via that socket and send SQL queries
and receive results. The server takes care of storing the data, so you don't
need to worry about file formats or anything like that.

If it's just a plain file, then you *DO* have to worry about file
formats. I'm don't have much experience with COBOL, but from my
understanding, no, your COBOL environment will not automatically "detect"
the correct structure. The structure is declaratively described in the FILE
SECTION of the DATA DIVISION.

- Oliver

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com