[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECmcc user notes file. Does not replace IPMT. |
Notice: | Use IPMT for problems. Newsletter location in note 6187 |
Moderator: | TAEC::BEROUD |
|
Created: | Mon Aug 21 1989 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 6497 |
Total number of notes: | 27359 |
5963.0. "entity to domain DCL procedure" by TRN02::ROSSETTO () Tue Apr 26 1994 09:55
Hello,
I needed such a functionality (membership of an entity) and because I didn't
find anything ready-to-use I developed the following DCL procedure.
Probably it is not the most elegant way of doing it, but it works and it's ok
for what I need to do.
I hope it can be useful for some of you.
If somebody has got something more efficient
(the "SHO DOMAIN * MEMBER name" takes quite a while to execute) I would be
pleased to use that instead.
Cheers,
luciano
$ ! member-to-domain.com
$ !
$ ! This procedure provides the membership of a given entity
$ !
$ ! Input parameter: P1 = entity name
$ !
$ ! Output parameter : global symbol DOMAINS = list of domains in which
$ ! the given entity is registered
$ !
$ ! Example of use
$ !
$ ! $ @member-to-domain TRN02
$ ! $ sho symbol domains
$ ! DOMAINS == ".motori,.torino,.turin"
$ !
$ ! ------------------------------------------------------------------------
$ !
$ mcc = "manage/enterprise"
$ !
$ assign 1234554321.tmp sys$output
$ mcc show domain * member 'p1'
$ deass sys$output
$ search 1234554321.tmp "MemberName"/wind=(4,0)/out=2345665432.tmp
$ search 2345665432.tmp "Domain"/out=3456776543.tmp
$ open/read fil 3456776543.tmp
$ dom=""
$ loop:
$ read/end=fine fil str
$ s1=f$locate(".",str)
$ s2=f$locate("Member",str)
$ len=s2-s1-1
$ dom=dom+f$extract(s1,len,str)+","
$ goto loop
$ fine:
$ close fil
$ l=f$length(dom)
$ domains==f$extract(0,l-1,dom)
$ delete 1234554321.tmp;*
$ delete 2345665432.tmp;*
$ delete 3456776543.tmp;*
$ exit
T.R | Title | User | Personal Name | Date | Lines |
---|
5963.1 | Tools to tools... | BIKINI::KRAUSE | CSC Network Management/Hubs | Wed Apr 27 1994 09:38 | 5 |
| Could you please post your procedure in NOTED::MCC-TOOLS as well?
Thanks for providing it,
*Robert
|