문제

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?

도움이 되었습니까?

해결책

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)

다른 팁

You need to find the documentation for undocumented VMS features :-)

Seriously I think that set watch might do what you want. If you issue

$ set watch file/class=(all,nodump)
$ perl yourperlscript.pl

You 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

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?

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top