In reply to Chris Hemedinger.

Hi Chris,

I was able to copy files (SAS Dataset, SAS log files, Excel sheet etc.) from UNIX to Windows using the simpler FCOPY function.

I had to change the RECFM parameter to RECFM=F and also add lrecl=32767 in the FILENAME SFTP method.

So my updated FILENAME statement looks like:

/* Using FILENAME SFTP to access the SAS dataset residing on UNIX SAS Server */

filename _bcin sftp 'PATH TO THE SAS DATASET IN UNIX SERVER' options="-i PATH TO THE PRIVATE KEY IN WINDOWS MACHINE" user=jrozario
host='UNIX SERVER HOSTNAME' options="-v" recfm=F lrecl=32676 wait_milliseconds=6000 debug;
filename _bcout "C:\Joy Work\SSH Keys\test_sample.sas7bdat" recfm=N lrecl=32767 ;

Thanks a lot for all the help and guidance on this issue.