【问题标题】:why does field value comes as 1'000,24 instead of 1,000.24 when the format is >,>>>,>>9.99 in progress 4gl?当格式为 >,>>>,>>9.99 in progress 4gl 时,为什么字段值为 1'000,24 而不是 1,000.24?
【发布时间】:2014-09-26 20:33:22
【问题描述】:

我们最近从 9.1d 升级到 oe rdbms 11.3 版本。生成时
报告,我发现一个字段的字段值为 2'239,00 而不是 2,239.00.我检查了它的格式 >,>>>,>>9.99。 这可能是什么原因?

【问题讨论】:

  • 这是典型的瑞士符号。检查您的语言环境是否默认未设置在任何瑞士语言环境中。
  • 你有两个很好的答案。您至少应该投票并选择其中之一...您知道的好业力!
  • 对不起,我以后会严格遵守的

标签: openedge


【解决方案1】:

安装数据库的管理员没有完成作业,并选择了错误的默认数字和小数分隔符。

但是没有造成更大的伤害:

设置这些启动参数

-numsep 44 -numdec 46

这是一个简化的数据库启动示例,添加了如上参数:

proserve /db/db -H dbserver -S dbservice -numsep 44 -numdec 46

【讨论】:

  • 只需在启动脚本(数据库和客户端启动)中添加不带引号的“-numsep 44 -numdec 46”。
  • 我可以将 installd.ini 文件中的这些值更改为 numsep = 44 和 -numdec = 46 并保存文件吗?
  • 否,如果不想添加重新安装软件需要的参数。
  • 通常 aqn -e 是我们使用的启动参数。 wnen 我使用 aqn -e -numsep 44 -numdec 46 它说给定的参数太多。
  • 我不知道“aqn”是什么。检查 aqn 本身是否是包含启动命令的脚本 - 那么也许您可以编辑它?如果您使用某种使用 Progress 的产品,也许您应该联系您的供应商?
【解决方案2】:

安装 Progress 时,系统会提示您输入要使用的数字格式。然后将该信息写入位于安装目录中的名为“startup.pf”的文件(Windows 上默认为 C:\Progress\OpenEdge...)

如果您选择了错误的数字格式,您可以使用任何文本编辑器编辑 startup.pf。它应该看起来像这样:

#This is a placeholder startup.pf
#You may put any global startup parameters you desire
#in this file.  They will be used by ALL Progress modules
#including the client, server, utilities, etc.
#
#The file dlc/prolang/locale.pf provides examples of
#settings for the different options that vary internationally.
#
#The directories under dlc/prolang contain examples of
#startup.pf settings appropriate to each region.
#For example, the file dlc/prolang/ger/german.pf shows
#settings that might be used in Germany.
#The file dlc/prolang/ger/geraus.pf gives example settings
#for German-speaking Austrians.
#
#Copy the file that seems appropriate for your region or language
#over this startup.pf. Edit the file to meet your needs.
#
# e.g. UNIX:            cp /dlc/prolang/ger/geraus.pf /dlc/startup.pf
# e.g. DOS, WINDOWS:  copy \dlc\prolang\ger\geraus.pf \dlc\startup.pf
#
# You may want to include these same settings in /dlc/ade.pf.
#
#If the directory for your region or language does not exist in
#dlc/prolang, please check that you have ordered AND installed the
#International component. The International component provides
#these directories and files.
#

-cpinternal ISO8859-1
-cpstream ISO8859-1
-cpcoll Basic
-cpcase Basic
-d mdy
-numsep 44
-numdec 46

startup.pf 文件的更改是全球性的——它们会影响在这台机器上启动的所有会话。如果您只想更改单个会话,则可以将参数添加到命令行(或快捷方式图标属性)或本地 .pf 文件或该会话正在使用的 ini 文件。

您还可以使用 SESSION 系统句柄以编程方式覆盖代码中的格式:

assign
  session:numeric-decimal-point = "."
  session:numeric-separator     = ","
.

display 123456.999.

(如果这是临时更改,您可能需要考虑保存当前值并恢复它们。)

(对于两种最常见的情况,您也可以使用简写 session:numeric-format = "american"。或 "european"。)

【讨论】:

  • 感谢汤姆,我编辑了 startup.pf 并保存了。现在一切正常。
猜你喜欢
  • 2014-09-02
  • 1970-01-01
  • 2021-01-06
  • 2019-05-28
  • 1970-01-01
  • 1970-01-01
  • 2015-06-05
  • 2017-11-06
  • 2013-10-18
相关资源
最近更新 更多