In some cases, it is necessary for a file to be exported by Planning Analytics as needed by the users of the system. In most cases this is done by using the ASCIIOUTPUT command in a TurboIntegrator process.

When the export uses a NumberToString() function to convert one of the exported values from a number to a string, some extra care must be taken to ensure the output of the file remains consistent.

By default, the NumberToString() function converts a number to a string using the separator values of the specific user locale. This setting is determined by each individual user’s Windows Regional Options settings. More documentation on NumberToString() can be found on IBM’s website:

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=functions-numbertostring

This can lead to unintended issues where a number may be converted to a string using a decimal separator that the system is not prepared for (if this file is used as a data source for a future process). For instance, the number 10.25 may instead be exported as 10,25 depending on which user executes the process. This is more of a concern when there are users from multiple countries that have different Windows Regional Options by default.

The best practice, and solution to this issue is to instead use the NumberToStringEx() function to apply a static format to the conversion. This function allows the developer to determine a static numeric format, decimal separator, and thousands separator, so that no matter who executes the process, the output will remain consistent.

The format for the function is as follows: NumberToStringEx(Value, NumericFormat, DecimalSep, ThousandsSep); A standard use, with periods used for the decimal separator and commas for the thousands separator would appear as follows:

 

 

More documentation on NumberToStringEx() can be found on IBM’s website:

https://www.ibm.com/docs/en/planning-analytics/2.0.0?topic=functions-numbertostringex