Nick,
I'm glad you responded the way you did, since I had thought I had to 
adapt your lines to fit, for example, the dog-cat-mouse data example, 
but clearly it runs as is and I can use the mystringsort command after 
that with the simple syntax. 
Great, thanks!
   Date: Mon, 20 Dec 2004 20:33:42 -0000
   From: "Nick Cox" <[email protected]>
Subject: st: RE: RE: Re: sorting a string variable, but not 
alphabetically
I'm not sure what there is to chew on. 
The example shows that the program works, 
although it lacks a help file. it should 
also display an error message if no 
sorting tokens are given. 
The syntax is 
mystringsort <strvar> <token1> [<token2> [<token3 ... ]] 
so that -mystringsort- so that occurrences of 
<token1> come first, and so forth. 
Nick 
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/