carl@CITHEX.CALTECH.EDU (10/30/86)
First of all, neither dir/prot nor set protection require spawning subprocesses; they do, however, require image activations (this assumes that you are doing this from the DCL level). The DCL lexical functions f$search() and f$file() can be used to get the current protections for files matching a wildcarded filespec without an image activation, but since DCL is an interpreted language, it can be slow to do it this way. To do what you want to do from within a program, you can use calls to RMS, but this is complicated enough that rather than describing here what needs to be done, I refer you to Volume 5B, the RMS reference manual, of the VMS documentation set.