In reply to neda.

Have you tried the FCOPY function in SAS 9.4? This might work better and provide a simpler approach.