The Cascade Connect Setup window lets you configure decimal translation between Windows and data server applications.
Some versions of Windows with support for non-North American locales may generate alternate characters for the decimal point. Most commonly, this is the comma (,) character. The decimal character for the locale is defined in the file \WINDOWS\WIN.INI. The definition section labeled [intl] contains an entry called sDecimal that specifies the decimal character to use. Cascade Connect reads the WIN.INI file to determine the decimal point in the current locale.
In some data server environments, such as QNX, numbers must use the period (.) character as the decimal point in numbers. This means that in order to use Cascade Connect with non-North American versions of Windows, a decimal conversion must be performed on numbers transmitted to and from these data servers. Cascade Connect offers a number of options for performing this conversion.
Cascade Connect will perform no decimal conversion unless either the Coming from Server or Going to Server field is selected. In addition, Cascade Connect offers two possible conversion options: All Occurrences or Numbers in Strings, explained as follows:
All Occurrences: Every occurrence of the local decimal character is converted to the period character, even if not situated inside a valid number. This entry takes precedence over the Numbers in Strings entry. The default is off (0). The configuration file syntax is:
decalways 0 or 1
Numbers in Strings: All occurrences of valid numbers of the form digit.digit are converted, as appropriate for the settings of Coming from Server and Going to Server. The default is off (0). The configuration file syntax is:
decnumbers 0 or 1
Coming from Server: Period (.) characters are converted to the decimal character of the Windows locale, based on the translation settings, for messages transmitted from the data server to Windows. The default is off (0). The configuration file syntax is:
decfromqnx 0 or 1
Going to Server: Local decimal characters are converted to the period character, based on translation setting, for messages transmitted from Windows to the data server. The default is off (0). The configuration file syntax is:
dectoqnx 0 or 1
The following example may help to illustrate how Cascade Connect performs decimal conversion.
For this example, let us assume that we are transmitting data from a data server application into a Windows client program that is running on a Portuguese version of Windows. The Portuguese version of Windows has been configured to use the comma character (,) as the decimal point.
| Value sent from data server | The value that arrives in the Windows client program | ||
|---|---|---|---|
| Coming from Server has been selected. | Default (neither Number in Strings nor All Occurrences selected). | Numbers in Strings has been selected. | All Occurrences has been selected. |
| -1.24 | -1,24 | -1,24 | -1,24 |
| 1.24 cm | 1.24 cm | 1,24 cm | 1,24 cm |
| .25 | ,25 | .25 | ,25 |
| .25 cm | .25 cm | .25 cm | ,25 cm |
| =a5*0.07+1.0 | =a5*0.07+1.0 | =a5*0,07+1,0 | =a5*0,07+1,0 |
| $5.00 please. | $5.00 please. | $5,00 please. | $5,00 please, |
Now let us assume that the Windows client sends information back to the data server application.
| Value sent from Windows client | The value that is sent to the data server application | ||
|---|---|---|---|
| Going to Server has been selected. | Default (neither Number in Strings nor All Occurrences selected). | Numbers in Strings has been selected. | All Occurrences has been selected. |
| -1,24 | -1.24 | -1.24 | -1.24 |
| 1,24 cm | 1,24 cm | 1.24 cm | 1.24 cm |
| ,25 | .25 | ,25 | .25 |
| ,25 cm | ,25 cm | .25 cm | .25 cm |
| =a5*0,07+1,0 | =a5*0,07+1,0 | =a5*0.07+1.0 | =a5*0.07+1.0 |
| $5,00 please,, | $5,00 please,, | $5.00 please,, | $5.00 please.. |