home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / vms / 19469 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.5 KB

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!KOPC.HHS.DK!ARNE
  2. From: ARNE@KOPC.HHS.DK (Arne Vajhxj)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: SYS$FIND_HELD
  5. Message-ID: <01GSF1SUFQ2Q8WW983@kopc.hhs.dk>
  6. Date: 17 Dec 92 08:39:11 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Organization: The Internet
  9. Lines: 37
  10.  
  11. > I am trying to determine the identifier(s) held by a user using the
  12. > SYS$FIND_HELD system service but can't seem to get it working properly.
  13. > Would anyone happen to have an example coded in BASIC (ugh!)?
  14. > I believe it involves the use of the SYS$ASCTOID and SYS$IDTOASC
  15. > system services as well.
  16.  
  17. Here is a small example with SYS$ASCTOID,SYS$FIND_HELD and SYS$IDTOASC
  18. in FORTRAN (we do not have basic !).
  19.  
  20.       PROGRAM Z
  21.       INCLUDE '($SSDEF)'
  22.       INTEGER*4 UNLEN,STAT,UNID(2),ID,CNTX,L
  23.       CHARACTER*12 UN,S
  24.       INTEGER*4 SYS$ASCTOID,SYS$FIND_HELD,SYS$IDTOASC
  25.       WRITE(6,'(1X,A,$)') 'Enter username> '
  26.       READ(5,'(Q,A)') UNLEN,UN
  27.       STAT=SYS$ASCTOID(UN,UNID(1),)
  28.       UNID(2)=0
  29.       CNTX=0
  30. 100   STAT=SYS$FIND_HELD(UNID,ID,,CNTX)
  31.       IF(STAT.EQ.SS$_NORMAL) THEN
  32.         STAT=SYS$IDTOASC(%VAL(ID),L,S,,,)
  33.         WRITE(*,*) S(1:L)
  34.         GOTO 100
  35.       ENDIF
  36.       END
  37.  
  38. Hope it helps !
  39.  
  40.                                                           Arne
  41.  
  42. Arne Vajhxj                             local DECNET:  KO::ARNE
  43. Computer Department                     PSI:           PSI%23831001304030::ARNE
  44. Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK
  45.  
  46.  
  47.