home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!KOPC.HHS.DK!ARNE
- From: ARNE@KOPC.HHS.DK (Arne Vajhxj)
- Newsgroups: comp.os.vms
- Subject: Re: SYS$FIND_HELD
- Message-ID: <01GSF1SUFQ2Q8WW983@kopc.hhs.dk>
- Date: 17 Dec 92 08:39:11 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 37
-
- > I am trying to determine the identifier(s) held by a user using the
- > SYS$FIND_HELD system service but can't seem to get it working properly.
- >
- > Would anyone happen to have an example coded in BASIC (ugh!)?
- > I believe it involves the use of the SYS$ASCTOID and SYS$IDTOASC
- > system services as well.
-
- Here is a small example with SYS$ASCTOID,SYS$FIND_HELD and SYS$IDTOASC
- in FORTRAN (we do not have basic !).
-
- PROGRAM Z
- INCLUDE '($SSDEF)'
- INTEGER*4 UNLEN,STAT,UNID(2),ID,CNTX,L
- CHARACTER*12 UN,S
- INTEGER*4 SYS$ASCTOID,SYS$FIND_HELD,SYS$IDTOASC
- WRITE(6,'(1X,A,$)') 'Enter username> '
- READ(5,'(Q,A)') UNLEN,UN
- STAT=SYS$ASCTOID(UN,UNID(1),)
- UNID(2)=0
- CNTX=0
- 100 STAT=SYS$FIND_HELD(UNID,ID,,CNTX)
- IF(STAT.EQ.SS$_NORMAL) THEN
- STAT=SYS$IDTOASC(%VAL(ID),L,S,,,)
- WRITE(*,*) S(1:L)
- GOTO 100
- ENDIF
- END
-
- Hope it helps !
-
- Arne
-
- Arne Vajhxj local DECNET: KO::ARNE
- Computer Department PSI: PSI%23831001304030::ARNE
- Business School of Southern Denmark Internet: ARNE@KO.HHS.DK
-
-
-