You clearly fail to realize that Flock() is not a command, it's a function.
Commands raise errors, which you can trap with a Try-Catch-Endtry construct.
Functions return a value, .T. or .F. for Flock(), which you can trap with a If-Else-Endif construct.
>
>Thanks to all for all the help.
>
>Based on my testing, I think I want to use SET REPROCESS TO 1.
>
>In this case, if the other program said USE foo EXCL, I will get a 1705 error. If the other program said USE foo shar, flock(), I will get a 108 error.
>
>If, however, I use the SET TABLEVALIDATE TO 0, then if the other program said USE foo EXCL, I will get a 1705 error, but if the other program said USE foo SHAR, flock(), then VFP
allows me to proceed without error!. This not what I want!
>
>Thanks again for the help