C	UIC.FOR
C
C	UIC parses a uic.
C
C		Arguments
C	    Name	Type	 I/O	Meaning
C	------------------------------------------
C	   uic		logical	  O	True if valid uic format
C	   sq_uic	integer	  O	array (2) : 1 = uic group #
C	   					    2 = uic user #
C
	logical function uic (sq_uic)

	implicit integer (a-z)

	include 	'TOKDEF/NOLIST'

	integer		sq_uic (2)

50	format (t5, a, '?  ',$)
70	format (1x,'%SOFTDB-ERR ',a)

	uic = .FALSE.

	do while (token .eq. NEWLINE)
	    type 50, 'UIC'
	    call get_token
	enddo

	if (token .eq. TLBR) then					! [

	    call get_token
	    if (token .eq. TNUMBER) then				! group number

		sq_uic (1) = t_value

		call get_token
		if (token .eq. TCOMMA) then				! ,

		    call get_token
		    if (token .eq. TNUMBER) then			! user number

			sq_uic (2) = t_value

			call get_token
			if (token .eq. TRBR) then			! ]

			    call get_token
			    uic = .TRUE.

			else
			    type 70,'Missing ]'
			endif
		    else
			type 70, 'Illegal user number'
		    endif
		else
		    type 70, 'Missing comma'
		endif
	    else
		type 70, 'Illegal group number'
	    endif
	else
	    type 70, 'Missing ['
	endif

	return
	end
