Once you've got the record pointer on the correct record, then:
lcUNIT_NAME = UNIT_NAME
COPY TO (lcUNIT_NAME) FOR UNIT_NAME = lcUNIT_NAME
or
lcUNIT_NAME = UNIT_NAME
COPY TO &lcUNIT_NAME FOR UNIT_NAME = lcUNIT_NAME
I'm not familiar with Visual dBase, but these worked in earlier/similar products. These commands should yield a database table named with the contents of UNIT_NAME with the same fields as the original, filtered for the specific UNIT_NAME. If you wanted to create one database table for each unique UNIT_NAME, you'll need to create a loop/scan and execute these commands within the loop.
Not sure how to have the program prompt you for the location, though I'm sure it can be done. If the location is always the same, just different than your default directory, change the first line to :
lcUNIT_NAME = "c:\myfolder\mysubfolder\"+UNIT_NAME
substituting of course the correct drive\path information.
hth
Dennis