从通过 ADDRESS TSO 发出的 RLIST 命令中删除审核跟踪
我正在尝试编写一个脚本,该脚本将查询 RACF 类中的特定资源配置文件,然后执行一些逻辑来匹配一些不相关的内容。
问题是,当我发出下面的命令时,我在终端上看到了 AUDIT TRAIL。该脚本仅返回 1 或 0。所有逻辑都按其应有的方式工作,但是当我运行该脚本时,我从 RACF 获取整个 AUDIT TRAIL 并在底部得到结果。
y = outtrap('resourceAccess.')
address tso 'RLIST CLASSX CLASSX.RESOURCE.LIST'
y = outtrap('off')
我已经尝试在上面的一个之后创建另一个 outtrap
但没有成功。
有没有办法删除该 AUDIT TRAIL 位?
I'm trying to write a script that would query specific resource profiles in a RACF class and later do a bit of logic to match a few things - not relevant.
The problem is that when I issue the command below I get the AUDIT TRAIL on the terminal. The script is meant to just return a 1 or a 0. All the logic works as it should but when I run the script I get the whole AUDIT TRAIL from RACF and at the bottom the result.
y = outtrap('resourceAccess.')
address tso 'RLIST CLASSX CLASSX.RESOURCE.LIST'
y = outtrap('off')
I already tried to create another outtrap
after the one above with no success.
Is there a way to remove that AUDIT TRAIL bit?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些文本行可能以无法使用
outtrap
捕获的方式发出,而是被放置在外部数据队列 (EDQ) 上,然后在 REXX 发生时回显到终端退出。 ACF2 对所有输出都执行此操作,使得捕获命令响应有点棘手。试试这个:
旧答案:
如果您获得的输出与您链接到的 IBM 文档中的内容相匹配 (https://www.ibm.com/docs/en/szs/2.2?topic=effects-command-audit-trail),那么您需要做什么在捕获输出之后,只需丢弃前两行(应该是):(
一行文本和一个空行)。
您可以按如下方式执行此操作:
It's possible that those lines of text are being issued in such a way that they cannot be trapped using
outtrap
and are instead being placed on the external data queue (EDQ) and then echoed to the terminal when the REXX exits. ACF2 does this with all output, making trapping command responses a bit tricky.Try this:
Old answer:
If the output you are getting matches what's in the IBM docs you linked to (https://www.ibm.com/docs/en/szs/2.2?topic=effects-command-audit-trail), then what you need to do is after to have trapped the output, simply discard the first 2 lines, (which should be):
(one line of text and a blank line).
You could do this as follows: