VMS 上进程打开的文件
我在 VMS 上有一个 DCL 脚本,它调用 perl 脚本。我可以使用 VMS/DCL 命令来告诉我 perl 脚本打开的每个文件句柄吗?
I have a DCL script on VMS which calls a perl script. Is there a VMS/DCL command I can use that will tell me every file handle opened by the perl script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
将默认设置为应用程序运行的磁盘(或者,如果它是一个非常大或分布式的应用程序,您可能必须连续尝试每个磁盘)。那么命令是
show device/files/nosystem
您使用的是较新版本的 VMS 并且列表太长,您可以通过执行以下操作来通过搜索管道它:
如果 搜索 sys$input (perl 脚本的名称)
Set default to the disk the app runs from (or you might have to try each disk in succession if it's a really large or distributed app). Then the command is
show device/files/nosystem
If you're on a more recent version of VMS and the lists are too long, you can pipe it with a search by doing this:
pipe show device/files/nosystem | search sys$input (name of perl script)
您需要找到未记录的 VMS 功能的文档:-)
说真的,我认为
set watch
可能会做您想要的事情。如果您发出,您将获得大量输出,希望其中包含您想要的内容。我已经很多年没有这样做了,你可能会调整选项来微调它。看
http://www.parsec.com/openvms/undocumented.php?page= 13
You need to find the documentation for undocumented VMS features :-)
Seriously I think that
set watch
might do what you want. If you issueYou will get loads of output that will hopefully include what you want. I havent done it for years, you probably tune the options to fine tune it. See
http://www.parsec.com/openvms/undocumented.php?page=13
杰森,我需要更多澄清 a)。您是说您想在批处理文件中运行 perl 脚本并让批处理文件监视 perl 脚本正在访问的文件吗?还是别的什么?
Jason, I need more clarification for a). Are you saying that you want to run your perl script in a batch file and have the batch file monitor the files being accessed by the perl script? Or something else?
嗯,对此不太确定。也许在你的帖子中添加一个 linux 标签,以便一些 linux 用户可以看到这个并插话。我不确定为什么你的 perl 程序不知道它打开了哪些文件。这是你的程序,它不会访问你告诉它访问的文件吗?或者,如果您以某种方式计算文件名(我已经在 cobol 中完成了,但仍然至少知道在哪个目录中找到它们,以及它们使用什么命名方案),您仍然会有像我提到的那样的线索。另外,既然它是你的程序,并且如果你正在计算文件名,你难道不能让你的 Perl 程序输出它自己的文件内容的小报告吗?就像,在计算文件名之后,让它将名称字符串复制到单独的报告文件中。
Hmm, not sure about that. Maybe add a linux tag to your post so that some linux people can see this and chime in. I'm not sure why your perl program wouldn't know what files it opened. It's your program, wouldn't it access the files you told it to access? Or if you're computing the filenames somehow (which I've done in cobol, but still know at least which directory to find them in, and what naming scheme they use), you'd still have clues like what I mention. Also, since it's your program, and if you're computing the filenames, coudn't you also make your Perl program output it's own little report of what the files were? Like, just after it computes the filename, have it copy the name string to a separate report file.