read source code of natural (from the adabas)

Hi,

I want to read the source code of NATURAL program/s and sub-program/s from natural program,
how can i do that ? the source code save in adabas file which file ? or
there is API program/s ?

Thanks

Although it is possible to read a Natural system file via Adabas direct commands from any supported programming language, it is much simpler to access FUser with a Natural program using Natural’s API. Several subprograms deal with the subject, but you should start with

  • USR1055N Read a source into an array
  • USR2019N Read a source into the Source Work Area

For more information on Natural’s API, look at its SYSEXT utility.

Do you have sample code to read in Adabas direct commands ?

when i run USR2019P (call to USR2019N) there is an error:

==err> 1000 6972 Directory error on Client, reason 4 ,

Thanks Yoav.

As explained in the message’s help text, the 6972 likely is masking error 0082. Logon to library SYSEXT, put SYSEXT in your Steplib chain, or copy USR2019N to your current Natural library. That should resolve the error.

I see no need for the complexity of Adabas direct calls when Natural is so easy.

I tried USR1057N and it work great.

Thanks