HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Changing OpenVMS file protection in FORTRAN

 
SOLVED
Go to solution
Richard kelly_2
Occasional Advisor

Changing OpenVMS file protection in FORTRAN

Hello,
I am not very familiar with calling systems services but I would like to be able to check and change a files protection and/or acl settings from FORTRAN.
Any pointers that will help to get this done will be greatly appreciated
Thanks
Richard
9 REPLIES
Jan van den Ende
Honored Contributor

Re: Changing OpenVMS file protection in FORTRAN

Richard,

my quick & dirty suggestion would be to SPAWN a little DCL procedure to do it, but if that is possible/feasable/desirable in your specific situation?

Just too little info....

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Richard kelly_2
Occasional Advisor

Re: Changing OpenVMS file protection in FORTRAN

Sorry about not providing enough info. I am actually helping out a colleague (blind leading the blind).

He is hoping to not do a spawn because he wants to be able to check the outcome and status of the commands after each one.

He is trying to read some information from a database and based on various settings he needs to apply or remove protections from particular VMS files.

I asked if he could use a DCL script to call a fortran program to check the database but he was not happy with that either. I was not sure if there was a system service or library routine for this. I did not see one.

I hope this is enough.
Jess Goodman
Esteemed Contributor

Re: Changing OpenVMS file protection in FORTRAN

The RMS Reference Manual is where you will find the documentation on the VMS APIs to do what you want.

http://h71000.www7.hp.com/doc/731FINAL/4523/4523PRO.HTML

RMS routines are callable from any language.
I have one, but it's personal.
Hoff
Honored Contributor
Solution

Re: Changing OpenVMS file protection in FORTRAN

Depending on the particular OpenVMS version, the sys$set_security system service is probably the call you want.

Some related examples in C:
http://vmsone.com/~decuslib/vmssig/vmslt02a/vu/create-ace-from-prog-src.txt

And an example from the support database in Fortran:
http://h18000.www1.hp.com/support/asktima/appl_tools/CHAMP_SRC941118003877.html

This call transparently connects into the RMS and other underlying calls as described by Hein, depending on the particular object target.

Stephen Hoffman
HoffmanLabs
Hoff
Honored Contributor

Re: Changing OpenVMS file protection in FORTRAN

sub /Hein/Jess/
my bad.

Steven Schweda
Honored Contributor

Re: Changing OpenVMS file protection in FORTRAN

There's C code which deals with this stuff
in the Info-ZIP UnZip code ("[.vms]vms.c" in
practically any version). Sorting out the
parts you need may be harder than writing
everything yourself, but you might get some
useful hints from it.

http://www.info-zip.org/
http://www.info-zip.org/UnZip.html
Richard kelly_2
Occasional Advisor

Re: Changing OpenVMS file protection in FORTRAN



Thanks very much for all the suggestions.

I was not able to access the FORTRAN link that was provided.

I'll be going over these with my colleague today.
Hoff
Honored Contributor

Re: Changing OpenVMS file protection in FORTRAN

Ok; here's the path to get to the web page. Go to the http://www.itrc.hp.com page and find the right support search engine tool -- for this, you want the one known as Search Assistant. When you pull up an Americas Asia Pacific search tool -- "James" is in the URL -- you will see the line "Enter your Compaq product query here" at the top of the search box, enter the "all words" query:

sys$set_security fortran

You should get two hits.

Here's the full text of the first hit:

Example-FORTRAN How To Add An ACE Using SYS$SET_SECURITY
... Example-FORTRAN How To Add An ACE Using SYS$SET_SECURITY buy online or call 1.800.AT.COMPAQ ...
http://search.hp.com/redirect.html?url=http%3A//h18000.www1.hp.com/support/asktima/appl_tools/CHAMP_SRC941118003877.html&qt=%2Bsys%24+%2Bset_security+%2Bfortran+&hit=1
Richard kelly_2
Occasional Advisor

Re: Changing OpenVMS file protection in FORTRAN

Thanks very much for everything I think that we have some really good points here and we should be able to get a solution out of these suggestions.