Operating System - OpenVMS
1753811 Members
7903 Online
108805 Solutions
New Discussion юеВ

Re: Setting File Attributes on a Remote Node

 
SOLVED
Go to solution
Kevin Atchley
Occasional Advisor

Setting File Attributes on a Remote Node

Good Afternoon All,

I pose a question for you. I have a command procedure that copies a series of files from Node A to Node B. Once the files get copied to Node B, I would like the command procedure to set the file attributes to /NOBACKUP on those files. I do not want the attributes for the files on NODE A set to /NOBACKUP, so they must stay as is.

Is there an easy way to do this?

Thank you all,
-k
5 REPLIES 5
Steven Schweda
Honored Contributor

Re: Setting File Attributes on a Remote Node

"rsh"? Assuming that "copies" means COPY
using DECnet, you've probably noticed that
you can't use SET FILE /NOBACKUP on a
DECnet-remote file:

alp $ set file /nobackup alp::a_b.c
%SET-E-OPENIN, error opening ALP::ALP$DKA0:[SMS]A_B.C;1 as input
-SYSTEM-E-UNSUPPORTED, unsupported operation or function

A process running on the remote system can do
it. This can be arranged using a DECnet
remote task, or an IP "r" command (like
"rsh"), and probably some other (more exotic)
ways.

If the systems were clustered and the
destination disk were mounted locally, then
the problem would vanish, of course.
Jim_McKinney
Honored Contributor
Solution

Re: Setting File Attributes on a Remote Node

DECnet copy? Proxies enabled? A copy of this in the default directory on each system should work (you need to replace your nodeb nodename on the open command line). Make it more robust if you like...

$! NOBACKUP.COM
$ goto 'f$mode()'
$INTERACTIVE:
$BATCH:
$OTHER:
$ if p1 .eqs. "" then exit 852 ! %SYSTEM-F-IVMODE
$! open/read/write net swda"user password"::"task=nobackup" ! no proxy
$ open/read/write net nodeb::"task=nobackup" ! using proxy
$ write net p1
$ read net p1
$ close net
$ exit 'p1'
$ exit
$NETWORK:
$ open/read/write net sys$net
$ read net p1
$ set file/noback 'p1'
$ write net $status
$ close net
$ exit 1


Then just

$ @nobackup file.dat

or

$ @nobackup *.dat;*

etc...
Steven Schweda
Honored Contributor

Re: Setting File Attributes on a Remote Node

> $ exit 'p1'
> $ exit

Some might call that overkill.
Jim_McKinney
Honored Contributor

Re: Setting File Attributes on a Remote Node

> Some might call that overkill.

And, I'd be one of them. How did that get in there? Someone sure did a poor cut and paste job while writing this...
Kevin Atchley
Occasional Advisor

Re: Setting File Attributes on a Remote Node

Thank you. After some minor tweaking for my own purposes this appears to have done the job I need. Thanks for all your help.