My rule of thumb: ALWAYS add the AGAIN clause when you USE a table. No drawbacks, only advantages, as far as I know. My opinion is that with SET EXCLUSIVE OFF, the AGAIN word should be implisit/redundant.
USE nir AGAIN
USE nir ALIAS nira AGAIN
SELECT * from nir INTO CURSOR c1 readwrite
USE IN SELECT('c1')
USE IN SELECT('nir')
USE nir AGAIN
>i just found out other program opened that table with different alias and that's what causing the problem.
>following code should reproduce error for anyone
>
>USE nir
>USE nir ALIAS nira
>SELECT * from nir INTO CURSOR c1 readwrite
>USE IN SELECT('c1')
>USE IN SELECT('nir')
>USE nir && this line gives file is in use error
>
>i am wondering is there any way to find out if a table is open with different alias