How to get DDM of perticuler ADABAS file into Natural pgm

Hi,

Can any one help in this.

I want to display the DDM of the ADABAS file from the NAtural program.Where these DDM’s will be stored.How can i get the DDM of the file.

Thanks
Ramesh

On the mainframe, DDMs are stored in Predict, an Adabas file named FDIC.

Retrieve a DDM via the API. The SYSEXT command in Natural will display documentation for all available functions. You’ll need USR1058N and possibly USR1051N.

USR1058N will return a list of elementary field names and their characteristics.

USR1051N will return the number of occurrences of a PE or MU.

Hi Ralph Zbrog,

Thanks for quick response,actually I understand something from your reply, since Iam new to this Natural / Adabas.

So,can you explain me in details how helpful these routines for getting DDM.If you have any examples please provide so that I will get clear picture on these routines.

Thanks
Ramesh

Enter SYSEXT on the Natural command line. You will see a list of Natural utilities. Use PF8 to scroll to USR1058. Enter a question mark in the line command for USR1058 and you will see that the L command lists the source of a sample program. Have your Natural administrator copy USR1058P to your Natural library so that you can manipulate it, or use the L line command and your emulator’s copy/paste functions to create your own version manually.

USR1058P is a working example of retrieving a DDM from Predict. The D line command lists documentation for the utility.

Hi Ralph Zbrog,

Thanks.I understood what your telling.
But You said DDM’s are stored in the adabas file FDIC, how to see this adabas file/how to access this file.

Appreciate your help.

Thanks
Ramesh

Sorry, Ramesh. It appears that I may have misunderstood your original question. You appear to be asking one of three questions.

1 How do I create a Natural program that reads and lists (or manipulates) DDMs? In your program use CALLNAT ‘USR1058N’… as I posted previously.

2 How do I create a Natural program that reads the Predict dictionary directly to process DDMs? Have your Natural administrator give you access to the SYSDIC DDMs. Read SYSDIC-DDM to get what you want.

3 How do I define an Adabas file in a Natural program so that I can read that file’s records?

a) Determine the name of the file. Use the LIST command to list all views available to you

L V *

or use a wildcard to list a subset.

L V EMP*

Invoke the Natural data editor

E L

Use the view line command to list all the fields of the view of your choice.

.v(EMPLOYEES)

Select the fields of interest with an S in the selection field. When you have selected all the fields you need, page forward to the end of the view, or press PF3 to exit the list. The data editor now contains your customized view definition. Enter the editor command GEN to format your view in program editor format. Change the source module format to Program, and add logic to read the file that you’ve just defined.

I hope that I’ve answered the real question. If not, please try again.

In future, try to be more specific to keep me from going in the wrong direction. :slight_smile:

Thanks Ralph Zbrog,
Actually you are going in right direction, since Iam getting new things from you.
Actully youn answered my question previously,but I want to get more clear on this.
1 How do I create a Natural program that reads and lists (or manipulates) DDMs.

Now Iam developing one Natural program which user entesr the adabas file and get the DDm of that pertucler file.

As a developer shall i get access to use the utility USR1058N.

Thanks
Ramesh

You don’t, use the SYSDDM utility.

Hi Ralph Zbrog,

Your answer which you posted on Dec 14th was clear, but that is not actual my requirment.I want to get the field names alone from the DDM and i don’t want values of fileds/attributes of DDM.
Say for example, if you enter any adabas file name(Employee), it should pick up the name of the field, like
Employee-name
Employee-adress.

I think now you wil get clear picture about question.
Without using the natural utility USR1058N, can’t we get the name of the fileds of any DDM.

Thanks in advance
Ramesh

If all you want is the field names, then ignore the attributes provided by USR1058N. I still recommend a CALLNAT to USR1058N to get what you need.

In a former life, I would READ the SYSDIC file directly, but I now prefer USR1058N.

Those are your only options.