Xabi,
>For it I have used "SAVE TO" and "RESTORE FROM". But I have realized taht public variables restore like "PRIVATE".
This is the default behaviour of the command. Regardless, whether a variable was saved when it was defined as PUBLIC, it's always restored as PRIVATE when you don't restore in the command window. I don't know if this works, but maybe you could declare the variables before restoring them as PUBLIC and do a RESTORE FROM ... ADDITIVE. But I'm really not sure, if this will help.
If it doesn't work, you could save the content of the variables to a text file or dbf (SCATTER/GATHER MEMVAR) on your own, declare the variables on the server side as PUBLIC and set them according to your saved values.
HTH,
Armin