From:	SMTP%"RELAY-INFO-VAX@CRVAX.SRI.COM"  2-JUN-1993 13:37:18.12
To:	EVERHART
CC:	
Subj:	Re: Some more VAX Fortran questions...

Date: Wed, 02 Jun 1993 10:40:33 +0100
From: Arne Vajhøj <ARNE@kopc.hhs.dk>
Subject: Re: Some more VAX Fortran questions...
To: ARNE@kopc.hhs.dk, INFO-VAX@SRI.COM
Message-id: <01GYWELOJQYG9GVA0B@kopc.hhs.dk>
X-VMS-To: KOPC::IN%"ARNE@kopc.hhs.dk"
X-VMS-Cc: IN::"INFO-VAX@SRI.COM"
MIME-version: 1.0
Content-type: TEXT/PLAIN; CHARSET=ISO-8859-1
Content-transfer-encoding: 8BIT

A review revealed a small error in my code:

>       SUBROUTINE GET_OWNER(OWN,LOWN)
>       CHARACTER*(*) OWN
>       INTEGER*2 LOWN
>       INCLUDE '($JPIDEF)'
>       INCLUDE '($UAIDEF)'
>       STRUCTURE /ITEMLIST/
>         INTEGER*2 BUFLEN,CODE
>         INTEGER*4 BUFADR,RETLENADR
>       ENDSTRUCTURE
>       INTEGER*4 STAT
>       INTEGER*2 UNL,SL
>       CHARACTER*12 UN
>       CHARACTER*32 S
>       RECORD /ITEMLIST/UAILIST(2)
>       INTEGER*4 LIB$GETJPI,SYS$GETUAI
>       STAT=LIB$GETJPI(JPI$_USERNAME,,,,UN,UNL)
>       UNL=INDEX(UN,' ')
>       IF(UNL.EQ.0) UNL=12
>       UAILIST(1).BUFLEN=LEN(S)
>       UAILIST(1).CODE=UAI$_OWNER
>       UAILIST(1).BUFADR=%LOC(S)
>       UAILIST(1).RETLENADR=%LOC(SL)
>       UAILIST(2).BUFLEN=0
>       UAILIST(2).CODE=0
>       UAILIST(2).BUFADR=0
>       UAILIST(2).RETLENADR=0
>       STAT=SYS$GETUAI(,,UN(1:UNL),UAILIST,,,)
>       LOWN=SL-1
>       OWN(1:LOWN)=S(2:SL)
>       RETURN
>       END

The last four lines should be:

       LOWN=ICHAR(S(1:1))
       OWN(1:LOWN)=S(2:1+LOWN)
       RETURN
       END

to truncate the owner-field properly !

                                                          Arne

Arne Vajhøj                             local DECNET:  KO::ARNE
Computer Department                     PSI:           PSI%238310013040::ARNE
Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK


