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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read Adabas record from a Cobol program ? 1

Status
Not open for further replies.

kcbrook5

Programmer
Dec 17, 2002
4
US
Adabas is a Software AG database, I had used a 4 GL Natural language to access Adabas. I am not sure if there is a way to access Adabas from a Cobol program, if yes, how ? SoftwareAG's website doesn't help. [Ponder]
 
Hi kcbrook5,

You can use SQL statements embedded in COBOL. SQL is the interface between an application and the Adabas database.

Dimandja
 
Hi Damandja:
Can you 1) show me the syntax of the call to Adabas via SQL ? 2) Do you know any website or book that have examples for these coding ? Thanks
 
Carefull guys! The site is about Adabas-D. This is a fully relational database running on Unix and windows machines.
This is not the same as Adabas-C. This database is not fully relational and runs on IBM & Siemens mainframes.

But do not fear: also Adabas-C can be accessed from Cobol:
the oldfashioned way using adamint. This is an asssmbler-macro interface. You don't want this.
Or a more modern way using ADA-SQL. This can be compared with embedded SQL used to access DB2.

When you are already a Natural programmer, it will be no problem. The same logic (histogram, read, find) can be used.
But when you are used to relational databases you will notice that ADA-SQL does not offer all the ANSI-SQL features. You must limit yourself to the possibilities Adabas-C has to offer.
 
Hi Truusvlugindewind :
Thanks for the input. Can you point me to Websites that might have the Cobol coding example in reading Adabas? Now I remember Adamint. I used it for a very short term project (about 3-4 months) 20 years ago. Whatever manual I used to have were gone.
 
Sorry, don't know any sites. But when you work in such an environment, you've got the manuals...

What I remember (although not 20 years it is some time ago) just code the normal simple ANSI SQL statement, preceeded by the adabas/natural keyword.
Looks like:

exec adabas
find
select name
from personell
into :WS-NAME
end exec.
or
exec adabas
histogram
select name
from personell
into :WS-NAME
end exec.

When you know adabas, you'll know the difference

In the output of the pre-processor you will see the adabas control blocks and various buffers being generated, resulting in a call to adabas.

Advanced relational SQL features with all kind of joins, multiple tables and so is not possible. But everything you can do with Natural you can also accomplisch with Cobol-ADA-SQL.
 
Hi Guys , I need to read adabas-c with rm cobol. can you please publish an example of the coding. I need to read the data with a direct call and generate a csv file. I have read the above , but please
can you submit an example , even if it is to vaughan@ibsoft.co.za

Thank You

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top