How to read/retrieve the data from ADABAS database using NATURAL program

Hello all,

I’m new to NATURAL,could you please let me know how to read/retreive the MID-GRP data using NATURAL COBOL from the below DDM. I appreciate your help !

P 1 MA MID-GRP
2 MB MID A 10 N
P 1 MC NAME-GRP
2 MD LST-NAME A 50 N
2 ME FST-NAME A 15 N
2 MF MID-NAME A 15 N

There is an old joke:

Q: How do I get to Carnegie Hall?
A: Practice, practice, practice.

How do you read data?

First, you learn a bit about Adabas and Natural. By the way, there is no such thing as “NATURAL COBOL” that you referenced in your post.

Assuming you are writing in Structured Mode, you will have a View of the file in your program (probably in your Local Data Area) or in an external data Area.

In the View you could specify individual or ranges of occurrences of your Periodic Group fields.

All that done, you could either READ or FIND records from the view.

Strict Report Mode does not permit views; What I call “mixed mode”, also called structured data mode, does permit Views. In strict Report Mode, you READ, FIND from the file name. Again, you can access individual or ranges of occurrences.

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/pg/pg_dbms_ada.htm

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat823mf/pg/pg-over.htm