是Progress 4gl(Openedge ABL)能够读取STDIN并输出到STDOUT吗?

时间:2013-10-02 14:31:42

标签: linux progress-4gl openedge

我需要编写一个Progress 4gl程序来解析STDIN的输入,以便处理并将答案打印回屏幕。

e.g。

cat file_with_text.txt | $ DLC / _progres -p .p | grep ...

  • 这是否可以使用进度4gl语言?
  • 如果语言不可行,请不要从Progress 中提取购买此模块。告诉我这是不可能的。
  • 进度版本为10.1b。

我想要认为这是不可能的。我必须说服我的经理,我们需要摆脱Progress 4gl。

2 个答案:

答案 0 :(得分:1)

1)可以使用进度的“批处理”模式。查找“bpro”或“mpro -b”

2)另一种考虑的可能性是INPUT-OUTPUT THROUGH - 这允许Progress与外部二进制文件通信,并将其输出作为输入读回。此外,OUTPUT THROUGH会将输出发送到外部程序的STDIN。

3)您希望将Progress作为平台转储,因为它无法进行管道I / O操作?这并不是一个很好的理由将平台移到其他地方,这无疑与Progress有其他不足之处。

答案 1 :(得分:1)

详细说明:

/* cat.p
 *
 */

define variable xline as character no-undo.

do while true:
  import unformatted xline.
  put unformatted xline skip.
end.

然后像这样运行它:

_progres -1 -b -p cat.p< infile> OUTFILE

或(例如):

猫cat.p | _progres -1 -b -p cat.p | grep unformatted