I am looking out for the approach to read DDM directly in my natural program. I want to read DDM to get the field names of each Adabas file in a database. And whenever any field of a File is added/changed, there should not be a need of changes in my program as any changes in the file gets reflected in the DDM and my program will pick up all the field names from DDM directly.
What Wolfgang is suggesting is that if you need to find out all the current DDMs you can access from a given library are for the purpose of checking for new files and/or new fields defined to a DDM, you can use the interface modules found in SYSEXT library.
USR1056N provides a list of DDMs on the FDIC file or in a library. Running this will give you a base from which you can tell any new DDMs (if you save the last result set) as well as having the input for USR1058N, which reads DDM source into an array. Reading the results of USR1058N, you can compare to the last run or just check for an updated catalogued date before doing the comparison to the last run to see if any fields were added.
Thanks Brian for explaining it further. Seems API USR1058N will be the correct for my requirement as I just want to know all the latest updated field names of any file in current library. Now I have two queries -
As the interface modules are found in SYSEXT library how we can I call/execute them from the Natural programs of my user library?
As “USR1058N” reads a DDM source code into an array how can I know the structure of array for calling and receiving data from the API?
Another alternative to making SYSEXT a STEPLIB would be to copy the USR* modules to SYSTEM, but that would make it harder on the person performing upgrades.