From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 20-JUN-1992 07:53:47.62 To: info-vax@kl.sri.com CC: Subj: Re: $GETUAI system service call - context? In article <01GKRW0HHRF48WW45E@ACC.HAVERFORD.EDU>, MONITOR@ACC.HAVERFORD.EDU (Haverford College Monitor Account) writes: > > A while ago I remember hearing something about an undocumented > "context" field in the $GETUAI system service call, to speed up repeated > calls. Can anyone tell me anything about this? > Thanks, > Ethan Shayne > Student VAX Manager > Haverford College > > > Bitnet: vax_mgr@hvrford > Internet: vax_mgr@acc.haverford.edu Last year I wrote a somewhat large and complicated utility for reporting on or modifing users found by various combinations of UAF fields. Here is a BASIC program segment from that utility illustrating this feature. (GETUAI_CONTEXT is a LONGWORD). ! Initialize The Context For SYS$GETUAI. This Context, At The Time ! Of Writing Is An Undocumented Feature Of SYS$GETUAI, But Is Used ! To Hold The SYSUAF Open Over Repeated Calls As We Don't Want To ! Open And Close The SYSUAF For Each User Processed. LET GETUAI_CONTEXT=-1% ! Loop Through All The Users Supplied By GET_USER_NAMES FOR NUM_USERS_MATCH=0% TO NUM_USERS_MATCH ! Put A Message On The Display Informing The User ! About What User We Are Comparing (Current User) CALL SMG$PUT_CHARS(QUEST_DISPLAY, "Comparing " + & USERS_MATCH(NUM_USERS_MATCH)+ & SPACE$(32%-LEN(USERS_MATCH(NUM_USERS_MATCH))), 13%, 30%,, ) ! Get The Current User LET UAI_STAT=SYS$GETUAI(,GETUAI_CONTEXT,USERS_MATCH(NUM_USERS_MATCH) & BY DESC, GETUAI BY REF,,,) Hope this helps. I found out about this trick from reading the VMS source listing microfiche as without this feature SYS$GETUAI is way to slow and causes to much overhead to be usefull when processing large amounts of users. Patrick Young VAX/VMS Group University Of New South Wales