- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Help writing a com file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 09:27 AM
тАО08-09-2006 09:27 AM
Re: Help writing a com file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 09:32 AM
тАО08-09-2006 09:32 AM
Re: Help writing a com file
I think I am missing an else in the command procedure? Where does that go?
$ set noon
$ mc authorize list */full
$ sea sysuaf.lis username,32767/out=x.x
$ open/read/err=close_file in_file x.x
$ Next_record:
$ read/end_of_file=close_files in_file user_rec
$ read/end_of_file=close_files in_file record1
$ enq = f$element(3," ",f$edit(record1,"compress"))
$ if enq .ge. 32767
$ then
$ username = f$element(1," ",f$edit(user_rec,"compress"))
$ write sys$output "''username' - ''enq'"
$ goto next_record
$!
$ close_files:
$ close in_file
$ exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 09:35 AM
тАО08-09-2006 09:35 AM
Re: Help writing a com file
$ set noon
$ mc authorize list */full
$ sea sysuaf.lis username,32767/out=x.x
$ open/read/err=close_file in_file x.x
$ Next_record:
$ read/end_of_file=close_files in_file user_rec
$ read/end_of_file=close_files in_file record1
$ enq = f$element(3," ",f$edit(record1,"compress"))
$ if enq .ge. 32767
$ then
$ username = f$element(1," ",f$edit(user_rec,"compress"))
$ write sys$output "''username' - ''enq'"
$ endif
$ goto next_record
$!
$ close_files:
$ close in_file
$ exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 09:53 AM
тАО08-09-2006 09:53 AM
Re: Help writing a com file
> What will this com file do exactly?
It will parse your SYSUAF listing and reveal the usernames with ENQLM = 32767
No offence intended, but if you can't work that out, you really shouldn't be downloading random command procedures from strangers and executing them. Especially from privileged accounts when the apparent purpose is to manipulate authorization data. Who knows what they might do?
I'd suggest rather than writing command procedures for such a specific request, you find a more generic solution to your overall issue of user management. For example, if you have 90+ nodes, perhaps you should be using the OpenVMS Management Station to manage your users? A nice GUI interface which can potentially show you all your users across all systems in one window. I think the version I'm using is fairly old - it can sort users on various fields, maybe a later one can do it on ENQLM?
Another option is to export your UAF data into a CSV file, then you can load it into Excel, sort on ENQLM, and you've answered your specific question easily. You can also answer a huge variety of similar questions, without having to write another procedure.
A google search "SYSUAF EXCEL" will quickly find several possibilities.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 01:02 AM
тАО08-10-2006 01:02 AM
Re: Help writing a com file
I have about 70 file here is an example
TEAM07_ENQLM_32767.DOC
TEAM08_ENQLM_32767.DOC
NASHVI_ENQLM_32767.DOC
ETC...
I know how to append them to one file, the problem is, how do I include the node names for each file in the appended file. What I will have is a list like this. Here is an example
Username: SIKORSKIK Owner:
Username: SOLLERSD Owner:
Username: SQLSRV$SRV Owner:
Username: SUPUSER Owner:
Username: SYSTEM Owner: SYSTEM MANAGER
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: SYSTEST Owner: SYSTEST-UETP
Username: SYSTEST_CLIG Owner: SYSTEST-UETP
Username: SYS_ANDYW Owner: Sys - Andy Winter
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: SYS_DAVIDP Owner: Sys - David Plowman
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: SYS_KURTH Owner: Sys - Kurt Hyde
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: SYS_MILESO Owner: Sys - Miles Ostojic
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: SYS_PAULP Owner: Sys - Paul Putong
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: SYS_STEVEO Owner: Sys - Steve Olson
CPU: (none) Enqlm: 32767 Pgflquo: 750000
Username: TAYLORE Owner:
Username: UPLOAD Owner:
This doesn't give the name of the Node???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 04:03 AM
тАО08-10-2006 04:03 AM
Re: Help writing a com file
I need to bump them down. They should at least be bumped down to (value-1).
Do I have to login eacf of our systems and do this manually or is there a quicker and better way to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:09 AM
тАО08-10-2006 05:09 AM
Re: Help writing a com file
mcr authorize
modify sys_miles/enqlm=32766
How do I automate this to execute on all nodes without having to login on every node and doing this command manually?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:33 AM
тАО08-10-2006 05:33 AM
Re: Help writing a com file
you could write DCL procedures for each node, which contain the necessary MODIFY user/ENQLM=nnn commands for each user on that node. You can generate those .COM files from your user listing.
You can then COPY these command files to each individual node and use SUBMIT/REMOTE to submit that command file to the SYS$BATCH queue on that node.
Example: xxx_ENQLM.COM (for node XXX)
$ SET DEF SYS$SYSTEM
$ RUN AUTHORIZE
MOD user1/ENQLM=32766
MOD user2/ENQLM=32766
$ EXIT
$ COPY xxx_enqlm.com xxx"priv_user pwd"::
$ SUBMIT/REMOTE xx"priv_user pwd"::xxx_ENQLM.COM
If appropriate DECnet proxies have been set up on the remote nodes, you could do all that without having to provide username/pwd.
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:51 AM
тАО08-10-2006 05:51 AM
Re: Help writing a com file
Probably the same mechanisme you used to get the data.
Now I would create a DCL or PERL script to read the list you attached and generated a script for each node.
In perl that would be something like:
$create per_node.pl
use strict;
use warnings;
my ($node,$user, $enq, $file, %files, %records);
while (<>) {
($node,$user, $enq) = split /\s+-\s+/;
if ($enq) {
if (!defined ($files{$node})) {
$file = $node . ".tmp";
open $files{$node}, ">$node.tmp" or die "could not create $file";
print {$files{$node}} "MCR AUTORIZE\n";
}
$records{$node}++;
$enq--;
print {$files{$node}} "MODIFY $user/ENQL=$enq\n";
}
}
$enq = 0;
foreach $node (sort keys %files) {
close $files{$node};
print "Node $node, $records{$node} records.\n";
$enq++;
}
print "$enq scripts generated.\n";
$
$perl per_node.pl all_nodes_all_users.txt
:
:
Node VANCOU, 28 records.
Node VENTUR, 28 records.
Node VISALI, 28 records.
Node WASHIN, 28 records.
Node WHITEP, 28 records.
68 scripts generated.
btw 1....
You can run that script on your windoze or unix box if your VMS system does not (yet) have perl. I did! :-)
btw 2....
In perl it would be trival to make sure the ENQ was the same for the same username (min or max) accross all nodes.
As you read, only remember node-user combos and remember the max(enq) for each unique user.
When all is read cull the data from the array and write the output files.
Enjoy,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 06:08 AM
тАО08-10-2006 06:08 AM
Re: Help writing a com file
I'm interested in knowing *why* you are interested in dealing with ENQLM. What problem are you trying to solve?
(I am aware of some potential reasons, and why you may be interested specifically in accounts where ENQLM >= 32767, but I'd like to hear what misbehaviour you have observed).
-- Rob