You can do the whole job very simply using the "join" command. This command is designed to merge records of two files on the value of "common" fields (such as drug name). See the "join" man page for details. Jim Rogers Hewlett-Packard Company Colorado Springs, Colorado