After installation, each ...\X_LANSA\X_ppp\SOURCE directory should contain a file called x_defppp.h (where ppp is the name of the partition). For example, if the partition is SYS, then the file will be called x_defsys.h.
The x_defppp.h file defines execution settings for your functions that are unique to the partition. (It is similar in concept to the DC@A01 data area on the IBM i). These settings are globally defined to all PROCESSES (and subsequently the functions) in a specific partition.
For example, your decimal point character may be ',' rather than '.' Using this file, you can specify the character that you require once, for all processes and functions in the partition.
The file is formatted as a C header file. It is very easy to understand and to change with any source/text editor, if necessary. You will find the relevant options and values documented within the file.
Any changes made to the values contained in the X_DEFPPP.H file, will require (re)compilation of ALL ENTRY POINT PROCESSES before the changes take effect. Once ALL entry point processes have been (re)compiled you will need to exit and re-enter your LANSA application for the new values to be picked up at execution time.
You should also note that the following values can be set from the LANSA X_RUN command or as a system environment variable:
The order of precedence for the setting of these values is:
A. Values specified in XENV= parameters on the X_RUN command.
B. Values specified in normal system environment variables.
C. Multi-national Values specified in the Development Environment
D. Country-specific information read from the Windows settings. These values are always available, so in order that the values in x_defxxx.h can still be used, the use of these values can be switched off. To do this define the registry value "OSRegionalSettings" in HKEY_LOCAL_MACHINE\Software\LANSA\X_LANSA registry key as a DWORD and set its value to 0.
E. Values specified in this file.
For example, say that you needed to set the X_CENTURY_LESS_DATE value to "20". You can do this using three different methods. These methods can be used independently or together:
Specify the value in this file by changing the line below to #define X_CENTURY_LESS_DATE "20" and then recompiling all entry point processes in your application, This will effectively lock your application into this value. However, this value will not normally be used by application pieces running in SuperServer mode or as services to LANSA Open applications because they do not have the concept of an entry point process available to them. In such cases you should use method B or C as well to achieve the required results in all situations.
Set an environment variable for the environment in which application is executing. By putting the operating system command SET X_CENTURY_LESS_DATE=20 into your operating system start up you can cause the appropriate value to be set. A value set this way overrides any value specified by method A. When setting a value this way you should take care to ensure that the value is appropriate and valid, as no form of validation is applied to the value specified.
Set a LANSA environment variable by putting the value into the X_RUN command. For example, X_RUN PROC=TEST LANG=ENG XENV=X_CENTURY_LESS_DATE=20 XENV=X_AUTOMATIC_HELP=Y will set the century compare date and automatic help option to the values specified, overriding anything specified by environment variables (method B) or in this file (method A). Note that a value set this way overrides any value set by methods 1 or 2.When setting a value this way you should take care to ensure that value is appropriate and valid, as no form of validation is applied to the value you specify.
There is a fourth method of obtaining the multinational values:
X_DOLLAR_SIGN_CHAR, X_HASH_SIGN_CHAR and X_AT_SIGN_CHAR.
These values are obtained from the LANSAPC registry entry. This is primarily used for LANSA objects that are used to extend the Development Environment such as the Deployment Tool.
Note: If running in LANSA SuperServer, ensure that the Server setting matches the Client setting for X_DECIMAL_POINT_CHAR to avoid values exchanged from a function called via the Built-In Function CALL_SERVER_FUNCTION losing their decimal places.