Rajender,
I would replace all that code with a couple of queries, one per array created.
Just my $.02
>Terry,
>
>SCAN WHILE USERID = gUser FOR rec_type='C'
>
>USERID is in table userproj and rec_type is in table workpkg.
>
>When i am using the above line i am getting an error message saying variable rec_type not found.
>
>Could you please tell me how i can use the scan while with two different tables.
>
>Thank you.
--sb--