sas binary sftp file copy

filename in sftp "/path/to/commute.sas7bdat" host="192.168.56.102" user="xxx";
filename out "/host/path/to/sftpcommute.sas7bdat";

data null;
  infile in recfm=f LRECL=1 ;
  file out recfm=f LRECL=1 ;
  input byte ib1.;
  put byte ib1.;
run;
Advertisements

One thought on “sas binary sftp file copy

  1. Thanks! This saved my day! Have been trying to read a SAS dataset through filename SFTP connection, but couldn’t get data step working, so started to figure out how to copy it to a local file. Your code worked fine for this!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s