	SUBROUTINE MATCHREC(record_found, options, username, name)
	IMPLICIT INTEGER(A-Z)
	INTEGER option_len, str$trim, str$match_wild, str$upcase
	CHARACTER username*31, name*256, match_name*256
	CHARACTER match_option*256, options(4)*256
	LOGICAL record_found
	PARAMETER (STR$_MATCH = 2393113)
C
C	Was USERNAME selected? If so, check for USERNAME record match.
C
	icode = STR$TRIM(options(1), options(1), option_len)
	If (option_len.ne.0) then
	icode = STR$UPCASE(match_option, options(1)(1:option_len))
	icode = STR$MATCH_WILD(' '//username,match_option(1:option_len))
	if(icode.eq.STR$_MATCH) record_found = .true.
	Endif !End USERNAME match check.
C
C	Was NAME selected? If so, check for NAME record match.
C
	icode = STR$TRIM(options(2), options(2), option_len)
	If (option_len.ne.0) then
	icode = STR$UPCASE(match_name, name)
	icode = STR$UPCASE(match_option, options(2)(1:option_len))
	icode = STR$MATCH_WILD(' '//match_name,match_option(1:option_len))
	if(icode.eq.STR$_MATCH) record_found = .true.
	Endif !End NAME match check.
C
	return
	end
