* REN_CURS.PRG *------------------------------ PARAMETERS FromAlias,ToAlias SELECT 0 USE (DBF(m.FromAlias)) ALIAS (m.ToAlias) AGAIN USE IN (m.FromAlias) && Close FromAlias RETURNHere is how it works.
SELECT field1,field2 FROM file INTO CURSOR TMP =REN_CURS("TMP","TMP_OK")As you can see, at this stage the cursor TMP is closed and TMP_OK is now used as the new cursor with all the found data.