Z39.50 is a protocol used mostly in library software. References here on the wiki are:
http://en.wikipedia.org/wiki/Z39.50
Now, is anybody aware of a z39.50 server written in Tcl? There is one in Perl, called SimpleServer.