>John,
>
>Your problem is with teh call to SYS(2015) which until today returned a stoirng beginning qwith a letter and now is returning a stirng beginning with a digit (which is illegal as an index file name). Try to prepend your sys(2015) with a letter as in;
>
>lcIndexname = "Tmp"+SYS(2015)
Jim, if he used SYS(2015) in it's entirety, he wouldn't have the problem - SYS(2015) prepends a unique 9 character string with an underscore to always create a valid name.