NATURAL.INI location through natural nni

Hello,

I’m currently playing with the Natural Native Interface and I get a start up error.

What I am doing:

I call `nni_get_interface`, which returns successfully and then call `nni_initialize` which does not return an NNI error but a Natural startup error.

I get return code -2047 and the following output:

    NATURAL V 9.3.2   Software AG 2024 


    Natural Startup Error:  47

    Unable to read PARM_PATH entry from NATURAL.INI file
    or directory is not accessible.

My working directory is `/opt/softwareag/Natural/bin`

I strongly assume that the `NATURAL.INI` file can not be found and that this is not a permission issue. When I compile the sample `sysexnni`, put that into the bin directory and run it under the same user, I get a step further.

I can not see the difference to that point from my program and the sample `sysexnni`.

Is there any environment variable or command line parameter that I can pass to set the path of the ini file?

I’ve tried to set `NAT_HOME`, `NATDIR` and `NATVERS`, but none of them helped.

Hello Markus,

First I would suggest you to open a ticket in the SAG support system - they probably can assist.

I have looked for previous similar requests and found this one, that looks kind of similar to yours, although frm a few years back and with lower version, but hope it will help :

Product Data*

Product Line
Product
Versions
Platforms
Operating Systems
Patch Level
Product Build
Topic

Description

Site tries to make the NNI-Sample from SYSEXNNI work.

It is successful when it places the binary in the Natural/bin-folder.

When placing it in a different folder it fails with the following error:

NATURAL V 8.3.8 Software AG 2016

Natural Startup Error: 47

Unable to read PARM_PATH entry from NATURAL.INI file

or directory is not accessible.

Site wouldn’t like to place the binary in Natural/bin-folder because the Natural Version should be easily changed. If site places own binary inside this folder it has to move every time it changes the version.

In early versions of natural (6.3) it was able to place and run the binary where ever it wanted.

Resolution

As of NAT831 multiple installations of Natural are possible. Therefore Natural must not rely on a $NATDIR/$NATVERS setting any more but expect NATURAL to be found in a specific directory hierarchy.

During startup of Natural, it is looking for a NATURAL.INI file in ../etc starting from the directory where the NNI application has been found.

So the only possibility to run the site’s NNI application from another directory than the recommended one is to create a similar directory hierarchy: Put your NNI application in a let’s say $HOME/nnisample/bin directory and copy the NATURAL.INI file from your installation to a $HOME/nnisample/etc directory.

But that is not the recommended handling.

See the …/Natural/samples/sysexnni/readme.txt for the recommended handling!

Migration Information

Former Empower KB Number: 1787013

Published: 25 Apr 2018