CA的自动化点产品具有嵌入式rexx解释器。我以前在CMS上使用过其他的Rexx解释器。我正在尝试访问外部数据队列,以允许AP rexx脚本调用其他语言的程序并从其中获取数据。现在CA已经明确表示它不是对象rexx或OORexx,而是"Milstead“(原文如此) rexx。我使用Neil Milsted的Uni-Rexx ( Neil,如果您正在阅读,这是个不错的选择),它实现了我需要的rxqueue。
解析版本名称级别说"rexx是名称“和”级别说"rexx is“RxFuncQuery("SysUtilVersion")给出: rexx是REXX:Open-REXX:299:Open-REXX:ASCII:MultiThread:DynamicLink和4.004Feb 2008
07/15/2011 08:27:19 rexx util is 30
我的google-fu在这里让我失望了,我不断地回到相同的网站。
那么,有没有人知道这个特定的Rexx,以及如何让它运行非rexx代码并返回输出?我真的不想在写临时文件时受到I/O的限制。
发布于 2011-07-19 19:09:25
如果您想要将外部程序(可执行文件)的输出放到REXX中,可以使用POPEN函数,该函数将命令的标准输出重定向到外部数据队列中。然后,您可以使用以下说明操作队列:
解析拉取(
一个简单的例子:
call popen ('dir /?')
lines = QUEUED()
say "Number of output lines:" lines
do i = 1 to lines
pull line
say "Line #"||i||":" line
end发布于 2014-03-01 03:28:48
更现代的方法增加了错误诊断的好处是:
cmd = 'dir /?'
address COMMAND cmd with output stem cmdout. error stem cmderr.
if cmderr.0 <> 0 then do /* an error has occurred executing this command */
do i = 1 to cmderr.0
say "Error text line" i": '"cmderr.i"'"
end
end
else do i = 1 to cmdout.0 /* no error has occurred so just process the output */
say "Line #"i":'"cmdout.i"'"
endhttps://stackoverflow.com/questions/6703960
复制相似问题