It would help if you say what error message you get, or what is the expected vs. the obtained result.
Anyway, I suspect you should change:
select cfile
to:
select (cfile)
Otherwise, VFP will think it is not a variable, but the real name of the alias.
HTH,
Hilmar.
>Why the following syntax not working?
>
packindex('table1')
>proc packindex
>lparameter cfile
>select cfile
>pack
>reindex
>endproc
>Thank's in advance
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)