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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.