- 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 07:30 AM
тАО08-09-2006 07:30 AM
Can someone help me to write a simple com file so I can use it on all of our 90+ nodes? Is it as simple as that? Your help would be greatly appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:10 AM
тАО08-09-2006 08:10 AM
Re: Help writing a com file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:11 AM
тАО08-09-2006 08:11 AM
Re: Help writing a com file
Another simple way could also be to do the following search:
mc authorize list */full
sea sysuaf.lis username,Enqlm
That output then has the Username and Enqlm values. You could output the data to a file and read 2 lines at a time. Then use string manipulations to pull out the values on enqlm > 32767.
Quick example:
mc authorize list */full
sea sysuaf.lis username,Enqlm/out=x.x
Create file: x.com
$ set noon
$ 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 08:20 AM
тАО08-09-2006 08:20 AM
Re: Help writing a com file
I created a come file called enqlm_fix.com
$ set noon
$ 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
What file name do I put in for the x.x
Also, when I am done can I run it and how?
If this works I plan to copy thos to all our nodes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:28 AM
тАО08-09-2006 08:28 AM
Re: Help writing a com file
Once I finish do I do an @enqlm_fix.com
or a submit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:46 AM
тАО08-09-2006 08:46 AM
Re: Help writing a com file
Here is what I did on our Test Server.
In my home directory USRDSK1:[BLS]
I did a mc authorize list */full
Which produced a sysuaf.lis
Directory DUA1:[BLS]
SYSUAF.LIS;1 201/210 9-AUG-2006 15:24
Then I did a:
sea sysuaf.lis username,Enqlm/out=x.x
Which produced a x.x file in my home directory as well
I created a come file called enqlm_fix.com
which is also in my home directory as well.
typ enqlm_fix.com
$ set noon
$ 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
Now, what do I do? Do I @enqlm_fix.com
or submit it?
Let me know!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:51 AM
тАО08-09-2006 08:51 AM
Re: Help writing a com file
Welcome to VMS. Since nobody has replied yet. I will try to answer your last question:
"Once I finish do I do an @enqlm_fix.com or a submit?"
You can execute it either way. The way the command procedure is currently written, it will expect the file X.X to be in the default directory. You can combine the external commands into the command procedure as follows:
$ set noon
$ mc authorize list */full
$ sea sysuaf.lis username,Enqlm/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
If you submit the procedure, then the output will be in the log file. By default it is created in the Sys$Login directory of the user with the same name as the command procedure and an extension of .Log. If you wish to direct it elsewhere or change the name, you can specify /Log=disk:[directory]filename.ext on the submit command.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:55 AM
тАО08-09-2006 08:55 AM
Re: Help writing a com file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-09-2006 08:57 AM
тАО08-09-2006 08:57 AM
Re: Help writing a com file
One more question? What will this com file do exactly? Is it going to chane the values of the enqlm or just do a listing?
Thanks again!