If I understand this right, the fact that the char string is a filename
doesn't really matter (since the file doesn't have to exist). So,
correct me if I am wrong but it sounds like you want to determine
whether a string would be matched by a 'regular expression' (a
wildcarded fileset).

If so, then the posix function regexp() should be able to help. (Calling
it from COBOL might be a bit of a challenge :-)

John Pollard wrote:
>
> I am writing a program which will be testing to see if a file is a member
> of a fileset.  To keep it simple, I'm starting with only MPE-syntax
> files/filesets and I am accepting only the "@", "?" and "#" non-file-name
> characters in the fileset (so no ranges of characters).
>
> Is there an existing callable library routine which would make this
> determination?  If not, does anyone have pseudo-code which might guide me?
> The only problem I see at the moment is handling multiple commercial at
> signs (@) in a given portion of a fileset; such as: myfile.a@[log in to unmask]
>
> Just to make it a little trickier, this is a Cobol program, so recursion is
> out for any inline code.