From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 28-APR-1989 20:54
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Re: LOGIN.FOR example

Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Fri, 28 APR 89 16:12:53 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Fri, 28 Apr 89 15:50:27 PDT
Received: by ucbvax.Berkeley.EDU (5.61/1.36)
	id AA18690; Fri, 28 Apr 89 15:40:52 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 28 Apr 89 21:15:47 GMT
From: utkcs2!utkux1!mcnair@gatech.edu  (John McNair)
Organization: University of Tennessee Computing Center, Knoxville
Subject: Re: LOGIN.FOR example
Message-Id: <861@utkcs2.cs.utk.edu>
References: <24207@ames.arc.nasa.gov>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

Hello,

I've been playing with John Howells LOGIN.FOR example and find that it 
works very well. I use a search list, SYS$USER, to point to several disks
and had some problems trying to implement that with LIB$SET_LOGICAL. In
case anyone else is trying that I thought I'd post an example that
works. Note that the item list has to be an ITEM_LIST_3 instead of
ITEM_LIST_2 as specified in the V5 Run-Time Library manual.

        Character*10 USER_DISK(6)

      STRUCTURE /itemlist3/
        UNION
        MAP
        INTEGER*2 buflen,code
        INTEGER*4 bufadr
        INTEGER*4 retadr
        END MAP
        MAP
        INTEGER*4 end_list /0/
        END MAP
        END UNION
      END STRUCTURE

      RECORD /itemlist3/ ITEMS(7)

      USER_DISK(1)      = 'SYS$USER1:'
      USER_DISK(2)      = 'SYS$USER2:'
      USER_DISK(3)      = 'SYS$USER3:'
      USER_DISK(4)      = 'SYS$USER4:'
      USER_DISK(5)      = 'SYS$USER5:'
      USER_DISK(6)      = 'SYS$USER6:'

      DO 10 I=1,6
      ITEMS(I).BUFLEN = 10
      ITEMS(I).CODE = LNM$_STRING
      ITEMS(I).BUFADR = %LOC(USER_DISK(I))
10    Continue

        Call LIB$SET_LOGICAL (  'SYS$USER',,,, %REF(ITEMS) )

