A Natural development server can be assigned user-specific environments. These environments can be set within the Natural Configuration Utility.
When a client maps to a server, the server is accessing the NDV environment section of the corresponding port inside the global configuration file and is looking for the corresponding user ID. If the user ID section is found, the corresponding environment will be created and the new Natural session will be started with the following environment:
Server Environment
User Environment
If no environment is available for the current user, only the server environment will be taken as the Natural session's environment.
The variable NDVSESSION is provided to control the starting
of Natural sessions. With this variable it is possible to run a server with the ability to
start different natural sessions depending on the mapped user.
Note
The NDVSESSION setting has a higher priority than the
-start option of the server.
Suppose an NDV server is started with the option -s=naturalsec and a user
has specified NDVSESSION=mynatural, then the session
"mynatural" will be launched for this user.
For further information, refer to NDV Environment Assignments in the Natural for Linux and Cloud Configuration Utility documentation.
Natural Single Point of Development provides the following user exit.
The NDV-UX01 user exit is invoked before a Natural source object or a DDM
is edited. It can be used to reject editing certain sources.
The name of the source code of this exit in the SYSLIB Natural system
library is NDV-SX01.
To use this user exit, you must first enable it. For instructions, see Enabling an NDV User Exit.
You can specify the following parameters for NDV-UX01:
| Parameter | Format | In/Out | Description |
|---|---|---|---|
| FUSER-DBID | N5 | In | Database ID of the system file that contains the object. |
| FUSER-FNR | N5 | In | File number of the system file that contains the object. |
| LIBRARY | A8 | In | Name of the library that contains the object. |
| OBJECT-NAME | A32 | In | Name of the Natural object or DDM that is edited. |
| USERID | A8 | In | ID of the current user. |
| OBJECT-TYPE | A1 | In | Natural type of the object. |
| ALLOW-DISALLOW-TRANSFER | L | Out |
Possible values:
|
| DISALLOW-DESCRIPTION | A65 | Out | Error message issued by NDV if the edit request is rejected. |
The NDV user exit is delivered in the SYSLIB Natural system library.
The source of the user exit routine is named
NDV-SXnn, where
nn denotes the number of the user exit
routine.
To make an NDV user exit routine available:
Copy the source code of the user exit
NDV-SXnn from the SYSLIB
Natural system library into a user library and save it under the name
NDV-UXnn.
Renaming the user exit guarantees that the object is not affected if the user exit source is overwritten by an installation update.
Adapt the values of the parameters as required and stow the user exit.
Copy the cataloged object of NDV-UXnn to
the SYSLIB Natural system library.