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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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