BookmarkSubscribeRSS Feed
arunrami
Pyrite | Level 9
I have used the same syntax as yours and I too using SAS/AIX only. . still file not getting copied from external windows path to unix .. here is the log

NOTE: Compression was disabled for data set WORK.NULL because compression
overhead would increase the size of the data set.
NOTE: The infile OSCMD is:

Pipe command="sftp
N******@winp-001:\\Arun.csv /localpath/arun.csv 2>&1"

usage: sftp [-1246aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
[-o ssh_option] [-P port] [-R num_requests] [-S program]
[-s subsystem | sftp_server] host
sftp [user@]host[:file ...]
sftp [user@]host[:dir[/]]
sftp -b batchfile [user@]host
NOTE: 7 records were read from the infile OSCMD.
The minimum record length was 32.
The maximum record length was 77.
NOTE: The data set WORK.NULL has 7 observations and 0 variables.
N
Kurt_Bremser
Super User

Do not use backslashes on UNIX commandlines. A backslash has a very special meaning for UNIX shells and must not be used for anything else.

 

But I repeat: log on to the UNIX server and run the sftp from the commandline until it works. Then start using it in SAS code.

Start with logging on in interactive mode by simply doing

sftp user@servername

Then retrieve a file with the subcommand get (you can use most of the FTP subcommands in sftp). From that you should be able to create the commandline non-interactive version.

 

Disclaimer: I retrieve my data from a sane operating system (Linux), not from any Windows, so I have no idea how filenames need to be formulated so that the Dumb Operating System understands it.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 16 replies
  • 4179 views
  • 4 likes
  • 4 in conversation